Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Pretriggered DAQ Stop

Hello,

 

1.  I am using a pretriggered DAQ task (PF Line on a 9178), to record analog samples with a 9205.

2.  I am only collecting a finite number of samples.

3.  I want to do this over and over again for all of eternity.

 

So here is the question.  My read task is in a while loop (hence eternity).  I want the user to stop the program periodically, preferably with a stop button.  What is a clever way to let the user stop the program with a button, without triggering the task again.  FYI, I get an error if I set a timeout for the DAQ read.  I have attached my code.

0 Kudos
Message 1 of 2
(2,972 Views)

I suggest using DAQmx events.  The "done" event should be generated when the last post-trigger sample is acquired.  It might look something like this:

 

DAQmxAIRestartsWithDoneEvent.png

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 2
(2,956 Views)