Example Code

Archived: NI-DAQmx: Creating a Custom Pulse Train Using Analog Output

Code and Documents

Attachment

Overview


This document has been archived and is no longer updated by National Instruments.

Counters allow you to generate digital pulse trains with a specified duty cycle and frequency. However, you cannot output a pulse train that contains pulses of different widths, frequencies, and voltage levels. To do this you can use the analog output capablities of your DAQ board.

How to operate:
1) Specify high and low voltages for each phase of your pulse train
2) Specify initial delay for pulse train
3) Specify high and low times for pulses in pulse train
4) Set the output rate of the pulse train by specifying the "seconds per tick"
5) Run


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors