07-17-2013 02:24 PM
What is the best way to go about this.
Thanks
Collin
07-18-2013 10:20 AM
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
07-18-2013 10:46 AM
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
07-18-2013 02:39 PM
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:
Or you can register a dynamic event to tell you when the desired number of samples have been acquired into the input buffer:
Best Regards,