FB_BA_AC_PreHtr
The template represents the open-loop and closed-loop control of a hot water air heater.
The main tasks of the template are:
- Control of the supply air temperature (TSuACtrl).
- Control of the return temperature (TRtCtrl).
- Frost monitoring on the air side with frost protection thermostat (FrostThermostat).
- Frost monitoring air side with analog frost protection sensor (TFrost).
- Enable the heater pump (Pu).
- Control of the heater valve (Vlv).
- Collecting and evaluating safety-relevant faults using the PlantLock
- To be part of the step sequence control of an air conditioning system, see Aggregates
A maximum choice of control signals from the temperature sequence controller TSuACtrl and the frost protection functions TFrostPrtcCtrlAir / TRtCtrl prevent the hot water air heater from icing up.
The initialization of the template takes place within the method FB_Init. |
Principle diagram 01
The principle diagram shows the intended use of the template with the plant elements involved.
Principle diagram 02
The diagram shows the integration of the template within a plant.
Block diagram
Syntax
FUNCTION_BLOCK FB_BA_AC_PreHtr EXTENDS FB_BA_View
VAR_INPUT
fSpTSuA : REAL;
fTSuA : REAL;
bSyncTSuACtrl : BOOL;
fSyncTSuACtrl : REAL;
bDehumf : BOOL;
bSkipPreRinse : BOOL;
fTWth : REAL;
bTWthLowLimit : BOOL;
bResetDehumf : BOOL;
END_VAR
VAR_OUTPUT
bCmd : BOOL;
fPresentValue : REAL;
bFrost : BOOL;
bPreRinseReady : BOOL;
bActiveSeqCtrl : BOOL;
END_VAR
VAR_IN_OUT
stTSeqLink : ST_BA_SeqLink;
stAggregate : ST_BA_Aggregate;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
{attribute 'parameterCategory' := 'Behaviour'}
fHysPuOn : REAL := 5.0;
{attribute 'parameterCategory' := 'Behaviour'}
fHysPuOff : REAL := 1.0;
END_VAR
VAR_INPUT CONSTANT
TFl : FB_BA_SensorAnalog;
TRt : FB_BA_SensorAnalog;
TSuACtrl : FB_BA_AC_PreHtrTSuACtrl;
TRtCtrl : FB_BA_AC_TRtCtrl;
TFrost : FB_BA_SensorAnalog;
TFrostPrtcCtrlAir : FB_BA_PID_Sp;
FrostThermostat : FB_BA_SensorBinary;
Vlv : FB_BA_Vlv;
Pu : FB_BA_Pu1st;
PlantLock : FB_BA_PlantLock;
Aggregate : FB_BA_Aggregate;
END_VAR
VAR
bPrioSfty : BOOL;
bPrioCrit : BOOL;
PrioSwiVal : FB_BA_PrioSwi_B04;
HysPu : FB_BA_Swi2P;
SyncTSuACtrl : FB_BA_RFTrig;
SyncSeqCtrlIsActive : FB_BA_RFTrig;
PrioSwiSync : FB_BA_PrioSwi_R04;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
fSpTSuA | REAL | Setpoint of the supply air temperature |
fTSuA | REAL | Measured value of the supply air temperature |
bSyncTSuACtrl | BOOL | Input for synchronization of the supply air sequence controller in the function block TSuACtrl. |
fSyncTSuACtrl | REAL | Synchronization value for the supply air sequence controller in the function block TSuACtrl. |
bDehumf | BOOL | Input dehumidification mode active. This state has an effect on the sequence control in the supply air temperature control TSuACtrl template. |
bSkipPreRinse | BOOL | Input to skip the pre-rinse process in the function block TRtCtrl. |
fTWth | REAL | Measured value weather temperature |
bTWthLowLimit | BOOL | The variable indicates that the outside temperature has fallen below the lower limit value. The following actions are triggered when the outside temperature falls below a critical value:
|
bResetDehumf | BOOL | Input to reset the dehumidification mode in the template TSuACtrl. |
Outputs
Name | Type | Description |
---|---|---|
bCmd | BOOL | Current switching status of the single-stage pump. |
fPresentValue | REAL | Current control value of the heater valve. |
bFrost | BOOL | Frost protection active display. The message is triggered either by the frost protection thermostat FrostThermostat or by falling below the lower limit value of the analog frost protection sensor TFrost. The signal Frost protection active triggers the plant operation mode Frost protection in the template FB_BA_AC_OpMod1St_Prio. |
bPreRinseReady | BOOL | Display, pre-rinse process has reached set temperature. This signal is used as a switching condition for the step sequence control of a ventilation system. |
bActiveSeqCtrl | BOOL | Indicates that the sequence controller TSuACtrl is the active one in the sequence control. |
Inputs/outputs
Name | Type | Description |
---|---|---|
stSeqLink | The data and command structure is the link between the supply air temperature sequence controller Ctrl and the supply air temperature sequence controller TSeqLink of an air conditioning system. | |
stAggregate | Bidirectional aggregate structure via which the enables and switching values are transmitted to the evaluation function block of the step sequence control Aggregate. The aggregate structure transmits the recorded feedback signals up and down to the central plant control. |
Inputs CONSTANT PERSISTENT
Name | Type | Description |
---|---|---|
fHysPuOn | REAL | Upper switching point of the hysteresis to switch on the pump. |
fHysPuOff | REAL | Lower switching point of the hysteresis to switch off the pump. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
TFl | The function block represents the flow temperature sensor. | |
TRt | The function block represents the return temperature sensor. | |
TSuACtrl | The function block represents the supply air temperature control of a preheater and is part of the temperature sequence control of an air conditioning system. The control signal is forwarded to the heater valve Vlv via a maximum selection. | |
TRtCtrl | The function block represents the open-loop and closed-loop control of the return temperature of a hot water air heater. The control signal is forwarded to the heater valve Vlv via a maximum selection. | |
TFrost | The function block represents a frost protection sensor on the air side. | |
TFrostPrtcCtrlAir | FB_BA_PID_Sp | The function block represents the analog frost protection monitoring on the air side of the preheater. The control signal is forwarded to the heater valve Vlv via a maximum selection. |
FrostThermostat | The function block represents a frost protection thermostat. | |
Vlv | The function block represents the heater valve. | |
Pu | The function block represents the heater pump. | |
PlantLock | When the function block is called, the relevant faults of the event-enabled objects are collected and output at this and lower levels of the template. These relevant faults cause specific switching actions via the variables bPrioSfty and bPrioCrit in the template. The event-enabled objects of the template that trigger faults with bPrioCrit are listed below. TRt.MV, TFrost.MV, FrostThermostat.Input, Pu.Dst The parameterization of the lock priority of the event-enabled objects can be found in the FB_init of this template. | |
Aggregates | The aggregate function block represents a receive block of a step sequence controller. Within the function block, the aggregate structure stAggregate is evaluated and integrated into the template using the inputs and outputs. |
Variables
Name | Type | Description |
---|---|---|
bPrioSfty | BOOL | The variable is an evaluation of the "Safety" lock priority of the event-enabled objects of the project structure and causes targeted switching actions in the template when a relevant fault is triggered. |
bPrioCrit | BOOL | The variable is an evaluation of the "Critical" lock priority of the event-enabled objects in the project structure and causes targeted switching actions in the template when a relevant fault is triggered. |
PrioSwiVal | The priority switch uses the command structure stCmd to determine the enable conditions for the supply air temperature control TSuACtrl and for the pre-rinse process of the return air temperature control TRtCtrl. | |
HysPu | The two-position switch switches the heater pump on and off depending on the valve position fPresentValue and the switching point of the hysteresis fHysPuOn/fHysPuOff. | |
SyncTSuACtrl | FB_BA_RFTrig | A rising edge at the input bValue of the function block synchronizes the supply air temperature control TSuACtrl to the value of fSyncTSuACtrl. |
SyncSeqCtrlIsActive | FB_BA_RFTrig | The variable TSuACtrl.bSeqActv indicates that the sequence control is active. This rising edge triggers a pulse at the input bValue of the function block SyncSeqCtrlIsActive. If the sequence controller of the preheater is the active one in the sequence control bActiveSeqCtrl and the lower limit of the outside temperature bTWthLowLimit is active, the pulse of SyncSeqCtrlIsActive triggers a synchronization of the supply air temperature controller TSuACtrl to the value of the valve position Vlv.fMdlt. |
PrioSwiSync | The priority switch prioritizes the synchronization of the supply air temperature control TSuACtrl. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |