Example Code

Square Wave with Variable Duty Cycle in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This VI exemplifies how to create a square wave which parameters could be modified during runtime.

 

Description

This code uses the Simulate Signal Express VI and it could be easily used for simulating the behavior of hardware for testing purposes.
The parameters that could be changed are the Offset, Duty Cycle (%), Amplitude, Phase, and Frequency. The waveform chart has the autoscale feature on both axes.

 

Requirements
LabVIEW Base Development System.

 

Steps to Implement or Execute Code
1. Open the attached VI named “Configurable Square Wave LV 2012 - NI Verified.vi”.
2. Run the VI.
3. Change the square characteristics as desired.


Additional Information or References

 Snippet 5290.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com

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