Description
Original instructions
Function description
The function block PD_OR_PI can work equally well as either PD controller or PI controller. Depending on the system deviation (SP - PV) and a specified switch value, trig_err will automatically perform a structural changeover from PD- to PI-Controller and vice-versa from PI- to PD-Controller.
This EFB is particularly suitable for starting control purposes. When the process is started, the controller reacts as a P(D) controller, whereby the controlled variable is to reach the adjusted reference variable value as fast as possible. Shortly before the given setpoint value is reached, the control algorithm is switched over and an I component makes sure that the remaining control deviation fades out.
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:
The PI controller transfer function
The PI controller transfer function is:
The PD controller transfer function
The PD controller transfer function is:
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL PD_OR_PI_Instance (SP:=SetpointInput, 
    PV:=ProcessVariable, MODE:=OperatingModes, 
    PARA:=Parameter, YMAN:=ManualManipulatedVariable, 
    FEED_FWD:=Disturbance, Y:=ManipulatedVariable, 
    ERR=>SystemDeviation, STATUS=>StatusOfOutput_Y)
Representation in ST
Representation:
PD_OR_PI_Instance (SP:=SetpointInput, PV:=ProcessVariable, 
    MODE:=OperatingModes, PARA:=Parameter, 
    YMAN:=ManualManipulatedVariable, 
    FEED_FWD:=Disturbance, Y:=ManipulatedVariable, 
    ERR=>SystemDeviation, STATUS=>StatusOfOutput_Y) ;
Parameter description PD_OR_PI
Description of input parameters:
Parameter
Data type
Description
SP
Setpoint input (reference variable)
PV
REAL
Process variable (controlled variable)
MODE
Operating mode
PARA
Parameter
YMAN
REAL
Manual manipulated variable
FEED_FWD
REAL
Disturbance variable
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
Output status
Parameter description Mode_MH
Data structure description
Element
Data type
Description
man
"1": Manual mode
halt
BOOL
"1": Halt mode
Parameter description Para_PD_PI
Data structure description
Element
Data type
Description
trig_err
Changeover switching value for PDPI controller
gain_d
REAL
PD controller proportional action coefficient (gain)
td
PD controller rate time
td_lag
TIME
Delay of the PD controller rate time
gain_i
REAL
PI controller proportional action coefficient (gain)
ti
TIME
PI controller reset time
ymax
REAL
Upper limit
ymin
REAL
Lower limit
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 CLC_PRO.