Configuration of PWM OutputsΒΆ

The CPUs PM55x and PM564 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.

../_images/5cc4719f45ff03da0a33139000eba54e1

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:

../_images/283c981345ff04380a33139000eba54e1

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 125Hz 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.

../_images/8674ae0445ff04a50a33139000eba54e1

The channels have the following meaning:

Channel Direction Width Meaning
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