Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggering Analog Output

I am using PCI-6115 board and programing in ANSI C (actually in Matlab).
 
A) I would like to output a specific analog waveform each time when the device receives TTL signal.
I found the NI sample code retriggering_analog_output.llb (http://zone.ni.com/devzone/cda/epd/p/id/5008), however, I need to use ANSI C.
 
Q) Will somebody explain how this sample code work and how I can do the same in ANSI C?
 
B) I got an idea to use SampleClock for that purpose. Here I assume that the samples for AO waveform is 1000 and total 10000 samples (10 waveform)are qued before starting the task.
I thought that...
 1) Send the 1000 pulses of SampleClock to the device
 2) 1000 samples (1 waveform) is generated
 3) repeat 1), 2) in the arbitrary timing.
 
However, samples generated was not equal to the pulses of sampleclock, and what is worse, different number of samples were generated each time.
 
Q) Does anybody know how to control the number of samples generated using sampleclock?
 
Thank you for the attention!
0 Kudos
Message 1 of 1
(2,971 Views)