Type
| Function block |
Description
| The PID / PID_LTIME function block is a third order Proportion + Integral + Derivative loop controller. The functionality is derived by functional composition of the function blocks
INTEGRAL / INTEGRAL_LTIME and
DERIVAT / DERIVAT_LTIME.Loop controllers like the function block have to be executed with a constant time interval. Generally two ways exist to fulfill this requirement. The first is to use this function block in a POU, which is executed by a task with a fixed time interval. The second one is to execute the function block using the ENABLE input parameter in conjunction with a cyclic signal, for example generated by a timer function block. This method is recommended only for slow controlling with greater time intervals. |
Notes
|
- The value of the operand connected to CYCLE has to correspond to the cycle time of the task in which the function block is used.
- Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
|
Parameters
| Inputs
ENABLE
Data type: | BOOL |
Description: | FALSE = Control disabled
TRUE = Control enabled
This input parameter may be used when a cyclic signal shall control the execution of the PID function block. |
AUTO
Data type: | BOOL |
Description: | TRUE = Automatic mode
FALSE = Manual mode
If AUTO = FALSE, the output value XOUT is calculated as follows: XOUT = KP * X0 |
PV
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Measured value of the process. |
SP
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Set point. |
X0
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Manual output adjustment (typical for transfer station). |
KP
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Proportional constant (amplification factor). This constant has to be negative. |
TR
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Reset time constant (time factor of integral term - time after that XOUT reaches the value of KP without consideration of the influence of the derivative term). |
TD
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Derivative time constant (time factor of derivative term - time before the derivative term leads to XOUT = KP in comparison to the proportional term without consideration of the influence of the integral term). |
CYCLE
Data type: | PID: TIMEPID_LTIME: LTIME |
Description: | Sampling period, i.e., time interval after which the FB is calculated again. |
Output
XOUT
Data type: | PID: REALPID_LTIME: LREAL |
Description: | Output value to the process. |
|