Description
Original instructions
Using the block
Actuators are driven not only by analog quantities, but also through binary actuating signals. The conversion of analog values into binary output signals is achieved for example, through pulse width modulation ( QPWM) or pulse duration modulation (PDM).
The actuator adjusted average energy (actuator energy) should be in accord with the modulation block's analog input value (IN).
Function description
The function block QPWM 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:
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.
WARNING
UNEXPECTED OUTPUT BEHAVIOUR
Make sure that the function block is always invoked in the first program cycle.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EN and ENO can be configured as additional parameters.
General information about the actuator drive
In general, the binary actuator drive is performed by two binary signals Y_POS and Y_NEG.
On a motor the output Y_POS corresponds to the signal "clockwise rotation" and the output Y_NEG the signal "counter-clockwise rotation". The outputs Y_POS and Y_NEG for an oven can be interpreted as corresponding to "heating" and "cooling".
Pulse length formulas for Y_POS and Y_NEG
The pulse length T_on for outputs Y_POS and Y_NEG is determined by the following equations:
Output
Formula
Condition
Y_POS
Y_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 QPWM_Instance (X:=InputVariable, R:=ResetMode,
    PARA:=Parameter, Y_POS=>Positive_X_ValueOutput,
    Y_NEG=>Negative_X_ValueOutput)
Representation in ST
Representation:
QPWM_Instance (X:=InputVariable, R:=ResetMode,
    PARA:=Parameter, Y_POS=>Positive_X_ValueOutput,
    Y_NEG=>Negative_X_ValueOutput) ;
QPWM parameter description
Description of input parameters:
Parameter
Data type
Description
X
Input variable
R
Reset mode ("1" = Reset)
PARA
Parameter
Description of output parameters:
Parameter
Data type
Description
Y_POS
BOOL
Output for positive X values
Y_NEG
BOOL
Negative X value output
Parameter description Para_QPWM
Data structure description
Element
Data type
Description
t_period
Length of period
t_min
TIME
Minimum actuating pulse time (in sec)
x_max
Upper limit for positive/negative X values
Runtime error
For a list of all block error codes and values, see CLC_PRO.