LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output entire AO buffer once per trigger

I'm trying to output an analog waveform, using an external trigger.  I'd like to send the entire waveform once, each time a trigger is received.  So I'm setting up buffered analog ouput, and setting the DAQmx Write property RegenMode to Allow Regeneration.  The output works fine once the first trigger is received.  Each time after that, however, nothing.  As I understand regeneration, once the entire output buffer has been written, the write marker returns to the beginning of the buffer, ready to output the buffer again.  Is that correct?

The only thing I can think of is that I'm using a finite number of samples to output in the Sample Clock setup.  I don't want the waveform to be outputted continuously, so that seems to be my only option.

I suppose I could continuously test to see if the task was done, and if so, stop and start the task again.  But that requires a while loop to be running continuously.  Is there no simple way to tell the hardware to output the buffer with each trigger, or am I missing something obvious?

0 Kudos
Message 1 of 4
(3,176 Views)
Oops, forgot to mention that the hardware involved is a 6733 PXI high-speed analog output board controlled by a 8186 RT controller in a PXI chassis.

0 Kudos
Message 2 of 4
(3,175 Views)

Hello eaolson,

As I understand it, you are trying to do write out your buffer each time a trigger is received.  Regeneration is used to have the buffer be written over and over again.  When you use a finite generation with a trigger, you will only get the buffer written the first time.  Regeneration is really only useful for writing a number of sample larger than what you buffer can hold. 

With that being said, what I think would be best is to set up a retriggerable generation.  A retriggerable operation (acquisition or generation) uses a counter as its sample clock source because a counter can be configured to be retriggerable.  Please take a look at this retriggerable analog input example to help you get started.

I hope this helps!

Laura

Message 3 of 4
(3,158 Views)
Ah, the "retriggerable" keyword hadn't occurred to me.  That did it, thanks.

0 Kudos
Message 4 of 4
(3,144 Views)