LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After AI start, can I stop it for a while?

I use buffer to read the data from 6025E. After AI read reading some data, can I stop the reading for
a while, then start the AI reading again?
My program sketch:
AI-config --> AI-start-->WhileLoop(AI-read)-->AI-clear
0 Kudos
Message 1 of 4
(3,004 Views)
Hello,
If by stopping the read you mean pausing it, then the answer is yes. Just put the AI Read in a case structure inside the loop, and wire a boolean to the selector terminal. When the true case executes, the data will be acquired. Nothing will happen in the false case, just pass the task reference.
Hope this helps.
Zvezdana S.
0 Kudos
Message 2 of 4
(3,004 Views)
Thanks. I am more concerning the buffer. Even you stop
the reading, will it still acquire data? So the buffer
will overflow in the end.
0 Kudos
Message 3 of 4
(3,004 Views)
Once you start reading with AI Read, even when this VI is done executing, the data will continue to be acquired. Eventually you will get buffer overflow error if you don't read this data.
With DAQmx, you can call DAQmx Stop, to stop the acquisition for sosme time. Then you can just call DAQmx Start again on the same task, and continue acquiring. DAQmx Stop doesn't clear the task, so you can reuse it again.
With the traditional DAQ you don't have this option. When you call AI Clear, it will destroy the reference to the channel and you have to create it again to start the acquisition.
Zvezdana S.
0 Kudos
Message 4 of 4
(3,004 Views)