Configuration of PWM Outputs¶
The Processor Modules PM55x-xP and PM564-xP provide up to 2 PWM output channels with a maximum frequency of 20 KHz. The parameter of PWM output channel of Onboard I/O must be configured before it can be used. User should take these steps to configure the PWM output function.
The 2 outputs can be controlled in 2 different configuration modes:
- Frequency mode
- Cycle time mode
Note
Relay-type outputs of Onboard I/Os cannot be used for PWM functionality.
The mode can be configured with the parameter Output X, PWM operation mode in the parameters list:
In frequency mode, by setting the FREQ and DUTY_CYCLE input variables of PWM channel, the Onboard I/O can generate 125 Hz to 20 kHz frequency with 0..100 % duty cycle waveform in output channels 2 and 3.
In the cycle time mode, by setting the CYCLE_TIME and CYCLE_DUTY input variables of PWM channel, the Onboard I/O can generate 125 Hz to 20 kHz frequency with 0..100 % duty cycle waveform in output channels 2 and 3.
The PWM can be controlled via the corresponding mapped parameters in tab xDI+yDO I/O Mapping of the editor window. See Symbolic Names for Variables, Inputs and Outputs for further details on mapping Symbolic Names for Variables, Inputs and Outputs.
Channel | Direction | Width |
---|---|---|
State byte PWM X | Input | BYTE |
Control byte PWM X | Output | BYTE |
PWM X, frequency / cycle time | Output | DWORD |
PWM X, duty cycle / duty time | Output | DWORD |