10-10-2012 01:44 PM
I am using LabView 2010 with DAQmx and a USB-6216. I am looking for an efficient way to acquire analog input based on a digital trigger, inside a loop. The Example VI "Acq&Graph Voltage-Int Clk-Dig Ref.vi" is a good start, but I want to do that continuously, based on digital triggers that are arriving at a high rep rate. Thanks for any suggestions.
10-11-2012 09:57 AM
Hi metro,
There is another example Con Acq&Graph Voltage-Ext Clk-DigStart.vi
In that VI you need to change the source for the clock from external to internal, and it will be basically the same example, but acquiring the data continuously.
Regards,
10-11-2012 10:47 AM
Hi Steve,
Thanks for the reply. I think that VI acquires continuously after recieving a digital trigger. What I want is a little different - I want to recieve a digital trigger, and then acquire a finite number of analog input samples. And then repeat this when each subsequent digital trigger arrives, until the user stops the VI.
10-12-2012 09:43 AM
Hi metro,
You can actually browse the examples from (Help > Find Examples > Hardware Input and Output > DAQmx > Analog measurements > Voltage) there is also the example called "Acq&Graph Voltage-Int Clk-Dig Start.vi", in its information box you can read :"Description: This example demonstrates how to acquire a finite amount of data (Waveform) using an internal sample clock, started by a digital edge." if you need an external clock in your application you can tweak the example and start your project with it. Just as an extra note, remember to save the examples with other names when modifying them to keep them intact for future use.
Eric NI
10-12-2012 10:13 AM
Hi Eric. Yes, that VI is what I am starting with. But that VI is for a single digital trigger and a single data acquisition. I need to repeat this at a high rep rate. For example, say I have digital triggers coming at a rate of 100 Hz, and for each trigger, I want to grab a few milliseconds of analog input data. I could put the entire VI inside a While Loop, but it seems like there should be a more efficient way to implement this. I don't think any of the Exmaple VIs show a good way to deal with multiple digital triggers.
01-24-2017 12:20 AM
Did you ever find a solution to this? I have the exact same requirement.
It appears that if I try to repeatedly initialize, wait for triggers and acquire all in a while loop, it cannot keep up with the triggers.
01-25-2017 08:17 AM
Hi Jtbr,
The thread you replied to is around 5 years old- you may find that your question gets better visibility if you start a new thread for it. You might also have better luck posting in the forums dedicated specifically to working with DAQ, rather than the general LabVIEW forums.
Although you will likely get better and more in-depth answers there, I would recommend you look into retriggerable tasks- they're designed to do what you're describing, and depending on the hardware you're using, may be a built-in function that's available to you.
01-25-2017 10:29 AM
I'm using a NI USB 6210. I was able to find a solution here: https://forums.ni.com/t5/Multifunction-DAQ/External-Trigger-USB6210/td-p/3190024
01-25-2017 12:50 PM
@Jtbr wrote:
Did you ever find a solution to this? I have the exact same requirement.
It appears that if I try to repeatedly initialize, wait for triggers and acquire all in a while loop, it cannot keep up with the triggers.
Unfortunatly you need an expensive X-serie daq to have retriggerable inputs. As you said you will be limited with the USB-6210.
What I did with an USB-6003 (not sure of the specific model):
Now with an USB-6341 X-Serie DAQ:
Ben64