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 reference variable 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 PID_P_Instance (SP:=ReferenceVariable, 
    PV:=ControlledVariable, MODE:=OperatingModes, 
    PARA:=Parameter, YMAN:=ManualValue, 
    FEED_FWD:=Disturbance, Y:=ManipulatedVariable, 
    ERR=>OutputSystemDeviation, STATUS=>StatusOfOutput_Y)
Representation in ST
Representation:
PID_P_Instance (SP:=ReferenceVariable, 
    PV:=ControlledVariable, MODE:=OperatingModes, 
    PARA:=Parameter, YMAN:=ManualValue, 
    FEED_FWD:=Disturbance, Y:=ManipulatedVariable, 
    ERR=>OutputSystemDeviation, STATUS=>StatusOfOutput_Y) ;
Parameter description PID_P
Description of input parameters:
Parameter
Data type
Description
SP
Reference variable
PV
REAL
Controlled variable
MODE
Operating mode
PARA
Parameter
YMAN
REAL
Manually manipulated value
FEED_FWD
REAL
Disturbance input
Description of input / output parameters:
Parameter
Data type
Description
Y
REAL
Manipulated variable
Description of output parameters:
Parameter
Data type
Description
ERR
REAL
System deviation
STATUS
Y output status
Parameter description Mode_PID_P
Data structure description
Element
Data type
Description
man
"1": Manual mode
halt
BOOL
"1": Halt mode
d_on_pv
BOOL
"1": D component in relation to the controlled variable
"0": D component in relation to the system deviation
reverse
BOOL
"1": Output reversed
Parameter description Para_PID_P
Data structure description
Element
Data type
Description
kp
Proportional action coefficient (gain = P component)
ki1
REAL
Integral action coefficient (gain = I component) [1/s]
kd
REAL
Rate of differentiation (gain = D component) [s]
td_lag
Delay, D component
ymax
REAL
Upper limit
ymin
REAL
Lower limit
1Refer to Initialization Requirements.
Parameter description Stat_MAXMIN
Data structure description
Element
Data type
Description
qmax
"1" = Y has reached the upper control limit
qmin
BOOL
"1" = Y has reached the lower control limit
Runtime error
An error message is returned if
NOTE: For a list of all block error codes and values, see Tables of Error Codes for the Obsolete Library.