PLC libraries
5 PLC libraries
5.1 Function Block
5.1.1 FB_CTRL_TempController
The temperature controller block FB_CTRL_TempController has a variety of inputs and outputs that are
described below. All the controller's parameters are passed to it via structures. The structures and enums
are defined here [}33].
Function Block
VAR_INPUT
eCtrlMode: E_CTRL_MODE;
bSelSetpoint: BOOL;
fW1: LREAL;
fW2: LREAL;
fX: LREAL;
fYManual: LREAL;
bOpenThermocouple: BOOL; (* thermocouple *)
bReverseThermocouple: BOOL;
bBackVoltage: BOOL;
bLeakage: BOOL; (* heating system *)
bShortCircuit: BOOL;
bOpenCircuit: BOOL;
sParaControllerExternal: ST_CTRL_ParaController
END_VAR
VAR_IN_OUT
sControllerParameter: ST_CTRL_TempCtrlParameter; (* controller parameter set *)
END_VAR
VAR_OUTPUT
fYAnalog: LREAL;
bYPWMPos: BOOL;
bYPWMNeg: BOOL;
bYDigPos: BOOL;
bYDigNeg: BOOL;
dwAlarm: DWORD;
fMaxOverShoot: LREAL;
tStartUpTime: TIME;
eCtrlState: E_CTRL_STATE := eCTRL_STATE_IDLE;
sParaControllerInternal: ST_CTRL_ParaController;
bError: BOOL;
eErrorId: E_CTRL_ErrorCodes;
END_VAR
TC3 Temperature Controller 21Version: 1.1