Chapter 18 Process control instructions
540 Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
PWM arguments
Parameter Parameter type
Data
type
Description
EN Input BOOL Function block enable. This level is FB triggered.
When EN = TRUE, Sts is updated. PWM is made active or inactive depending on the On input
parameter and valid configuration.
When EN = FALSE, Sts is only updated. PWM state (active or inactive) is not affected..
On Input BOOL Turns the PWM output On/Active or Off/Inactive.
TRUE = PWM output is made active or continues to be active with latest valid configuration.
Output LED is ON when PWM is active, even if duty cycle is set to 0%.
FALSE = PWM output is made inactive but only if configuration is also valid.
Freq Input UDINT Frequency in Hz
• 1 – 100000
DutyCycle Input UINT Duty Cycle
• 0 – 1000 (0% - 100%)
ChType Input USINT Channel Type
• 0 – Embedded
• 1 – Plugin
• 2 – Expansion
ChSlot Input UINT Channel Slot
• 0 – Embedded
ChNum Input UINT Channel Number
• 0 – PWM CH0
Sts Output UINT Function block execution status.
00 - Function block not enabled (no operation.)
01 - PWM configuration successful.
02 - Invalid duty cycle.
03 - Invalid Frequency.
04 - Invalid Channel Type.
05 - Invalid Channel Slot.
06 - Invalid Channel Number.
07 - Invalid Catalog. PWM feature is not supported in the catalog being used.
ENO Output BOOL Enable out.
Applies only to LD programs.