From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping/resetting a finite aquisition while it is waiting for a reference trigger

What is the best way to go about this. 

 

Thanks

 

Collin

0 Kudos
Message 1 of 4
(2,988 Views)

Hello Collin,

 

Do you mean you are trying to stop the acquisition of the pretrigger samples? What exactly are you trying to accomplish? What hardware are you using? I do not believe there is a way to stop acquisition of pretigger samples but I am not sure if this is what you are referring to.

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 2 of 4
(2,978 Views)

Hello Travis, thanks for replying.

 

I use an infinite timeout on the DAQmx read VI as it is an unkown time between when an "arm trigger" command (which starts the finite, triggered aquisition) and when the actual trigger signal is sent.  In rare cases.. something goes wrong, I will need to "reset" the finite aquisition and return gracefully to the calling program.  What I'am asking is if there is a way to stop the task when the read VI has allready been called and is waiting for the trigger signal.  Hardware is a 9188 with various modules.

 

For example, I could set a finite timeout on the read VI and then query to stop or restart, but I'am afraid I could miss trigger signals with this method.

 

Thanks

 

Collin

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

When the read times out you can discard the error without restarting the task.  As long as the task is still running you won't miss any triggers.

 

However, when possible I prefer to avoid reading unless I know data is going to be there.  

 

 

You can poll the Available Samples per Channel property node:

AvailSampPerChan.png

 

Or you can register a dynamic event to tell you when the desired number of samples have been acquired into the input buffer:

 

EveryNSamplesEvent.png

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 4
(2,969 Views)