Position, Velocity, Acceleration From Single Encoder, With TDMS Logging

I'm still a fairly new user when it comes to Labview.  I started to feel comfortable enough to check out TDMS data logging and I'm kicking myself for not using it earlier.
That said, I am currently reading angular position from an encoder, and estimating it's velocity and acceleration from the sampling rate & encoder resolution.  I'm using an FGV to do all the calculations and I've fine-tuned it to be as accurate as I would like.
What I would like to do is implement TDMS logging that records position, calculated velocity and acceleration with the Log and Read option of TDMS.  I'd like these to be synchronized with the encoder reads, and I would like them to be handled by a single DAQmx Read vi.  As far as I can see though, you can only read the position information from the encoder.  I tried to drill down into the DAQmx Read.vi to create a modified version so that I could eploit the TDMS logging, but the subvi uses a call library function vi that currently is beyond my abilities. 
I've been in MAX and I can't create any additional outputs for velocity and acceleration.  It seems like MAX takes enough information to create approximations from the sampling clock and resolution of the encoder.  Why doesn't it (or if it does, how do I implement it).

What hardware are you using for reading the encoder? I have recently completed a similar project where the encoder was connected to a counter that was triggered by the counter increasing, so that it would only read on new positions, this worked reasonably well and seems like it should work well for your case.

Similar Messages

  • Velocity calculation from qudrature encoder

    Hi,
    I am using Labview 8 with E series DAQ card, and trying to calculate velocity from the Quadrature encoder. I calculate time difference by using Tick Count, and then divide the change in position to the change in time. The problem is that the time difference should be the same as sampling rate or Wait Until Next ms in the attached file, however the time difference is not always the same, which sometime makes spike in the velocity calculation. I would like to know if I have to use the constant number (sampling rate/wait until next) for velocity calculation, or is there any other solution? I don’t understand why the time difference is not the same for different iterations. I would appreciate if somebody can help.
    Thanks,
    Azadeh
    Attachments:
    try encoder.vi ‏46 KB

    Software timed data acquisition is always subject to timing variations due to OS latencies. Both the DAQ operations and the screen updates (writes to indicators) will occur at times controlled in part by the OS and not necessarily synchronized with the loop timing. In addition the conditional execution (Case ..0 compared to Cases 1 or 2) may take different amounts of time - the differences are probably much smaller than the tick count resolution, but there are differences.
    If you cannot do hardware timed DAQ, then try two things: One, put the DAQ in a high priority loop which does nothing but Read the counter and the Tick count and put the data into a queue at the timing rate you prefer. You do not need a separate Tick count function - just take the data from the Wait until next ms Multiple. Be sure to use dataflow so you know whether the tick count was read before or after the DAQ. Put all the calculations and front panel controls and indicators in a separate, parallel loop which reads the data from the queue. It must also have some kind of wait function. A wait of 100-200 ms is reasonable for user interface updates. People cannot respond any faster than that.
    Two, do some smoothing of the data. Any differentiation process, such as position -> time, tends to enhance any noise or high frequency variations. A simple moving average filter may clean up your velocity signal. How much filtering and what type may depend on the intended usage of the data.
    Lynn

  • Selecting data from single table with different condition in single query

    Hi everybody...
    I have one table with col1, col2, col3, col4, col5... as columns.
    I want to select col1, col2, col3 with condition (x=y and a=b and c=d)
    I want to select col4, col5 with condition (x=y and a=b and m=n )
    in single query...
    Thanx for ur help

    Given this data set...
    SQL> select * from oddity
      2  /
          COL1       COL2       COL3       COL4       COL5 A X C M
             1          2          3          4          5 B Y   M
             1          2          3          4          5 A Y C N
             1          2          3          4          5 A Y D M
             1          2          3          4          5 A Y D N
             1          2          3          4          5 B Y D N
             1          2          3          4          5 B Y D U
    6 rows selected.
    SQL>The following query meets the requirements. Of course, the requirements as stated are incomplete. I ahave assumed that we select all five columns if C=D andM=N.
    SQL> SELECT decode(c, 'D', col1, '0') AS col1
      2         , decode(c, 'D', col2, '0') AS col2
      3         , decode(c, 'D', col3, '0') AS col3
      4          , decode(m, 'N', col4, '-8') AS col4
      5           , decode(m, 'N', col5, '-8') AS col5
      6  FROM oddity
      7  WHERE a = 'B'
      8  AND  x = 'Y'
      9  /
          COL1       COL2       COL3       COL4       COL5
             0          0          0         -8         -8
             1          2          3          4          5
             1          2          3         -8         -8
    SQL> Cheers, APC

  • Log GPS time, position, velocity

    Hi,
    I'm using the read gps time, position, velocity.vi and now I want to log this data in a text or spreadsheet file. Is there a simple way to do this? I tried with write to measurement file, but this only handles dynamic data and no string or time stamp.
    Thanks
    Solved!
    Go to Solution.

    a much different take, note the string constant format to anything...
    Attachments:
    test.vi ‏8 KB

  • Counting pulses from an encoder 0-7,5 V

    This is my VI and my signal measurement:
    [IMG]http://i.imgur.com/mfttanz.png[/IMG]
    How can I count the pulses from the encoder with this VI? I want to count it like in this VI:
    [IMG]http://i.imgur.com/xRzz0Lr.jpg[/IMG]
    So that I can measure the angle of a motor-driven frame using a 24 VDc motor.

    You will need some external hardware to clean the signal. The best might be to connect the signal to a comparator with some hysteresis and an output voltage compatible with your counter, typically 0 - 5 V, although some counters only accept 3.3 V.
    The signal you showed in the image on the first post in this thread should NOT be connected to a logic level counter. both the low and high voltages are outside the acceptable range for TTL compatible logic devices and coude damage the counter.
    I just looked at your VI and see that you are using an analog input. That should be fine for digitzing the signal.
    1. I recommend that you switch to a Producer/Consumer architecture for your program. Do the data acquisition in one loop (the Producer) and the calculations and analysis in the other loop (the Consumer). This will let you run the acquisition loop fast enough that you never  miss any pulses.
    2. Your signal is probably clean enough to use a simple comparison to a 2 or 3 V threshold. Then you can count those logical transitions. If you sometimes have more noise than shown in the image you could add some hysteresis to the comparisons or you might need a more sophisticated algoroithm to eliminate spurious counts.
    3. Do you have some means of determining when to start and stop the counting?
    Lynn

  • Configuring separate axis velocity/acceleration within a vector space

    Is there a way to separately configure axis velocity/acceleration when using vector space motion control? My axes motivation are very diverse and I can not simply use a vector velocity/acceleration.

    I guess that your application should not use Vector configuration then. The purpose of Vector Spaces is to group axes and define vector moves, the board will calculate each axis parameters in order to achieve the vector move.
    If you require different velocity and acceleration per axis you might want to try to make up your own Vector algorithm in which for the eyes of the board you are treating each axis independently, but in your software you are actually grouping them. That is, you will configure each axis by its own, and you can do multi-starts and multi-stops. The Position/Velocity/Acceleration will be calculated by your own algorithm.
    Good luck!
    Nestor.
    Nestor
    National Instruments

  • Load data from a file with multiple record types to a single table-sqlldr

    We are using two datastores which refer to the same file. The file has 2 types of records header and detail.
    h011234tyre
    d01rey5679jkj5679
    h011235tyrr
    d01rel5678jul5688
    d01reh5698jll5638
    Can someone help in loading these lines from one file with only two data stores(not 2 separate files) using File to Oracle(SQLLDR) Knowledge Module.

    Hi,
    Unfortunately the IKM SQLDR doesn't have the "when" condition to be wrote at ctl file.
    If you wish a simple solution, just add an option (drop me a email if you want a LKM with this)
    The point is:
    With a single option, you will control the when ctl clause and, for instance, can define:
    1) create 2 datastores (1 for each file)
    2) the first position will be a column at each datastore
    3) write the when condition to this first column at the LKM in the interface.
    Does it help you?

  • Can i use a single ended encoder with a 7344 controller?

    Can i use a single ended encoder with a 7344 controller?

    The encoder inputs of the 7344 are ground referenced. So the answer is yes, you can use a single ended encoder with a 7344 controller. Signal connection should be straight forward.
    If you are using a UMI-7764 for signal connections please refer to the "Encoder Terminal Block" section (page 15) of the UMI User Guide. There are drawings for the signal connections for single ended and differential encoders.
    For the case that you don't have the user guide of the UMI-7764 please download it from this link:
    http://digital.ni.com/manuals.nsf/websearch/AC6FAA69218C9624862567BD0061DDAC?OpenDocument&node=132100_US
    Best regards,
    Jochen Klier
    Applications Engineering Group Leader
    National Instruments Germany GmbH

  • HT2688 Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared librar

    Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared library?

    Was your wife logged into the libray at the time you tried to log in? I have had a similar problem and it was because another user was logged into the library when I attempted to. I got the permission denied banner.

  • Need help with EXS24 "read velocity range from file name"

    I am trying to import 127 drum samples to a single key using the option shown here. The option says "Map to key dropped on and read velocity range from file name". I can find no documentation in the manuals on how to do this. What is the syntax required in the file name to make this work? I need to do several of these imports. The capability is cleary there, but I need help on how the file name should be formatted. My thanks to anyone who can help.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • Is it possible UPLOAD a single printer from an LDT with a lot of printers?

    is it possible UPLOAD a single printer from an LDT with a lot of printers? by using FNDLOAD
    here we can
    download a specific printer definition, we need to follow the below syntax
    FNDLOAD apps/ 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcppinf.lct
    source_printer_def.ldt FND_PRINTER PRINTER_NAME=[printer name]

    Duplicate post -- migrate  printers, types, styles and drivers from an 11i to R12 instance us

  • How to start Flash Media Encoder 3.2 from Flex application with run time parameters?

    Hello ,
    I'm developing the application to stream High Quality video.While streming by default camera/microphone settings the qulaity of streaming is not upto my expected level.I want to stream through Flash Media Encoder.My aim is the user login to the application.Video/audio qulaity details are retrived from shared object stored in the client machine.The login user name only gathered at run time & it will be the streaming profile name to Encoder.Once the the Encoder started the outgoing video will be come into screen to client.Please guide me How to start Flash Media Encoder 3.2 from Flex application with run time parameters(User name as  streaming name) without manually start the FME?
    Thanks in advance.
    Regards
    Sasharyuva

    Hi MarcSaphiron,
    Could you please send the samples?It will be much helpful to complete my
    job within the deadline.
    Thanks in advance.
    Regards,
    Sasharyuva

  • Quadrature encoder with a non-NI board

    I am attempting use an encoder with a non-NI board (Measurement Computing) and I am unsure how to interface the encoder output from the board with LabView. I have the VIs for the board which allow the board to interface with LabView,. I essentially need a VI to decode the quadrature, the ones in the tutorials were not very helpful or insightful.

    Hello Mystery,
    Take a look at the section “Velocity and Acceleration Calculations” in this devzone.  While the article itself applies to CompactRIO, the equations used in the above section can help you determine how to convert the counter output into a velocity measurement. 
    Does the counter value increase when you rotate the encoder in one direction and decrease when you rotate in the other direction?  This is essentially position measurement.  By knowing the number of ticks per revolution as well as the starting position of the encoder, you can determine the current rotation position.  For velocity, there is a little more to the measurement.  The concept relies on taking a counter measurement in a periodic manner.  Then you can use the number of encoder pulses that have occurred over that period of time to calculate velocity.  The document I linked about shows how to convert the number of encoder pulses over a fixed period of time into RPM which can be later converted into angular velocity.  Hope this helps. 
    Regards,
    Browning G
    FlexRIO R&D

  • Reading simulated encoder with 6602

    Hello!
    I'm trying to read quadrature encoder (to be more specific this is an output of the pulse train generator that simulates the encoder).
    In the attached picture you can see how the signal that i'm trying to read.
    I need an advise about the correct filter settings.
    Please also see the attached vi.
    Usefull data:
    Labview 8.2.1
    Capturing device PXI-6602.
    The Encoder is 16384 pulses. (If the reading is x4, i should get 2^16 - 65536 ticks).
    The Encoder has differential outputs, but i've connected only A,B and Z.
    The rotating speed is up to 5000 rpm. You can see in on the picture. (16384*(5000/60)=1,365,333MHz).
    There is no problem to read the encoder with another devices, i have a motion analyzer from Control&Robotics solution and it works great.
    Thank you.
    Elman Izia.
    001.jpg (78 kb)
    Position capture.vi (171 kb)

    Hi Elman,
    The filter clock is used to make sure that your signal has
    integrity and eliminates glitches.  In
    order for signal to be counted, it must remain high for two consecutive periods
    of your filter clock.  There are five
    time bases (5us, 1us, 500ns, 100ns and programmed) that can be used as your
    filter clock.  The programmed clock can
    be created by another counter and this setting will let a signal be counted if
    it is at least twice times the filter period.
    This is a great method to help eliminate errors that can be
    introduced by noise, crosstalk or transmission line effects.
    The TimebaseSrc property is going to select a clock to be
    used as the source.  In your example that
    property is correct, you would want to use the 80MHz clock.  The TimebaseRate property is going to be used
    to divide the clock down to specific frequency. 
    It will divide the master clock down by an integer value and round it to
    get a rate that is as close to the value entered.  I would recommend leaving this number as
    80MHz. 
    The MinPulseWidth property is going to determine the clock
    of the filter clock.  This property is
    going to use the TimebaseRate property to create the predefined filter clock
    settings.  If your signal stays high for
    two consecutive periods of the minimum pulse width, then it will be counted. 
    You need to determine the minimum pulse width that is
    acceptable for your application.  Since
    your signal has a pulse width of about 360ns, you might want to use the
    predefined filter clock of 100ns.
    In short, you are creating a digital filter that will only allow
    a signal to be recognized if it remains high for two consecutive pulses.
    For further explanation, refer to the PCI/PXI–6602 User
    Manual page 3-20.
    http://www.ni.com/pdf/manuals/322137a.pdf
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • Position-Velocity-Time vs Position Profile

    Hello,
    I have a
    question concerning the behavior of position profile and PVT contoured move.
    In the topic
    “Position Profile-Motion Assistant Help file” says:
    “Position
    profile moves give you maximum control over the position of the move …”.
    And in “Position/Velocity/Time
    (PVT)-Motion Assistant Help file” it says “PVT moves give you maximum control
    over the velocity of the move at certain times throughout the move.”
    So, it’s
    correct to say that the position generated by a PVT based contoured move is “less
    accurate” than the one generated by a position profile in respect to the
    original data points?
    If yes, is
    there any way to know in advance maximum position error?

    Hello DJ L,
    The PVT
    examples work fine. I’m using Motion Assistant 1.2.
    I’m trying
    to do a 2D move that have 2 different velocity profiles. I only have XY
    coordinates, the maximum cruise velocity and the maximum acceleration that my setup
    supports. One profile is used for straight (or almost straight) moves and the
    second at a much lower speed in curves.
    I think
    that what is causing my problem is a constraint that is out of range like you
    said. I managed to get a few points to be plotted by Motion Assistant. But the
    resulting velocity profile is unacceptable for this application (see file
    Profile1.png and PVT_Profile1.txt for data). Adjusting the time index by trial
    and error I get a more appropriate velocity profile for my needs (see file
    Profile2.png and PVT_Profile2.txt for data). The constraints for this
    application are:
    - Go to
    the maximum cruise velocity in the least amount of time (given the maximum allowed
    acceleration).
    - Maintain this
    cruise velocity with the minimum variation until the next change in velocity
    profile.
    - The XY
    coordinates defines a cutting path, so distortions in position should be minimum.
    I’m looking
    for a set of equations that could generate data in the PVT format that meet
    this requirements and it should be possible to put this in C++ program because adjusting
    and testing in Motion Assistant application would not be possible. Could you help me in developing those equations?
    The file “data_profile.xls”
    is one real example and contains XY coordinates with the respective move
    constraints.
    Regards,
    Attachments:
    files.zip ‏141 KB

Maybe you are looking for

  • Turning Wireless apple keyboard off.

    This might be a very simple thing to achieve, turning the wireless keyboard off, but I don't seem to find information on how to do it. I have looked on instructions book, which recommends to turn it off when not using it and in old post with no succe

  • ESS Error after imported EA-HR 602

    Hi all, I was imported enhancement pack 2 for single component EA-HR (602) as requested by client to use function "HCM Processes and Forms" according to sapnote below: Note 1024326 - Corrected UI for role HR administrator available HCM Processes and

  • Creating two adjecent groups

    Hi I have some UIelements in group A and some UI elements in group B. I want to display  group  A on left side and group B on right side of the screen. I tried to create a new group C. then I inserted group A and B into group C. I selected layout typ

  • LG ENV 3 503 Service Unavailable Message

    Every so often when attempting to connect to the web on my LG ENV 3 I receive the "503 Service Unavailable" message.  Today I have been getting it for hours.  Is there something going on with the system?  I tried calling 228 and updating my roaming a

  • HT1491 I can't access my itunes account because the security questions it asks have never previously been set up

    I am accessing itunes to purchase for the first time via my PC.  After logging in it asks me to answer two security questions that have never previously been set up with no way of changing them or getting past that point in the log in process.  Any s