Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Read error -200278

Hi everybody,

 

I'm currently devlopping an application which necessitates to read continuously a window of samples at a certain rate specified by the user.

For the needs of that application, it is essential to have a trigger for the acquisition and get both pre-trigger samples and post-trigger samples.

 

I've made my application for this acquisition using a state machine having 4 steps:

- 1. Wait for the GPS synchronization to be achieved;

- 2. Init the acquisition once the GPS synchronization is achieved;

- 3. Start the acquisition and acquire the samples whenever a trigger signal appears. and repeat undefinitely this step until a "stop" signal is received from the user;

- 4. Close the acquisition by clearing the task (DAQmx Clear Task).

 

Actually I've got that acquisition step executing all the time only at twice the specified rate (two times slower than the desired rate, Data Acquisition_v4.vi).
In order to fix that issue, and with some recommendations, I removed both DAQmx Start Task and DAQmx Stop Task from step 3. I moved DAQmx Start Task to step 2 and DAQmx Stop Task to step 3 (Data Acquisition_v5.vi).
The application first seemed to work due to these changes (with the correct rate), but only for a few iterations. And after a few milliseconds, I always get error -200278 from DAQmx Read VI.

Could anyone help me with this issue?

 

Additional precisions: my ADC is a multifunction DAQ PXIe-6366.

 

With my best regards,

 

Hervend

Download All
0 Kudos
Message 1 of 3
(4,255 Views)

Hi Hervend! 

 

The 200278 error generally occurs when you try to pull data from the DAQ device before it has started acquiring. Here is a relevant article on the error.

 

Why do I get Error -200278?

 

I downloaded your code, and I'm missing a few SubVIs so I can't really see what's going on when you're configuring your acquisition. However, I noticed you have configured your acquisition for finite acquistion, but you also have an input node in your while loop.

 

I'm not 100% certain on the behavior of the loop here, but I suspect you may be initializing your task with a trigger, but the loop input timing forces the execution of the acquire case structure (DAQmx Read). If this happens before the trigger is received, then you will likely get the error. 

 

Just for troubleshooting purposes, I would recommend you try the acquisition without the trigger. Also, as per the article linked above, maybe try it acquiring in continuous mode. 

 

0 Kudos
Message 2 of 3
(4,246 Views)

Hi Chantastic,

 

Thank you a lot for the link to the article. It has been very useful for me.

I choosed to use the two approaches, depending on the configuration of the application.

 

Best regards,

 

Hervend

Message 3 of 3
(4,209 Views)