FB_BA_PID_Sp

The template is a universal PID controller.
The PID controller is enabled via the input variable bEn.
The setpoint is entered via the AV object Sp.
![]() | The initialization of the template takes place within the method FB_Init. |
Block diagram

Syntax
FUNCTION_BLOCK FB_BA_PID EXTENDS FB_BA_View
VAR_INPUT
bEn : BOOL;
fX : REAL;
bSync : BOOL;
fSync : REAL;
END_VAR
VAR_OUTPUT
fY : REAL;
fMax : REAL;
fMin : REAL;
END_VAR
VAR_INPUT CONSTANT
Sp : FB_BA_AV_Op;
Ctrl : FB_BA_Loop;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
bEn | BOOL | General enable of the template |
fX | REAL | Actual value |
bSync | BOOL | A rising edge at this input triggers synchronization of the loop object to the value of fSync. |
fSync | REAL | Synchronization value |
Outputs
Name | Type | Description |
---|---|---|
fY | REAL | Control value output |
fMax | REAL | Maximum controller value |
fMin | REAL | Minimum controller value |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |