Archived: DAQmx : Pulse Train Generation with Changing Pulse Specs (PWM) -- LabVIEW, C#.NET

Publish Date: Jan 10, 2019 | 1 Ratings | 5.00 out of 5 | Print | 1 Customer Review | Submit your review

Overview

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

The best way to generate pulse trains with accurate control over the frequency and duty cycle is to use a counter on the 660x or E Series multifunction DAQ device. The E Series devices have two counter/timers while the 660x devices typically have eight.

The NI-DAQmx driver allows you to reprogram the counters on the fly during continuous pulse train generation. This means that you can change both the number of pulses per second and the pulse-width while pulse train generation is in progress without glitching.

The attached example program demonstrates this capability. It can be used with E Series or 660x devices. The accuracy of the pulse train frequency and duty cycle is limited only by the resolution of the internal timebase. You may choose any timebase supported by your device. The timebase you choose determines the range of frequencies you may produce.

A Note on Accuracy:

For E Series devices, there are two timebases available, yielding a counter resolution of 50 nanoseconds or 10 microseconds. For 660x devices, there are three timebases available, yielding a resolution of 12.5 nanoseconds, 50 nanoseconds, or 10 microseconds. If the pulse train specification you desire is evenly divisible by the timebase, then you can achieve within about 0.01 percent of the timebase on E Series devices or within about 0.005 percent of the timebase on a 660x device.

Back to Top

Customer Reviews
1 Review | Submit your review

single  - Jul 25, 2016

need proograming with arduino

Bookmark & Share


Downloads

Attachments:

GenDigPulseTrain-ChangingSpecs
.vi

Requirements


Ratings

Rate this document

Answered Your Question?
Yes No

Submit