01-06-2006 08:49 AM
I want to continously sample analog inputs (AI0-4 RSE, AI5 Differential [working on the diff. part too]), and set a trigger so that X ms after AI3 > 4V, a waveform will be generated on AO0 (continously), Y ms after AI4 > 6V, I want a one-shot waveform on AO1. After Z ms of AI3 < 2V, the waveform on AO0 will be stopped, not affecting AO1's output in any way.AI's sampling at 1MS/s, AO's are generating at 10KHz, and the AO waveform is ~ 100 samples long (if that)X, Y, and Z may be up to 20,000 (20 seconds later)(Items italicized are pickable selection boxes)My AO's are digital (for now), but I want to synchronize/trigger them off AI's so my current AO waveform is just a series of 0/5 pulses.
Start the AI acqusitions and AO at a "quiescent value". After each read from the AI buffers, I use LabView's Threshold vi to find "when the trigger was met", and store that as T0. When T0+X < AO buffer size, I AO Write and AO Start the waveforms (with left-side padding in an attempt to synchronize the tasks) on the appropriate channels.AI Buffer size= 8K, AO buffer size=1K (though my AO waveform is ~180 samples long).
01-09-2006 03:35 PM
Wow, that's quite an application! I'm pretty sure everything you want to do is possible, but it would require multiple DAQ devices and some pretty creative programming.
First off, to make analog output hardware-timed from an analog input trigger, you will need to use the Analog Comparison Event. The High-Speed M Series devices have 1 analog trigger, so you will need an additional device for each trigger. Some of your triggers (such as stopping the analog output) may not be as high-priority (in terms of minimizing jitter), in which case you could do some of this triggering in software and save yourself a DAQ card. If the X,Y, and Z values are sufficiently long enough, you could reconfigure the trigger instead.
As stated here, you will not be able to do continuous analog input and use that same line to trigger. The continuous analog input and the trigger will have to be separated.
To have the AO stop at a given time, you will have to use a Pause Trigger. This will require another analog trigger. Using the DAQmx Trigger Property Node, you can pause the output of your waveform much like you would pause the input of a waveform on an AI task. When the trigger condition is satisfied, the waveform will be output; when the trigger condition is not satisfied, the analog output pin's value will not change.
To have the delay between receiving the analog input trigger and beginning the analog output, use the DAQmx Trigger Start Delay Property Node.
Take a look at this article for general synchronization knowledge.
01-10-2006 07:12 AM
Excellent. Thank you!
I also have an E-Series DAQ card in the computer; would it be possible to use that card for triggering, and the M-Series for AI/AO? Would I have to apply the same signals to both cards, or can they be routed in software/driver/rtsi/???
To have the AO stop at a given time, you will have to use a Pause Trigger. This will require another analog trigger. Using the DAQmx Trigger Property Node, you can pause the output of your waveform much like you would pause the input of a waveform on an AI task. When the trigger condition is satisfied, the waveform will be output; when the trigger condition is not satisfied, the analog output pin's value will not change.
01-10-2006 12:25 PM
Solution: AI Start Trigger.vi will trigger all of the analog in channels. Thus, there is no simple hardware solution that can do analog in triggered and analog in continuous on the same DAQ device. However, this task can be easily accomplished by using two DAQ boards. One DAQ board can do the analog in trigger and another DAQ board can do the continuous analog in.
It doesn't look like I can't use an Analog Comparison Event to start the AO while doing continuous AI (just can't have eg 4 channels AIcont & 2 channels AI Trig) -- maybe with the DAQmx Signal Routing to go to the counter and the counter to be the AO Trigger; could you elaborate?
Thank you,
Thor Johnson
01-10-2006 01:35 PM
01-10-2006 01:37 PM