Hello jujuyy,
There are two ways to generate pulse trains with the NI cDAQ-9172:
1. Install the NI 9472 in slot 5 or 6, and use the general purpose counter/timers that are built into the chassis.This will let you output two continuous pulse trains or one finite pulse train per chassis. For instance, if you put the NI 9472 in slot 5, and create a pulse generation task in the DAQ Assistant on physical channel cDAQ1Mod5/ctr0, then the signal will be output on DO3 of the NI 9472. Most of the counter versions of DAQmx Write.vi have a duty cycle input.
2. Install the NI 9472 in slot 1, 2, 3, or 4, and use correlated DIO to output a waveform with the desired duty cycle. This is a bit more work, because you will need to write code to generate an array of the waveform data, then output it using hardware timed DIO synchronized to an appropriate clock (such as an AI/AO sample clock or a pulse train from a counter).
Note that if you go the second route, you can use the counter/timers in the chassis to generate a pulse train for your clock without having a module installed in slot 5 or 6. You can create a counter task using one of the internal channels cDAQ1/_ctr0, cDAQ1/_ctr1, and cDAQ1/_freqout, and then specify /cDAQ1/Ctr0InternalOutput, /cDAQ1/Ctr1InternalOutput, or /cDAQ1/FrequencyOutput as your DIO sample clock source when you call DAQmx Timing (Sample Clock).vi on the DIO task. If you use one of these internal channels, the counter task will not output to any terminals outside the chassis unless you use property nodes or the routing and/or export signal VIs.
---
Brad Keryan
NI R&D