01-19-2011 02:05 PM
Yes, I understand what you said. However, where to place DAQmx control task (with abort action) to abort DAQmx task and make STOP function? Thanks
01-19-2011 02:50 PM - edited 01-19-2011 02:51 PM
Hi detech,
You could do something like the attached VI, if absolutely necessary. The idea is you want to call the control task with abort in a separate thread of execution, which LabVIEW will automatically make the way the VI is written.
Generally, it is much easier to just use the abort button or read timeout. Note in the attached VI you have to manually 'unclick' the stop button after every press.
Also note the task will return an error when you hit the stop button. This is expected. You can write code to ignore this error, if you want.
Hope this helps!
p.s. If you have any further questions, please start a new post for each new question. We often refer people to previous posts that answer their questions, and this is a lot easier to do if there is only one question per thread :).
William Earle
National Instruments R & D | Staff Software
Engineer | DAQ Software