Description
Original instructions
Function description
The function block replicates a PID controller in parallel structure.
A system deviation ERR is formed by the difference between the setpoint SP and the controlled variable PV. The deviation ERR causes the manipulated variable Y to change.
Initialization Requirements
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.
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.
For the proportional part of the controller to behave properly, the integral action must be reset (the input coefficient KI set to zero) for at least one scan time after a warm start or cold start.
If the integral action coefficient KI is set to a non-zero value at initialization, the function block behaves like an I or ID controller with no proportional part.
Properties
The function block has the following properties:
Transfer function
The transfer function is:
Explanation of the variables:
Variable
Description
YD
D component
YI
I component
YP
P component
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL PIDP1_Instance (MAN:=ManualMode, HALT:=HaltMode, 
    SP:=SetpointValueInput, PV:=ProcessVariable, 
    BIAS:=DisturbanceInput, D_ON_X:=D_PortionValueFlag, 
    REVERS:=OutputReversed, KP:=ProportionalRate, 
    KI:=IntegralRate, KD:=DifferentiationRate, 
    TD_LAG:=LagTimeD_Portion, YMAX:=UpperControlLimit, 
    YMIN:=LowerControlLimit, YMAN:=ManualValue, 
    Y=>ManipulatedVariable, ERR=>OutputSystemDeviation, 
    QMAX=>Y_Reached_YMAX, YMIN=>Y_Reached_YMIN)
Representation in ST
Representation:
PIDP1_Instance (MAN:=ManualMode, HALT:=HaltMode, 
    SP:=SetpointValueInput, PV:=ProcessVariable, 
    BIAS:=DisturbanceInput, D_ON_X:=D_PortionValueFlag, 
    REVERS:=OutputReversed, KP:=ProportionalRate, 
    KI:=IntegralRate, KD:=DifferentiationRate, 
    TD_LAG:=LagTimeD_Portion, YMAX:=UpperControlLimit, 
    YMIN:=LowerControlLimit, YMAN:=ManualValue, 
    Y=>ManipulatedVariable, ERR=>OutputSystemDeviation, 
    QMAX=>Y_Reached_YMAX, YMIN=>Y_Reached_YMIN) ;
Parameter description
Description of the input parameters:
Parameter
Data type
Description
MAN
"1": Manual mode
HALT
BOOL
"1": Halt mode
SP1
Setpoint input
PV1
REAL
Input variable
BIAS
REAL
Disturbance input
D_ON_X
BOOL
1: D component in relation to the controlled variable
0: D component in relation to the system deviation
REVERSE
BOOL
1: Output reversed
KP
REAL
Proportional action coefficient (gain)
KI1
REAL
Integral action coefficient
KD
REAL
Derivative time constant
TD_LAG
Delay, D component
YMAX
REAL
Upper limit
YMIN
REAL
Lower limit
YMAN
REAL
Manually manipulated value
1Refer to Initialization Requirements.
Description of the output parameters:
Parameter
Data type
Description
Y
REAL
Manipulated variable
ERR
REAL
System deviation
QMAX
BOOL
1 = Y has reached the upper control limit
QMIN
BOOL
1 = Y has reached the lower control limit
Runtime error
If YMAX < YMIN an error messages appears.
NOTE: For a list of all block error codes and values, see Tables of Error Codes for the Obsolete Library.