Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite generation with continuous acquisition

Hello,

 

I am trying to set up an environment where I send 3 data channels over an analog output task to a USB-6434 DAQ. This data is changing constantly, so a continuous generation does not seem like an option. While sending this data, I am monitoring it on 3 analog input channels, and I am keeping track of a position signal through a counter linear encoder input. This position must be accurate, so the counter input channel may never stop. The analog input channel should also be continuous due to some voltage glitches I found when constantly stopping and starting the analog input channel.

 

The problem I'm getting is that output and input data is not synchronized at all. All writing and reading is done on the ao/SampleClock, but due to software delay, I always have an undefined amount of samples delay between writing and reading. What is the best way to keep everything synchronized?

 

I have tried a lot with making channels finite instead of continuous, and determining the lag from the data I receive, but this is not reliable enough.

Thanks in advance!

0 Kudos
Message 1 of 2
(4,013 Views)

 Hi, I'm Nick, AE at NI.

 

Have a look at this article. It's made for LabVIEW, not Measurement Studio, but it should give you some new ideas about timing in Data Acquisition. http://www.ni.com/product-documentation/4322/en/

 

It can also help to have a look at some examples. Here is the list: http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/daqmxexamplesnet2008/ Search for "sync" on the webpage.

 

Hope it helps

 



----------------------------------------------------------------------------------------
Everything has an End, and you get to it only if you keep on
-E. Nesbit
0 Kudos
Message 2 of 2
(3,974 Views)