Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

TTL trigger AO waveform sequence

I have what seems to be a fairly simple task. I need to create a repeated AO sequence that is controlled by TTL signals. This sequence needs to be repeated indefinitely. The AO is a  waveform (voltage ramp) after seeing the first trigger, then resetting the voltage after seeing the second trigger. I have a program using DAQmx that comes close, except it misses every other trigger sequence. My program is the following: create a channel, clock source, then a while loop with the first trigger config, AO write (ramp), start, wait, stop, second trigger config, AO write (reset), start, wait, stop. I also create waveforms for each (ramp and reset).

Thanks for your help.
0 Kudos
Message 1 of 4
(3,127 Views)
Hello yb1,

I was able to create a task that performs a sequence of triggered analog generation tasks using the DAQmx VIs.  It sounds like my task is very similar to yours, except for the fact that I only configure the start trigger using the DAQmx Start Trigger VI once, after I configure the sample clock and before I enter the while loop.  Besides that, I used the same implementation as you, with two write-start-wait-stop sequences in while loop.  Take a look at the block diagram of the attached program (written in LabVIEW 8.0) for more of an explanation.  You'll want to be careful when using waveforms to configure the sample clock as I did, because if the waveforms do not have the exact same parameters, creating a common timebase and buffer for them using the DAQmx Timing VI might cause unpredictable behavior.  I hope this helps!

Regards,
Travis Gorkin
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 4
(3,109 Views)
Hi, Travis,

Thanks very much for your help. Your VI works for my application. It seems that my second trigger configuration inside the while loop was messing things up.

Is there a way to use an independent clock for each of the two output waveforms? (A waveform-generated clock for the 1st waveform and the board's internal clock for the second waveform, for example.)

Thanks,
Chad
0 Kudos
Message 3 of 4
(3,100 Views)
Hello Chad,

Unfortunately, there is no way to perform two independent hardware-timed analog output tasks using the same DAQ device.  You would have to use two separate DAQ devices to perform an operation like that.

Regards,
Travis G.
0 Kudos
Message 4 of 4
(3,079 Views)