Read "Encoder counts per revolution" in Labview

Hello,
I have set up an 'NI Motion Device' in the Measurement & Automation Explorer.  I would like to read the value of 'Encoder counts per revolution' in labview.
I do not want to re-enter the value of 'Encoder counts per revolution' in my labview code;  I would like to write the value once (in the Measurement and Automation explorer), and then have labview read this value.
How does labview access this value?
Regards,
Myles

After speaking with a few different applications engineers at NI (see ref#2042315), the 'NI Motion' module only supports setting the counts per revolution (not reading them).  The 'NI SoftMotion' module allows for the reading of "Encoder Counts per Unit' under the softmotion property node.

Similar Messages

  • Configuring Encoders Counts per Revolution using a flexmotion function

    Hello,
    I am having a problem configuring a connected encoder in labview using the flexmotion function.
    The setting:
    I am building a labview vi I want to run on a computer with the connected hardware. But I may NOT have access to the machine to configure it with the "Measurement and Automation Explorer". The hardware may vary too, thus I have to detect and then configure it. I want my VI to set all necessary parameters before I start moving the hardware. I am pretty much done with this.
    The problem:
    I cannot find a way to configure the 'Encoder Counts per Revolution' as shown in picture 2. There is no function in the Motion menu as shown in picture 1. There does not seem to be a function in the FlexMotion32 library (shown in picture 3) to do this either.
    I read through the FlexMotion Software Reference Manual (http://www.ni.com/pdf/manuals/321943b.pdf) and tried to find an answer in multiple forums but was unsuccessful.
    The question:
    Does anyone have an idea about a function in the FlexMotion32.dll that I could not find? Or any other way to configure the encoders within LabView?
    I appreciate any ideas and thank you for taking your time reading this.
    Best,
    Frank.
    Attachments:
    Motion config 1.JPG ‏31 KB
    Motion config 2.JPG ‏75 KB
    Motion config 3.JPG ‏86 KB

    See attachment.
    Attachments:
    Encoder Counts.JPG ‏71 KB

  • How to read encoder RPM

    I need to be able to read the RPM of an encoder.  I am using a 4096 step per revolution encoder with a UMI-7764 connected to a PCI-7344.  Looking to measure speeds up to 500 RPM.  I have seen a few other places where people have asked to do this but have found other solutions.  Due to a large installed base of multiple systems (around 40), I cant change the the hardware configuration.
    Specifics:
    Encoder 4096 counts per revolution wired to encoder input (A,A-,B,B-)
    Max speed 500 RPM
    NI Motion card PCI-7344 /w UMI-7764
    LV 8.5 and 10
    I made a few attempts to measure number of counts in a unit of time but nothing remotely accurate or stable resulted.
    Thank you
    Any help is greatly appreciated.

    Hi Indicator,
    This will likely involve you using the Read Position.flx VI (more info about it in the Context Help or the the Online Manual). I think your idea of measuring the difference in counts versus the change in time would be the way to go. Do you have any screenshots you would be able to share on your initial implementation?
    You mentioned other places where people have asked about this, what other methods did they use?
    Best Regards,
    Nathan B
    Applications Engineer
    National Instruments

  • READ Counts/Steps per Revolution value from Max into LV?

    Greetings,
    I'm new to LabVIEW Motion, and was wondering if there is a way to poll the MAX settings for "Stepper Steps per Revolution"  from inside a LabVIEW VI.
    I believe I have found a function that allows you to programmatically set (or perhaps over-ride) the MAX setting - "Load Counts/Steps per Revolution". However, after traversing the Motion Control function palettes more times than I would prefer to disclose, I can see no equivalent function to READ the current settings. This doesn't seem like it should be an obscure function -- am I missing something obvious?
    My application will potentially run on several different hardware configurations. The Stepper Steps per Revolution will be set-up in MAX by a technician when each system is installed. I was hoping the "per-axis" settings for this parameter can be retrieved, displayed, and used for scaling calculations in my LabVIEW application. Is there any way to query MAX for this parameter setting?
    Thanks in advance.  
    D.
    www.movimed.com - Custom Imaging Solutions

    As described in this article in the NI knowledgebase, it's not possible to read this parameter in LabVIEW. As you have already found out, you can set it but not read it with a vi, so if you need to know this value in your program, you need to set it there (e. g. read it from a custom configuration file).
    Kind regars,
    Jochen Klier
    National Instruments

  • How do you convert the encoder counts to RMP of the motor using a myRIO in LabVIEW?

    My intent is to gain hardware interfacing and general Labview experience. I am using a myRIO to control a Pittman 8222 34V Brushed DC motor (Motor Specs).
    I recently created a code to control the angle of this motor using PID, which was visually implemented using the black disc with a white tick mark on it (see attached picture: "IMG_2523"). 
    I now want to control the speed of this motor againg using PID, but I am not sure how to properly convert the encoder counts to RPM of this motor. I have attached 2 screen shots of my block diagram and my front panel for reference ("Capture" and "Capture2"). In the front panel picture, you can see my "actual" speed of the motor is a very choppy signal when it should theoretically be a flat line. To get the RPM, I currently use a shift register to store the current count value (which I converted to deg, then to radians), and then subtract the previous run's value, then divide by the while loop sampling time (10 ms). This would give me rad/s, which I then wrote a subVI to convert it to rpm. 
    Any help would be greatly appreciated, thanks. 

    Hi,
    One thing you could try doing is verifying that the conversion from rad/s to rpm is working correctly. 
    This tutorial might also be helpful. It's not using the same hardware that you are, but goes through the general steps using PID control. 
    CompactRIO Motor Control Basics Tutorial: http://www.ni.com/pdf/labview/us/compactrio_motor_control_basics.pdf
     

  • Average my data per revolution

    Hi, I have a LV program that acquires simultaneous data. I have crank angle data from a shaft encoder and a voltage reading. To make things simpler lets say, for every 1 degree crank angle (CA), I have 1 voltage (V) reading - so that’s 360 data points per revolution. LV records data all the way from 0 to 359, then returns to 0 for the next revolution.
    My data goes something like this:
    CA          V
    0              2
    1              3
    2              5
    3              5
    359         10
    0              3
    1              2
    2              4
    359         12
    0              1
    1              4
    ...            ...etc
    Is there any way I can rearrange my data so that it gives me the revolution data side by side so that it can be average, so for the above it would be:
    CA          V (rev 1)               V (rev 2)               V (rev 3)               V (average)
    0              2                              3                              1                              2
    1              3                              2                              4                              3
    2              5                              4                              ...
    3              5
    359         10                           12                                                           ... etc
    If it cannot be average in labview – that is not too much of an issue since I could easily just do it in excel too. But, I need the data side by side at least. The crank angle interval does not change per revolution.
    Many thanks in advance.
    Notay

    Hi,
    I'm reading into your post that your data is saved in a text file. 
    You could store it in an array, changing the column index every 360th point.  Then you can average it and put that value in the final column.  The first column would be the degree value. 
    Also, you can use the size of the array function to get the number of columns, subtract one for the degree column, and use that size to compute the average.
    Mark Ramsdale

  • Erroneous reading of Counter

    Hi,
    I have a Pentium 4 machine that has a 1.8GHz processor speed with 1GB RAM and I am using PCI 6221: M-series card
    I am trying to measure the speed of a small motor running at/around 20 RPM along with some analog signals. I clubbed the analog signals into one task. But I am somehow unable to read the speed properly. It is giving erroneous values.
    [Note: The counter sees only two pulses per revolution]
    I am attaching the entire program.
    Help would really be greatly appreciated!! If you want to make any changes and upload it, that would be great!!
    Thanks a lot!!
    UBAP.
    Attachments:
    ap1.vi ‏146 KB

    I'm afraid I don't quite understand your application. 
    You said that you're using an analog input to measure the RPMs of a motor
    running at 20RPM and then described a problem with the counter task.  I'd
    be happy to help you, but if you could break your application down into smaller
    parts I would appreciate it.
    If the analog input is reading incorrect values I encourage you to use the
    Measurement and Automation Explorer test panels ensure that your card is
    connected properly and reading good values.  I also recommend you to do
    the same for your counter input depending upon what exactly you're using it
    for.
    A number of examples ship with LabVIEW that demonstrate how to setup analog
    input and counter tasks.  You can find these in the Example Finder (Help
    >> Find Examples)
    With a little more information about your application and details about what
    each acquisition task is trying to accomplish I'd be happy to point you in the
    right direction.
    Elijah Kerry
    Senior Product Manager, LabVIEW
    Follow my Software Engineering for LabVIEW Blog

  • Measurement error in reading Encoder Pulses

    I am using PCI-6601 card to read a Linear Encoder which gives 2000 pulses per mm of distance.The accuracy of the Linear encoder is 2Microns.In my application I am measuring a distance of 7mm.But the card is reading with an error of 30 to 50 Microns error.We had checked up all the factors related to mechanical and Encoder.In fact the same application was earlier working with Advantech Encoder card which has provisons to connect the A,B,A Bar,B Bar inputs from Encoder.There was an accuracy of 0 to 5Microns.But the application was replaced with NI Card because of the continuous problem of the Digital I/O Card used from Advantech.
    Mail me the possible causes and also the troubleshooting procedures for correcting the above problem

    Hi,
    What I think is happening is there might be some noise on your signal lines. The PCI-6601 counters are capable of detecting a pulse as small as 20ns. If the Advantech card can't detect pulses at that small a resolution, it might be ignoring "noisy" pulses that shouldn't be there. Are you reading more pulses than you should be or less?
    There are a couple things I might be able to suggest to clean up your signal. The counters support several different encoder modes. Try using X4 Encoders. An X4 encoder counter increments or decrements on each edge of channels A and B. Whether the counter increments or decrements depends on which channel leads the other. Each cycle results in four increments or decrements. I believe this X4 mode is more noise resi
    stant than the standard mode.
    Another thing you might want to consider is applying a filter to the input signals (debounce or deglitch filters). Each PFI line coming from the I/O connector can be passed through a simple digital filter. The filter operates off a filter clock and a fast internal sampling clock. It samples the signal on the PFI line on each rising edge of the sampling clock. A change in the signal is propagated only if it maintains its new state for at least the duration between two consecutive rising edges of the filter clock (one filter clock period). The frequency of the filter clock determines whether a transition in the signal may propagate or not.
    6601/6602 User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/DD0DBB6404BC139886256721007CF16D?OpenDocument&vid=niwc&node=132100_US
    Hopefully one of these suggestions will do the trick. Have a good day.
    Ron

  • Need help for encoder count program !!!!!!!!!

    I am a new labview user.
    And i am trying to complete a project for my course.
    For a quick background on what I am working with, I am using a NI PCI-73566-Axis Stepper/Servo Motion Controller for PCI, NI UMI-7764 Series, NI USB-6009 and a IDEC SC1B Rotary Encoder.
    I am try to design a encoder count program and a new program to convert the encoder signal to RPM.
    But I just don't know where should I start? How can I get the same block diagram like P11 in the attach file?
    Please check more detail from the attach file.
    Attachments:
    P11.jpg ‏127 KB
    P8.jpg ‏149 KB
    P15.jpg ‏141 KB

    Hello,
    The two objects on the block diagram are DAQ Assistants and can be found under Functions»Measurement I/O»NI-DAQmx. From what I can gather, this is acquirign signals that you should have connected to the USB-6009.
    -Zach
    Certified LabVIEW Developer

  • Encoder counts to controller - error

    Hello everyone,
    Could someone please help me with this LabVIEW program? I thought I was near complete with finishing up this project, but have encountered problems while executing the program with hardware. I am under a very close deadline, so any tips or advice is very much appreciated. 
    About the program:
    I have a sub panel that represents an x-y stage where a mouse cursor navigates about. The x-y stage is controlled by two actuators, and a mouse cursor's movement within the subpanel will allow for the actuators to move about.
    There are three different cases (case structure):
    0: Do nothing
    1: Update mouse coordinates (x & y coordinates are displayed in boxes titled "Local Mouse Coord")
    2: Display absolute position (x & y coordinates are displayed in boxes titled "Encoder counts")
    My program currently works so that the mouse coordinates (in pixels) are updated and displayed ONLY when the cursor is within the panel's bounds. I did this by implementing the In Range and Coerce Function.  
    Screenshots of my current sub panel and block diagram are in the attachments below. 
    (Note: Coord to Encoder on the Front Panel is supposed to be at 500 to attain encoder counts) 
    I have two axes where one axis represents x and one axis represents y. These axes are controlled by actuators connected a Newport MM3000 Motion Controller. 
    Once I had my program running and the controller was turned on, the program would only execute partially for Case 2 (encoder counts). 
    Moving the mouse cursor up and down within the subpanel allowed for some movement on the actuator for axis 1 
    Moving the mourse cursor left, right, and diagnol caused an error on the controller called "Bad Command"; there was no movement on the actuator
    Below is a zoomed in version of my Case 2: 
    The front panel and block diagram for "IEEE Write" is below: 
    As you can see in the front panel of IEEE write, 1pa1000 represents a command that will move the actuators to absolute position, where 1 represents the axis number and 1000 represents the absolute position destination (in encoder counts). 
    I know that no one will probably be able to implement this without the hardware. However, if anyone has dealt with similar issues before, could you please lend me a guiding hand?
    I just need to know what I could do to modify my code to elminate the "Bad Command" I am getting from the controller. 
    Many thanks in advance! 
    Attachments:
    Screen Shot 2012-11-08 at 8.12.01 PM.png ‏105 KB
    Screen Shot 2012-11-08 at 8.14.37 PM.png ‏104 KB

    qpt,
    I would definitely recommend contacting the manufacturers of your Newport MM3000 Motion Controller to check and make sure the commands and the command protocol that you are sending the device are compatible with the controller. They might have some more insight as to why you are recieving this error. 
    Regards,
    Leah
    Regards,
    Leah
    National Instruments
    Applications Engineer

  • Camparing encoder count

    hi
    I am reading an encoder and counting the pulses, with a display value which updates every 100ms.
     After a certain interval, the encoder count stops incrementing.
    How can I save the encoder count at one  instant and compare with the count after an interval passes(e.g. 1 second )  to determine when the count stops increasing?

    make a ringbuffer with
    a) a subvi see example somewhere in XY-Graph
    b) a queue
    c) if you have LV-RT using the RT-FIFO
    another way is attached
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    nochange01.vi ‏40 KB

  • Line count per organizational unit

    We maintain information about the user, phone association and organizational unit (OU) in DC directory. We need to know total line count per OU, i.e 200 phones for division 1, 500 for div 2, etc.
    I can get the phone list from AXL/SOAP or decicelistx (it is CCM 4.1). Both of them give me phone desc, MAC, extension, IP, etc., but I can't get the OU associated with that user. Is there a way to retrieve user's OU as well or do I need to pull it via LDAP against DC directory?

    getUser (as well as addUser/updateUser) actually accesses the DC directory.
    Direct ldap access is also possible though. There's just one consideration when choosing the technology: with CCM 5.0 and above there's no DC directory anymore so (although then you can send a sql request via AXL which is more efficient than getting users via AXL though).
    So I guess unless you need seamless upgrade (only changing the URL and http to https) when upgrading CCMs, you're better off using ldap.
    Keep in mind though, you will need a link between phones and users to make this work.. or if you use extension mobility, you need to look up the user device profiles associated with each user then look up the lines on those profiles (using an sql query via axl.. this translates almost 1:1 to versions 5.0+) to get the line numbers.

  • Record count per page , total record count per report in BI Publisher

    hi,
    In Oracle BI Publisher tool , can you please tell me how to display total record count of a report ? as well as how to display record count per page ?
    Thanks for your help
    Regards
    Gayathri

    check inbox. forwarded the updated template

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • How read data from *.LB File in LabVIEW?

    Hi dear specialist,
    How I can read data from  *.LB File in LabVIEW?
    Thanks` Hovo

    Thanks Ben, but when I open it as datalog file` comes following error:
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Possible reason(s):
    LabVIEW:  File datalog type conflict.
    C:\Documents and Settings\Home\Desktop\a.lb
    Here is an example of lb file (a.lb), and here is a VI for read datalog file(Simple Temp Datalog Reader.vi)
    What means this error?
    How I can read a byte at a time?
    Attachments:
    testForLB.zip ‏101 KB

Maybe you are looking for