Example Code

Pulse Width Modulation and Demodulation

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 converts a sine wave into a PWM signal and then demodulates that signal back into a sign wave.


Description:  First a Simulate Signal Express VI is used to create a sine wave signal. That siganl is then fed into the Square Wave VI. The signal leaving the Square Wave VI is sent to a waveform graph that shows the PWM signal. The same signal out of the Square Wave VI is also sent to a Timing and Transitions Measurements Express VI, that demodulates the PWM signal back into the sine wave signal.


Requirements: LabVIEW 2012 (or compatible). Hardware: none. 


Steps to Implement or Execute Code:

1. Run the VI.
2. Look on the graphs.


Additional Information or References:

 

Pulse Width Modulation and Demodulation FP.png

 

Pulse Width Modulation and Demodulation sn.png


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

 

 

Justin Parker
National Instruments
Product Support Engineer

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