Hi Baskar,
First off, what you are trying to do would probably be best accomplished by using counters to create a finite pulse train (
Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Generating Digital Pulses).
Each finite pulse train will require the use of 2 counters (one to
create the train, one to gate it), so that means ideally you should
have 4 counters available, but you don't have that many on the 6722, so
you might be able to use a square wave on the AO channels, but it will
not have quite the accuracy that you could attain from the counters.
There are already existing examples that can show you how to generate a
typical waveform from an analog output. You can find those
examples here:
Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Analog Generation > Voltage > Cont Gen Voltage Wfm-Int Clk.vi
. This example can show you how to properly create an
Analog Output on one channel. Since you are trying to use
multiple channels you will need to use two of the Waveform Generation
VIs and build those two waveforms into one waveform and then write that
waveform to your board.
The buffer that you create will automatically regenerate.
Therefore you can have it stop by using the iteration count in the
while loop and stopping the signal after x number of seconds.
Ideally you should use the counters to generate digital pulse trains,
but this technique should help you to get something approaching what
you are looking for.
Regards,