From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Some or all of the samples requested have not yet been acquired?

Hi,

 

I'm running the labview codes (8.5) on Mac platform. The Daq part number is USB-6211. Here are more details:

 

Mode: differential, continuous sample

Samples per channel: 250,000

Sample rate: 250 kHz

Channel: A1, A9

 

The data acquisition goes well in the first hour and suddenly it shows error-200284, Some or all of the samples requested have not yet been acquired. The timeout is much higher than samples / sample rate, which is 100 s. Is anyone can help me with this? I attached the labview codes. 

 

 

0 Kudos
Message 1 of 11
(3,620 Views)

Are you running this using the Run Continuously button?  If so, it's not ideal to be constantly creating the task and then destroying it.  I'm not certain that's the cause of your error, but if you are using run continuously, try using a while loop instead.  Put the DAQmx Read inside the loop, and everything else outside it so it only executes once.  Run it normally instead of continuously; the while loop will keep it running.  Add a stop button wired to the stop condition of the loop so you can stop it when you want to.

0 Kudos
Message 2 of 11
(3,610 Views)

1. As said, you should not be using the Run Continuously button.  Use a while loop to acquire your data.  Setup the task before the loop and close it out after the loop.

 

2. When you have the while loop, put a wait in there (1 second might be good).  This will help avoid the timeout issue.

 

3. Propagate your errors.  Have the while loop stop on the error or your stop button.  Use the Simple Error Handler at the end.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 11
(3,593 Views)

crossrulz wrote:

2. When you have the while loop, put a wait in there (1 second might be good).  This will help avoid the timeout issue.


The DAQmx Read will act as a loop timer; no other timing mechanism is needed.

 

Adding a Wait is likely to cause confusion.  If the Wait time is longer than the time needed for the DAQmx Read, the DAQ buffer will fill faster than it can be emptied which will eventually generate an error.

0 Kudos
Message 4 of 11
(3,587 Views)

You need to place a loop structure just around the part of the code that should repeat (the DAQmx Read vi and the display attached to it).  Not sure how you are getting the current code to run for an hour but you must be doing something to make it run continuously.  Don't use the Run Continuous button (circular arrow) as others have said.  The other vis that configure and start the DAQ task shouldn't run in a loop.

 

Sounds like you are exceeding your timeout in DAQmx Read. 



0 Kudos
Message 5 of 11
(3,571 Views)

Another thing I just noticed, use the "1 Channel N Samples" of the DAQmx Read since you are only using 1 channel anyways.  This will eliminate the need for the index array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 11
(3,558 Views)

Thanks. Yes, I am effectively running in a continuous mode, meaning the tasks are created and detroyed every time. I also niticed this potential danger previously and that's why I destroyed the task after creating it. I am wondering why this would cause the timeout issue? does this configuration make it unable to create new task or else? The test can last for an hour with no problem which is not enough in this case.

 

-John

0 Kudos
Message 7 of 11
(3,548 Views)

Thanks, 1 sec wait would be too long in my case...but it will certainly avoid the timeout issue. At this point, the timeout issue is not likely caused by low sample rate and high sample numbers. The timetou is set to be 100 s. I guess the task is not built properly such that the Daqmx read is not triggered. 

 

-John

0 Kudos
Message 8 of 11
(3,546 Views)

The problem comes down to constantly creating and destroying a task will likely cause an error in the DAQ and/or its drivers.  This is why we are telling you to setup the task once, acquire your data in a loop, and close the task once you are done.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(3,539 Views)

The problem still shows up I "setup the task once, acquire data in a loop, and close the task once it's done". I did the exactly the same as it described. 

 

Does it matter when I keep the connection between the DAQ and PC on all the time? I saw the green light blink all the time. OR should I clear everything once I finish one data acqusition

 

THANKS.

 

0 Kudos
Message 10 of 11
(3,483 Views)