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