Description
Original instructions
Using the block
Actuators are driven not only by analog quantities, but also through binary actuating signals.
The actuator adjusted average energy (actuator energy) should be in accord with the modulation block's analog input value (IN).
NOTE: This function block performs an internal initialization in the first program cycle after a warm start or cold start (e.g. application download or power cycle) of the PLC program.
Due to this, you have to make sure that the function block is invoked in the first program cycle. In case of inkoving the function block in a later program cycle, the internal initialization will not be performed and the ouputs may deliver wrong values.
DANGER
UNEXPECTED OUTPUT BEHAVIOUR
Make sure that the function block is always invoked in the first program cycle.
Failure to follow these instructions will result in death or serious injury.
Function description
The function block PWM1 converts analog values into digital output signals.
In pulse width modulation (QPWM), a 1-signal is emitted, at a constant clock rate, for a duration that is a function of the analog value. The adjusted average energy corresponds to the quotient of the switch on duration T_on and the cycle time t_period.
In order that the adjusted average energy also corresponds to the analog input variable IN, the following must apply:
EN and ENO can be configured as additional parameters.
General information about the actuator drive
In general, the binary actuator drive is carried out by two binary signals OUT_POS and OUT_NEG. On a motor the output OUT_POS corresponds to the signal "clockwise rotation" and the output OUT_NEG the signal "counter-clockwise rotation". For an oven the outputs OUT_POS and OUT_NEG could be interpreted as "heating" and "cooling".
Pulse length formulas for OUT_POS and OUT_NEG
The pulse length T_on for output OUT_pos and OUT_neg is determined by the following formulas:
Output
Formula
Condition
OUT_POS
OUT_NEG
Parametering rules
For correct operation when setting parameters the following rules should be observed:
t_mint_period
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL PWM1_Instance (IN:=InputVariable, RST:=ResetMode,
    PARA:=Parameters, OUT_NEG=>OutputNegative_IN_Values,
    OUT_POS=>OutputPositive_IN_Values)
Representation in ST
Representation:
PWM1_Instance (IN:=InputVariable, RST:=ResetMode,
    PARA:=Parameters, OUT_NEG=>OutputNegative_IN_Values,
    OUT_POS=>OutputPositive_IN_Values) ;
PWM1 parameter description
Description of input parameters:
Parameter
Data type
Description
IN
Input variable
RST
Reset mode ("1" = Reset)
PARA
Parameter
Description of output parameters:
Parameter
Data type
Description
OUT_NEG
BOOL
Output for negative IN values
OUT_POS
BOOL
Output for positive IN values
Parameter description Para_PWM1
Data structure description
Element
Data type
Description
t_period
Length of period
t_min
TIME
Minimum actuating pulse time (in sec)
in_max
Upper limiting value for positive/negative IN values
Runtime error
NOTE: For a list of all block error codes and values, see Output Processing.