BAC_AC_PreHtr_PID_01

Functional description

The subtemplate BAC_AC_PreHtr_PID_01 is the sequence controller for a preheater.

The set value, actual value and control output are referenced via the BACnet value objects X, W and Y.

The PID sequence controller is enabled based on the plant operation mode udiOpMod and the global temperature communication structure g_stSeqLinkT[PLT_NUM].

This data and command structure is the link between the individual sequence controllers and the corresponding control function block FB_BA_SeqLink of a plant.

The BACnet BV object En is used to display the controller enable.

The limit value monitoring of PID controller is controlled by the function block EnEvtEn as a function of the plant startup process.

In dehumidification mode bDeHum = TRUE, the PID sequence controller is disabled.

Interface

BAC_AC_PreHtr_PID_01 1:

System diagram

BAC_AC_PreHtr_PID_01 2:

Block diagram

BAC_AC_PreHtr_PID_01 3:

VAR_INPUT

rX         : REAL; 
rW         : REAL; 
bSync      : BOOL; 
rFdbVlv    : REAL; 
bDeHum     : BOOL;
udiPltStp  : UDINT; 
udiOpMod   : UDINT; 

rX: Measured value supply air temperature

rW: Set value of the supply air temperature

bSync: Input for synchronisation of the controller

rFdbVlv: Position feedback actuator

bDeHum: Dehumidification active, supply air temperature controller disabled.

udiPltStp: Steps during startup of the air-conditioning plant. See also BAC_AC_StartT_01

udiOpMod: Plant operation mode. See also BAC_AC_OpMod_01

VAR_OUTPUT

rY    : REAL; 

rY: Control value output control valve

VAR CONSTANT

PLT_NUM    : BYTE := 1;

PLT_NUM: all alarms and events of all plant components within a controller are included in a global alarm and event list. The assignment of events and alarms to a plant is defined by the assignment of a PLT_NUM plant number.
The recording and processing of an alarm from an aggregate or a device takes place within the templates by means of the alarm function block FB_BA_Alarm.
The evaluation of the alarms of a plant, e.g. for the generation of a collective message or for plant shutdown in case of relevant faults, takes place within the template BAC_PltAlm_01 by means of the function block FB_BA_AlarmPlt.
The evaluation of different plant events within the templates of a plant, takes place within the template BAC_PltComnMsg_01 by means of the function block FB_BA_ComnMsg.

Important! The assignment and evaluation of the alarms and events of a plant can only be done correctly if all templates of a plant have the same plant number!

Within a ventilation system with sequence controller the plant number indicates which field from the global data structure g_stSeqLinkT[PLT_NUM] is used as link between the individual sequence controllers and the corresponding control function blockFB_BA_SeqLink.

The plant number can be assigned in the Project Builder in the parameter menu for the templates or via a column in the Excel import.

Program description

Instance

Type

Task

X

FB_BACnetAVDisplay

The AV object is referenced to the actual value input of the BACnet loop object

W

FB_BACnetAVDisplay

The AV object is referenced to the setpoint input of the BACnet loop object

OpModPrio

FB_BA_MMUX_B08

The multiplexer defines the enable conditions of the sequence controller depending on the plant operation mode.

udiOpMod

Enable

Comment

OPMOD_AC_MANON

Manual on

TRUE

The plant is switched on manually via the plant selector switch

OPMOD_AC_ON

On

TRUE

The plant runs in automatic mode via the timer program

OPMOD_AC_COLDWNPRTC

Support operation, cooling protection

TRUE

The plant operates in cooling protection mode

En

FB_BACnetBV1204

The BV object is used to display and activate the controller enable in the MCL or in a local operating display.
The controller is enabled depending on the plant operation mode.

AND

The AND function block locks the enable of the sequence controller in dehumidification mode. Switching from preheater to reheater is done in the template BAC_AC_SeqT_01 by the sequence linker.

EnEvtEn

FB_BA_LmtCtrl

The BACnet loop object PID monitors the control function by comparing the setpoint W with the actual value X. If the deviation W-X is greater than the property ErrorLimit, then the loop object sends a message to the MCL.

When the plant is at a standstill, at the moment of startup and until the plant is in a controlled state, the loop object is suppressed so that no incorrect messages are sent to the MCL. Reporting of the loop object should not be activated until the air-conditioning system is fully running and the control is stable. In addition, reporting is enabled if the control has not reached the range around the setpoint defined by the property ErrorLimit after a long time.

Enabling the object internal reporting is done by writing to the BACnetEventTransitionBits of the loop object.

The following conditions must be met to enable reporting from the loop object:

1.
The plant startup program BAC_AC_StartT_01 has enabled control monitoring and sensor limit monitoring
udiPltStp >= PLTSTP_AC_ENLMTMONIT
and
The heater controller is the active controller in the control sequence. g_stSeqLinkT[PLT_NUM].usiCurCtrl = SEQNUM_T_PREHTR
and
The supply air temperature has approached the setpoint to a point where it has settled into a range between rSp - ErrorLimit and rSp + ErrorLimit.
and
The supply air temperature must have remained within the range of rSp - ErrorLimit and rSp + ErrorLimit for at least the duration of EnEvtEn_udiTiSttDly.

2.
The timer EnEvtEn_udiTiSttAuto has expired and the control has not reached its setpoint range.

 

F_BA_EvtTrans

writes to the BACnetEventTransitionBits to_offnormal, to_fault and to_normal of the loop object. The input bEnEvtEn must be TRUE

PID

FB_BACnetLoopSeq1202

Sequence controller supply air temperature preheater.

rtrigSync

R_TRIG

A rising edge at input bSync triggers synchronization of the loop object to the value of lrSync.
If the control valve of the preheater was overridden by writing a higher priority to the corresponding AO object of the MCL or by activating the local priority operation, the current position of the control valve deviates from the output of the loop object. The variables bSync and rFdbVlv can be used to restore synchronicity between the position of the control valve and the controller.

Y

FB_BACnetAVSetpoint

The AV object is referenced to the control value output of the BACnet loop object

Version history

Version number

Comments

1.0.1

First release