Input Description

../_images/2c29a108e38acbcd0a33139000eba54e

EN

Data_Type Default_Value Range Unit
BOOL FALSE TRUE/FALSE -

The input EN has to be driven in level triggered mode.

In order to enable the execution of the Function Block the input EN has to be set to value TRUE. It keeps on executing until the input EN is set back to value FALSE.

While it is executed its inputs are continuously evaluated.

EN_PWM

Data_Type Default_Value Range Unit
BOOL - - -

If EN_PWM = TRUE, the pulse-width modulator is enabled. If EN_PWM = FALSE, no pulse-width modulation is performed.

Input EN_PWM corresponds to output bit 7 in “control byte PWM x “.

CHANNEL

Data_Type Default_Value Range Unit
BYTE - - -

Input CHANNEL is used to select the input for the counter. Currently the only valid value is 0. The device occupies the inputs I0…I1. If an invalid value is entered at input CHANNEL or if the selected channel is not configured as a counter, the Function Block is aborted with DONE=ERR=TRUE and a corresponding error number at ERNO.

CHANNEL contains the channel number managed by the Function Block:

  • CHANNEL = 0: the output O2 is managed
  • CHANNEL = 1: the output O3 is managed

FREQ

Data_Type Default_Value Range Unit
DWORD - 125 - 20000 Hz

The input FREQ is used to specify the frequency of PWM.

The frequency value is defined with a double word (DWORD), but the internal communication is realized with WORD type. For frequencies greater than 65535, an additional bit is used internally as a multiplier. Thus, for such frequencies the resolution becomes 10 Hz.

The additional multiplier bit is the bit 0..1 of “control byte PWM x “.

Input FREQ corresponds to output word “PWM x -Frequency/Cycle time”.

DUTY

Data_Type Default_Value Range Unit
WORD - 0.0 - 100.0 %

The input DUTY is used to specify the percentage of time set to TRUE. The duty cycle is from 0 to 1000 (0.0 % to 100.0 %); the value is written without dot. That means, for example, for 75.8 % the value written will be 758. The max. value authorized will be 1000 to specify a duty cycle = 100.0 %.

On fast outputs O2 and O3, the brightness of the yellow LED depends on the value of duty cycle specified (from 0 to 100 %).

Note

If the written value is greater than 1000, the value 1000 will be read. If the written value is less than 0, the value 0 will be read. No error message will be generated in these two cases. The last entered valid value will be used or the value ‘0’ if no value has been entered before.

Input DUTY corresponds to output word “PWM x - Duty cycle/Duty time”.