Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ 9174 synchronization

Hi,

I am trying to synchronize NI 9214 (Sample rate 2 Hz), NI 9203 (Sample rate 1 kHz) and NI 9223 (Sample rate 20 kHz) using the cDAQ 9174 where NI 9223 is the primary and the other two are secondary.  I have attached snapshots of my VI. I am getting an error (described below) when I run the VI unless I set the same sample rate for NI 9223 and NI 9203.

'Error -200284 - Some or all of the samples requested have not yet been acquired.'

 

Thanks for the help.

VK

Download All
0 Kudos
Message 1 of 3
(2,390 Views)

That error means that you're trying to read data out of the task buffer faster than the task buffer is filling up.   Since your loop iteration rate is driven by the combo of task sample rates & # samples read per loop, I can only guess that you're requesting a block of samples that represents a longer time than the DAQmx Read timeout.

 

When unwired, the timeout value is typically 10 seconds I think.  I'd suspect you're requesting >= 20 samples from the 2 Hz task and the task times out before the next 20 samples arrive.

 

Note: once you solve this, you next need to be careful about keeping all the sample rates and read quantities in sync for the different tasks.  By reading a fixed # samples from each, the duration represented by each DAQmx Read needs to be the same.  Any small discrepancy will accumulate and eventually lead to other errors.   (The duration is given by  (# samples / sample rate).

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(2,332 Views)

Thank you for the reply Kevin_Prince. I will look into the 2 Hz task.

VK

0 Kudos
Message 3 of 3
(2,329 Views)