Example Code

Archived: NI 9505 PWM Generation - Improved

Code and Documents

Attachment

Overview


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

This example showcases an improved PWM generator for the NI 9505. The example allows for greater use of the <2% duty cycle range to reduce motor chatter.

RT VI:
This VI shows an example of how to implement a PWM generator for use with the NI 9505. The example uses a single-cycle Timed Loop to create a PWM frequency of 20 kHz. The duty cycle input control is used to create the appropriate pulse width. The next duty cycle value is loaded at the beginning of each new period.

FPGA VI:
This VI shows an example of how to implement a PWM generator for use with the NI 9505. The example uses a single-cycle Timed Loop to create a PWM frequency of 20 kHz. The duty cycle input control is used to create the appropriate pulse width. The next duty cycle value is loaded at the beginning of each new period.

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

Contributors