Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Digitally triggered analog output waveform which changes at every trigger

Hi all,

 

I need to output an analog waveform triggered by a digital TTL input trigger.  The analog waveform that is output must be changed at every trigger.  The number of samples in the waveform is fixed.  Every cycle of the analog waveform is known in advance.

 

Hardware is M-series 6221.

 

Any ideas if this is possible with the Mseries card?

 

Thankyou,

Ibboh

0 Kudos
Message 1 of 4
(3,196 Views)

Hi Ibboh,

 

This is an interesting question.

 

This could be possible, however it will be software timed so the timing and determinism will not be completely accurate.

 

I'd like to clarify a few points:

 

You would like to change the analog output every time a digital trigger changes state. Would you like the channel to change or the waveform to change on the same channel? Will the waveform be on the same Analog output pin?

How frequently will the digital trigger change?

How quickly will you need the output to respond to the digital trigger?

 

Kind regards,

James O'Neill - Applications Engineer - National Instruments

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

Hi James,

 

It should be the same channel and the same output pin.

The digital trigger is fixed at a value between 20 and 100 hz.

The output must trigger immediately off the digital trigger and output data at 100ks/s.  The waveform length is 1/10th of the time between triggers so there is time for the waveform to change.

 

I've managed to get something working but wonder if there is a better way.  

 

I have a while loop containing an indexed waveform array which goes into a 1 channel n samples waveform daqmx control followed by a daqmx start.  I then repeatedly query "is task done" before stopping the task.  This whole loop must complete before each new trigger.  It seems to work at the speed I need but I wouldn't be able to go faster.

 

As always with Labview, I'm sure there must be another and better way.

 

Cheers,

Ibboh

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

Hi Ibboh

 

Could you upload the code you have writen?

 

James

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