Generate a Software Timed Pulse Train Using a Digital Output

Updated Nov 15, 2018

Reported In

Hardware

  • NI-9403
  • Digital I/O Device
  • Counter/Timer Device

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I want to generate a pulse width modulated (PWM) output, but the cycle time and precision are not critical. I'm looking at two devices, one with a counter that is capable of generating a pulse train while the other does not. Can I use a digital output instead of a counter in this instance?

Solution

If the application does not have tight requirements with respect to speed and precision (cycle time is in the seconds range with possibility of milliseconds of delay) a digital output can be used with software timing control for pulse train or PWM generation. 

An example where this application can be used is the control of a relay with a minute period and half a second of precision. The Software Timed Pulse Width Modulation LabVIEW example shows one method of implementing PWM with software timed digital I/O.

Additional Information

Counters are preferable for generating PWM output, since they are hardware timed. This makes them much faster and more precise than digital I/O lines. Not all modules have counters or access to counters, however. The number of counters on a chassis is finite as well, and a software timed output may be necessary to provide resources for other tasks.

WAS THIS ARTICLE HELPFUL?

Not Helpful