Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I repeatedly trigger analog output from a pulse train (from CTR0) using C++ and nidaq...it triggers only once instead of repeatedly

I have created a pulse train (out of CTR0). I want this signal to continuously trigger output of several cycles of a waveform. Using Select_Signal to map CTR0_Output to RTSI_0 and then RTSI_0 to ND_OUT_START_TRIGGER triggers for only the first pulse, I want it to trigger on every pulse. How can I do this in C++ using nidaq??
0 Kudos
Message 1 of 2
(2,511 Views)
Hello;

None of NI DAQ boards have the retriggerable analog output feature, but you can overcome that limitation by using the two general purpose counters that your board have available. To accomplish that, you need to configure the first counter as retriggerable pulse generation. The output of that counter will be used as the gate input of the second counter, which will be configured as gated pulse train generation. Then, you can use each pulse of that second counter as the update clock of your board.
Based upon the update rate needed for the analog output channel, you can determine the frequency of the second counter output pulse train, which is going to be the analog output update rate.
You need to make sure tough to configure the pulse generation width of the
first counter to be shorter than the time in between trigger pulses, otherwise, you will loose some trigger pulses.
In sumary, if you want to generate the trigger pulse train using one of your counters, you will need a total of 3 counters. One to generate the trigger pulse train, and the other two to do the task described above.
Hope this helps.
Filipe
0 Kudos
Message 2 of 2
(2,511 Views)