Description
Original instructions
Function description
The function block represents a complex PID controller that in its design specifically includes cascade treatment. The control structure is displayed in theStructure diagram.
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.
Properties
The function block has the following properties:
Transfer function
The transfer function is:
Explanation of the variables:
Variable
Description
YD
D component (only when en_d = 1)
YI
I component (only when en_i= 1)
YP
P component (only when en_p= 1)
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL COMP_PID_Instance (SP:=ReferenceVariable, 
    PV:=ControlledVariable, 
    SP_CAS:=CascadeReferenceVariable, MODE:=OperatingModes, 
    PARA:=Parameters, YMAN:=ManuallyManipulatedValue, 
    YRESET:=Y_ResetValue, FEED_FWD:=DisturbanceInput, 
    OFF:=OffsetFor_P_PD_Operation, Y:=ManipulatedVariable, 
    SP_CAS_N:=CascadeReferenceVariable,
    YMAN_N:=ManuallyManipulatedValue,
    OFF_N:=OffsetFor_P_PD_Operation, ERR=>SystemDeviation,
    STATUS=>OutputStatus)
Representation in ST
Representation:
COMP_PID_Instance (SP:=ReferenceVariable, 
    PV:=ControlledVariable, 
    SP_CAS:=CascadeReferenceVariable, MODE:=OperatingModes, 
    PARA:=Parameters, YMAN:=ManuallyManipulatedValue, 
    YRESET:=Y_ResetValue, FEED_FWD:=DisturbanceInput, 
    OFF:=OffsetFor_P_PD_Operation, Y:=ManipulatedVariable, 
    OFF_N:=OffsetFor_P_PD_Operation, ERR=>SystemDeviation,
    STATUS=>OutputStatus) ;
Parameter description COMP_PID
Description of the input parameters:
Parameter
Data type
Description
SP
Reference variable
PV
REAL
Controlled variable
SP_CAS
REAL
Cascade reference variable
MODE
Operating mode
PARA
Parameter
YMAN
REAL
Manually manipulated value
YRESET
REAL
Manipulated variable reset value
FEED_FWD
REAL
Disturbance input
OFF
REAL
Offset for P/PD operation
Description of input / output parameters:
Parameters
Data type
Meaning
Y
REAL
Manipulated variable
SP_CAS_N
REAL
Cascade reference variable
YMAN_N
REAL
Manually manipulated value
OFF_N
REAL
Offset for P/PD operation
Description of the output parameters:
Parameters
Data type
Description
ERR
REAL
System deviation
STATUS
Output status
Parameter description Mode_COMP_PID
Data structure description
Element
Data type
Description
r
"1": Reset mode
man
BOOL
"1": Manual mode
halt
BOOL
"1": Halt mode
cascade
BOOL
"1": Cascade mode
en_p
BOOL
"1": P component on
en_i
BOOL
"1": I component on
en_d
BOOL
"1": D component
d_on_pv
BOOL
"1": D component on controlled variable
"0": D component on system deviation
halt_aw
BOOL
"1": Anti-windup Halt
"0": Anti-windup reset
bump
BOOL
"0": Bumpless operating mode switchover
ymanc
BOOL
"1": YMAN tracking
Parameter description Para_COMP_PID
Data structure description
Element
Data type
Description
gain
Proportional action coefficient (gain)
ti
Integral time
td
TIME
Derivative time
td_lag
TIME
D component delay time
db
REAL
Dead zone
gain_red
REAL
Gain reduction in dead zone (db)
rate_sp
REAL
Setpoint velocity (SP) [1/s]
rate_man
REAL
Manually manipulated velocity value (YMAN) [1/s]
ymax
REAL
Upper threshold for Y
ymin
REAL
Lower threshold for Y
delt_aw
REAL
Limit expansion for anti-windup
Parameter description Stat_COMP_PID
Data structure description
Element
Data type
Description
st_r
"1": COMP_PID is in reset mode
st_man
BOOL
"1": COMP_PID is in manual mode
st_halt
BOOL
"1": COMP_PID is in halt mode
st_auto
BOOL
"1": COMP_PID is in automatic mode
st_cascade
BOOL
"1": COMP_PID is in cascade mode
st_max
BOOL
"1": YPara_COMP_PID.ymax
st_min
BOOL
"1": YPara_COMP_PID.ymin
Runtime error
An error message is returned if
NOTE: For a list of all block error codes and values, see CLC_PRO.