01-15-2024 11:09 PM - edited 01-15-2024 11:09 PM
I have a USB-6351 and capturing a few analog channels with a digital active-low trigger. The trigger is actually not only a trigger but also a data valid signal, and its duration changes. I would like to process/display only the data when trigger is low (so between the falling and rising edges, thus only when it is indicated that the data is valid). At the moment I am using the trigger to start the capture (start digital edge) but I also use a counter to measure the duration of the trigger low pulse and then use this to set the number of samples. Is there a way to do this without using a counter / setting the number of samples ? Can I stop the capture when the trigger goes high ?
01-16-2024 02:04 PM
Yes, you can do this in hardware. DAQmx calls this a "Pause Trigger" and you'll need to use a DAQmx Trigger property node to set it up. One of the shipping examples will illustrate how. But there's another little catch -- when you do this, your data will arrive in its buffer in a way that *looks* continuous even though you know it isn't. It won't indicate to you when time gaps occur or how long they are. You might want to keep using an extra counter task to provide such info.
-Kevin P