FB_BA_AC_PreHtr

FB_BA_AC_PreHtr 1:

The template represents the open-loop and closed-loop control of a hot water air heater.

The main tasks of the template are:

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.

FB_BA_AC_PreHtr 2:

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.

FB_BA_AC_PreHtr 3:

Principle diagram 02

The diagram shows the integration of the template within a plant.

FB_BA_AC_PreHtr 4:

Block diagram

FB_BA_AC_PreHtr 5:

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

FB_BA_AC_PreHtr 6: 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:

  • Heater pump activation, forced pump operation
  • Enabling the return temperature control in the function block TRtCtrl
  • During plant start-up, pre-rinse mode is active in the function block TRtCtrl

bResetDehumf

BOOL

Input to reset the dehumidification mode in the template TSuACtrl.

FB_BA_AC_PreHtr 7: 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.

FB_BA_AC_PreHtr 8: Inputs/outputs

Name

Type

Description

stSeqLink

ST_BA_SeqLink

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

ST_BA_Aggregate

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.

FB_BA_AC_PreHtr 9: 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.

FB_BA_AC_PreHtr 10: Inputs CONSTANT

Name

Type

Description

TFl

FB_BA_SensorAnalog

The function block represents the flow temperature sensor.

TRt

FB_BA_SensorAnalog

The function block represents the return temperature sensor.

TSuACtrl

FB_BA_AC_PreHtrTSuACtrl

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

FB_BA_AC_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

FB_BA_SensorAnalog

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

FB_BA_SensorBinary

The function block represents a frost protection thermostat.

Vlv

FB_BA_Vlv

The function block represents the heater valve.

Pu

FB_BA_Pu1st

The function block represents the heater pump.

PlantLock

FB_BA_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

FB_BA_Aggregate

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

FB_BA_PrioSwi_B04

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

FB_BA_Swi2P

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

FB_BA_PrioSwi_R04

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