LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AI scanning order

Hi  Raghunathan,
 
Thank you for posting your code. Upon examining it and running it, I see that the timed loop occurs at every 50 ms. Could you reiterate how you were getting 350 ms delay before? As fo the reason why you are getting 50 ms, is because you have wired your counter source to be the AI sampling clock (2.5 kHz) and told it to fire after 125 counts, that is 125/(2.5 kHz) = 50 ms. Therefore this is expected behavior. Note that there is a difference between the sample clock and the convert clock. Although the convert clock is not exactly 17.5 kHz, the idea is correct.
S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 11 of 12
(585 Views)
I think I have solved the issue that was causing the additional delay ( or shift ) in the continuous data that was being acquired.
 
If you look at the VI that I had enclosed, you will notice that I have done as below :
 
- I had configured the Timing Source to fire the Timed Loop once it had acquired 125 samples.
- Not stopping there I had also passed on the same value of number of samples to the DAQMX Read VI within the Timed Loop.
 
All I did was to remove the "125" value that was wiired to DAQMX Read and instead wire a "-1" thereby making it to read the "All Available Samples " .
 
This small change has worked very well and now there is no shift in the data being acquired :  be it 1 sample / channel inside a 50ms Timed Loop  [or] 125 Samples @ 2.5kHz with a Hardware Timed loop.  
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 12 of 12
(562 Views)