Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ 6024E Synchronization of Analog Output with a Gating Pulse

I am using the NI-DAQ API's in VC++ environment, to output X, Y Voltages to analog ports. Just after the output of these, I start a General purpose counter to count number of digital pulses, the gate pulse being generated by an internal 20MHz time base and fed to the counter. (Used the example STCsingleBufEventCount.c ). The task on hand now is to synchronize the analog voltage output with the Gating signal. I would like to output the analog voltages when the Gating signals leading edge occurs. How to detect the Gating signal and issue the API command AO_Update (iDevice) for writing the analog voltages simultaneously.
0 Kudos
Message 1 of 3
(3,472 Views)
Hello;

To synchronize both operations you will need to use either the counter gate signal as the AO update signal, or the other way around.
To accomplish that in VC++, you need to use the NI-DAQ dll function named Select_Signal, and choose the parameters acording to which signal will be leading both tasks.
For more information about the Select_Signal NI-DAQ function, refer to the NI-DAQ on line help.
Hope this helps.
Filipe
0 Kudos
Message 2 of 3
(3,472 Views)
Thanks for the info... I successfully implemented this, your suggestion was really helpful

MOHANDAS
0 Kudos
Message 3 of 3
(3,472 Views)