Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 20, 2006

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

0 ratings | 0.00 out of 5
Print

Downloads

Filename: 25574.vi
Requirements: View

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.

Requirements


Filename: 25574.vi

Software Requirements


Application Software: LabVIEW Full Development System 7.1
Language(s): C#, Visual Studio .NET, LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PXI-6030E, PXI-6025E, PXI-6032E, PXI-6040E, PXI-6052E, PXI-6053E, PXI-6070E, PXI-6071E, DAQCard-6601, PCI-6601, PCI-6602, PXI-6033E, PXI-6035E, PCI-6608, PXI-6601, PXI-6602, PXI-6608, DAQCard-6023E, DAQCard-6024E, DAQCard-6034E, DAQCard-6035E, DAQCard-6036E, DAQCard-6062E, DAQPad-6020E for USB w/BNC Term, DAQPad-6020E for USB w/Mass Term, DAQPad-6024E for USB w/BNC Term, DAQPad-6024E for USB w/Mass Term, DAQPad-6025E for USB w/BNC Term, DAQPad-6025E for USB w/Mass Term, DAQPad-6036E for USB w/BNC Term, DAQPad-6036E for USB w/Mass Term, DAQPad-6052E for Ethernet w/BNC Term, DAQPad-6052E for Ethernet w/Mass Term, DAQPad-6052E for IEEE 1394 w/BNC Term, DAQPad-6052E for IEEE 1394 w/Mass Term, DAQPad-6052E for USB w/BNC Term, DAQPad-6052E for USB w/Mass Term, DAQPad-6070E for IEEE 1394 w/BNC Term, DAQPad-6070E for IEEE 1394 w/Mass Term, PCI-6023E, PCI-6024E, PCI-6025E, PCI-6031E, PCI-6032E, PCI-6033E, PCI-6034E, PCI-6035E, PCI-6036E, PCI-6040E (PCI-MIO-16E-4), PCI-6052E, PCI-6053E, PCI-6071E, PXI-6011E, PXI-6023E, PXI-6024E, PXI-6031E
Driver: NI-DAQmx 7.2

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).