05-28-2011 09:34 AM
Hy,
I am acquiring an analog input and a signal from an encoder so I have a xy graph with analog input vs rotation. I have noticed that in order not to have duplicates of the values of the rotation I have to reduce the sample rate(the same for the 2 signal as they are synchronised)as much as the speed I want to measure is low. The problem is that I have some duplicates the same and I don't know if it's normal that for each speed i have to change the sample rate. I tried to use douplicate count prevention but it doesn't work. I attache my vi.
Thank you guys in advance!
06-03-2011 09:30 AM
Hi,
I suggest you to take a look to a cauple of example, merge theme properly and route the AI sample clock externally to the counter sample source pin.
A first example shows synchronized acquisition between a digital channel and an analog input channel, very similar to your application (but with a digital channel instead of a counter).
To find him:
1. In LabVIEW, navigate to 'Help'->'Find Examples' from the main menu.
2. In the 'Browse' tab, and browsing 'According to Task'
3. Navigate to 'Hardware Input and Output'->'DAQmx'->'Synchronization'->
'Multi-Function'
4. Find example 'Multi-Function-Synch AI-Read Dig Chan.vi'
A second example shows how to measure encoder position with an external clock.
To find him:
1. In LabVIEW, navigate to 'Help'->'Find Examples' from the main menu.
2. In the 'Search' tab type 'Encoder' within 'Enter keyword(s)'
3. Find example 'Meas Angular Position-buffered-Cont-Ext Clk.vi'
You could properly merge these VIs and export AI sample clock externally to the counter sample source pin.
To export the clock you can read this KB:
KB - How to Export the Internal Analog Input Sample Clock
http://digital.ni.com/public.nsf/allkb/3A7F1402B2A1CE7686256E93007E66C0?OpenDocument
I think that this solution should work.
L