NI-DAQmx: Software-Timed Variable Duty Cycle Pulse Train Using Analog Output
Overview
This example illustrates how to use software timing to create a variable duty cycle pulse using an analog output channel.
Instructions for Running
- Choose Physical Channel for analog output, and assign proper maximum and minimum voltage output levels for the DAQ card.
- Assign Duty Cycle Parameters. Make sure the number of pulses equals the size of the 'Percent Duty Cycle' array.
I/O Connections
Make sure your signal output terminal matches the Physical Channel I/O Control. For further connection information, refer to your hardware reference manual.
Front Panel
Block Diagram
Block Diagram Steps:
1. Create an Analog Output Voltage Channel
2. Start Task
3. Calculate the High Time and Low Time
4. Generate High Signal, then wait for High period of time
5. Generation Low Signal, then wait for Low period of time
6. Clear Task and show errors
Requirements
Filename: ao-var_duty_cycle.vi
Software Requirements
Application Software: LabVIEW Base Development System 7.1
Hardware Requirements
Driver: NI-DAQmx
Reader Comments | Submit a comment »
This is nice. Now, how about multiple
channels that have different duty cycles
- awcaswell@wisc.edu - Jan 3, 2008
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/).
