From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

timeout error. what does it mean?

 

Hi ppl,

 

I have a very simple question. I just dont understand some meaning of the timeout in DAQmx Read VI. What exactly does it mean? "Timeout specifies the amount of time in seconds to wait for samples to become available." So, for example the default time is 10sec. The DAQmx Read waits 10sec and then I can read the information from the DAQ, or what? Because in my program I read the data all the time. If I put this subvi in some external program in the while loop and set in the while loop that every 10msec it reads the data, so will I get the error?

0 Kudos
Message 1 of 2
(3,100 Views)

Hello dimani,

 

DAQmx Read might finish execution under few conditions:

1) Requested number of samples has been acquired to buffer, so DAQmx Read can read them out

2) DAQmx task was stopped

3) There was less then requested number of Samples to Read samples acquired by DAQ board, and specified time elapsed since DAQmx Read has been called. In this case you will receive Timeout error.

 

Let's show possible scenerio when Timeout error might occur. Let's have sample clock 1kS/s, and let's try to read 10k Samples with DAQmx Read, with timeout less then 1s. This settings would lead to timeout error, as we need full 10 seconds to acquire 10,000  samples.

 

If you read continuously, then you might use number of samples per channel set  to -1, which means that you will acquire all currently available data. Or, you might use timeout -1, so you will wait indefinitely until desired number of samples will be available.

 

 

I hope it helped.

Stefo

Certified-LabVIEW-Developer_rgb.jpg

Message 2 of 2
(3,095 Views)