LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 200010 occurred at DAQmx Read

Hello,
 
I keep getting the error 200010 occurred at DAQmx Read saying that finite acquisition or generation has been stopped before the requested number of samples were acquired or generated.
 
I created a task and am using DAQmx Read to read the strain from the channels. I have chosen NChan, NSamples 1D WFM. I am not sure why I keep getting this error or how to fix it.
 
I have attached my code just in case.
 
Do you have any suggestions?
 
Thanks
Jena
0 Kudos
Message 1 of 5
(3,764 Views)
the way you have created your task is not visible in the vi (sits in the DAq assistant, or MAX).
could it be that you have set a very low aquisition rate, and therefore the aquisition has timed out before finishing ?
to check you can wire (-1) to the timout input of the DAQmx read vi.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 5
(3,762 Views)
I set the timeout to -1, i still got the error so I increased my rate to 10K from 1K. It appears that this might have worked.
 
Thanks
Jena
0 Kudos
Message 3 of 5
(3,759 Views)
Hi Jena,
 
Although you have seemed to solve the error problem, I took a look at the code you posted and wanted to make some recommendations.  First I would like the mention that the error you were receiving is normally associated with errors in buffer size.  By increasing the sampling rate, you have allowed your system to sample at a faster rate into the buffer so there are more available samples to read out of the buffer memory into the PC. Therefore, you have overrun the timeout problem that you were receiving. 
 
In addition, I noticed that you are reading your task directly in the loop and never closing out the resource.   It is good programming practice to use the Start Task VI outside of the left side of the loop and the Clear Task VI on the righthand side.  Therefore you can be sure that the task is only being started and cleared once.  Here is a link to a very useful tutorial about data acquisition problems that you might want to read through.  There are examples in here about how to use those above mentioned VIs. 
 
Also, you could look at some of the example programs that are available in the NI Example Finder.  To access these, go to Help>>Find Examples. Then in folder directory, navigate to Hardware Input and Output>>DAQmx>>Analog Measurements.  Then according to what you are measuring, there are data acquisition examples available.  I hope this extra information helps!
 
Regards,
Vanessa L.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,729 Views)

Thank you for the additional information!

Jena

0 Kudos
Message 5 of 5
(3,715 Views)