Out3P
Out3P (FB)
Out3P (FB)FUNCTION_BLOCK Out3P
Short description
Conversion of an analog value (e.g. P-controller) into output signals for a 3-point actuator (pulse-width modulation). Additionally, a reference position (limit switch) of the actuator can be captured.
Representation

Interfaces
Inputs
xEn
BOOL
Enable of the function block
rIn
REAL
Input signal
xRefPos
BOOL
Digital input for detecting the reference position (limit switch)
Outputs
xOutOpen
BOOL
Output variable Plus/More for the actuator
xOutClose
BOOL
Output variable Minus/Less for the actuator
rPos
REAL
0.0 … 100.0
Analog signal for the current position
Setpoints / parameters
iRefPosition
INT
0 - 100
0%
Reference position of the actuator
tImpulsClose
TIME
1s
Duration of a pulse at the Minus/Less output
tImpulsOpen
TIME
1s
Duration of a pulse at the Plus/More output
rMinLimit
REAL
-100.0
Integral value for pulse triggering at the Minus/Less output
rMaxLimit
REAL
100.0
Integral value for pulse triggering at the Plus/More output
rDuration
TIME
120s
Runtime of the actuator
tIntegration
TIME
100ms
Duration between two integration operations
Function description
General
This function block is used to convert an analog input signal rIn into the corresponding output signals xOutOpen and xOutClose in the form of pulse-width modulation. The pulse length is always constant (tImpulsClose or tImpulsOpen) while the pause between two pulses varies in length. For a current input signal rIn of 0.0 no output pulses are generated. If the current input signal is in the positive range (0.0 - +100.0) then only at the output xOutOpen pulses are generated. If the current input signal is in the negative range (0.0 - -100.0) then only at the output xOutClose pulses are generated. The enable/disable of the function block is done via the digital input xEn. Any rising edge on the digital input xRefPos (i.e. the actuator is currently in its reference position) triggers a redefinition of the analog output signal rPos to the target value / parameter iRefPosition.
Enable input xEn
If the enable input is not active (xEn = FALSE) both outputs are xOutOpen and xOutClose reset. Additionally the integral is set to 0 and the digital signal for capturing the reference position xRefPos is non-functional. With each falling edge on the enable input the output signal xOutClose is activated continuously for a duration of rDuration + 10s and at the same time the output signal xOutOpen is deactivated (= forced movement of the actuator to the rest position).
Reference position
The digital input xRefPos allows a readjustment of the position display rPos to a predefined value iRefPosition (0% = rest position - 100% = maximum position). Any rising edge on the digital input triggers a readjustment.
Signal generation
The analog input signal rIn (control deviation of a control process, signal symmetric around zero) is integrated over the interval tIntegration over time. That means after each integration interval tIntegration the product of rIn and the tIntegration is formed and added to the current content of the integration memory. This therefore results in a step function.
Example
rIn = 100K, tIntegration = 100ms, old value of the integration memory = 500Ks, new value (after 100ms) = 510Ks. If the integration value exceeds the threshold rMaxLimit, then at the output signal xOutOpen a pulse of length tImpulsOpen is generated.
If the integration value falls below the threshold rMinLimit, then at the output signal xOutClose a pulse of length tImpulsClose is generated. After each pulse generation the integration value is reset to 0. The threshold rMaxLimit may only take values > 0.0, the threshold rMinLimit may only take values < 0.0.
Examples with different parameters
tIntegration = 100ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen a pulse with length 1s is generated every 4s. tIntegration = 100ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of -5.0 at the output xOutClose a pulse with length 1s is generated every 4s. tIntegration = 200ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen a pulse with length 1s is generated every 2s. tIntegration = 200ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of -5.0 at the output xOutClose a pulse with length 1s is generated every 2s. tIntegration = 100ms, rMaxLimit = 200.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen a pulse with length 1s is generated every 8s. tIntegration = 100ms, rMaxLimit = 200.0, rMinLimit = -100.0: With an input signal rIn of -5.0 at the output xOutClose a pulse with length 1s is generated every 8s.
Position display rPos
It is used to display the current position of the 3-point actuator in the range 0 - 100% and is calculated internally (0% = rest position, 100% = maximum position). To avoid deviations between the calculated and the actual position, regular triggering of the recalibration of the position display is recommended. The position display is independent of the signal generation, i.e. if the position display reaches an end position (0% or 100%), signals are nevertheless still sent to the outputs xOutOpen or xOutClose is generated.
CODESYS
InOut:
Input
xEn
BOOL
Input
rIn
REAL
Input
xRefPos
BOOL
Input Const
iRefPosition
INT
0
Input Const
tImpulsClose
TIME
TIME#1s0ms
Input Const
tImpulsOpen
TIME
TIME#1s0ms
Input Const
rMinLimit
REAL
-100.0
Input Const
rMaxLimit
REAL
100.0
Input Const
tDuration
TIME
TIME#2m0s0ms
Input Const
tIntegration
TIME
TIME#100ms
Output
xOutOpen
BOOL
Output
xOutClose
BOOL
Output
rPos
REAL
Last updated

