PWM Express VI

LabVIEW 2015 roboRIO Toolkit Help

Edition Date: June 2015

Part Number: 374999A-01

»View Product Info
Download Help (Windows Only)

Requires: myRIO Toolkit or roboRIO Toolkit

Generates a pulse width modulation (PWM) signal to an external peripheral through the PWM channels on the myRIO or the roboRIO.

The roboRIO uses a 6 V voltage rail on the PWM port for powering servos and provides 5 V DIO lines for generating PWM signals.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Node nameSpecifies the name of this Express VI. You can also double-click the name of this Express VI on the expandable node to edit the name.
ChannelSpecifies the channel to generate the PWM signal.
FrequencySpecifies the frequency settings for the PWM signal. If you specify a frequency that is invalid, this Express VI coerces the specified value to the nearest valid value when you click the Validate button. Frequency contains the following options:
  • Set using input to Express VI—Specifies to set the frequency by using the Frequency [Hz] block diagram input. This option allows you to set the frequency at run time.
  • Set constant—Specifies to use a constant frequency value.
    • Frequency value—Specifies the value of the frequency. The default is 1,000.
    • Frequency unit—Specifies the unit of the frequency. The default is Hz.
    • Validate—Validates whether this Express VI can generate the frequency that you specify. If the specified frequency is not valid, this Express VI coerces the specified value to the nearest valid value.
Duty cycleSpecifies the percentage of time the PWM signal remains high over one PWM cycle. Duty cycle contains the following options:
  • Set using input to Express VI—Specifies to set the duty cycle by using the Duty Cycle block diagram input. This option allows you to set the duty cycle at run time.
  • Set constant—Specifies to use a constant duty cycle value.
    • Duty cycle value—Specifies the value of the duty cycle. The default is 0.5.
Output previewDisplays a preview of the output PWM signal.
View CodeDisplays the underlying code of this Express VI.
Connection DiagramShows the I/O connector pinouts on the myRIO or the roboRIO. The highlighted pinouts represent the channels that you configure.

Block Diagram Inputs

ParameterDescription
Duty CycleSpecifies the percentage of time the PWM signal remains high over one PWM cycle. Valid values must be within the range [0, 1].
Frequency [Hz]Specifies the frequency in hertz of the PWM signal.
error in (no error)Describes error conditions that occur before this node runs.

Block Diagram Outputs

ParameterDescription
error outContains error information. This output provides standard error out functionality.

PWM Details

Related Information

I/O Connectors (myRIO Toolkit)

I/O Connectors (roboRIO Toolkit)

Generating FPGA Clocks (myRIO Toolkit)

Generating FPGA Clocks (roboRIO Toolkit)

Power Supply for Peripheral Devices (roboRIO Toolkit)

DIO Lines (roboRIO Toolkit)

WAS THIS ARTICLE HELPFUL?

Not Helpful