FB_BA_RoomSample1
This template represents a sample room with heating, cooling and shading functions.
Since the requirements for rooms or zones are very different, corresponding changes and adjustments must be made to this template by the user.
- Heating/cooling function
The central function block of this area is the subordinate template FB_BA_HeatCool_PID, which controls a heating and a cooling valve (each a FB_BA_ActuatorAnalog) on the basis of the room or zone sensors, the existing heating or cooling medium and the building data.
The presence detection and the window contacts are used to determine which energy level is to be reached: if the windows are open, the "Protection" level is selected as a priority. If they are closed and presence is detected, the Comfort level is decisive. Otherwise, the current generally applicable level of the building (global variable eBuildingEnergyLevel, see Site) is assumed. In conjunction with a room temperature sensor, in this sample the average of RmTSen1 and RmTSen2, a small setpoint value shift RmTAdj and the room temperature setpoints (global Variable stBuildingSpRmT, see Site), the corresponding controller is controlled. In a two-pipe system, the "correct" medium must be available throughout the building (eMedium). In cooling mode, the DewPointSensor must not have triggered. - Shading
Using the template FB_BA_SunblindZone, two sun protection actuators (FB_BA_SunBld) are controlled here as an example. For this purpose, the room temperature, as well as the presence for detection thermal automatic / sun protection is created. In addition to the room temperature levels (global variable stBuildingSpRmT, see Site), which are required to assess the heating or cooling mode of the thermal automatic, the facade and building-specific telegrams and releases are retrieved via the global variable structure stFacade (see Site).
The initialization of the template takes place within the method FB_Init. |
Illustration
FUNCTION_BLOCK FB_BA_RoomSample1 EXTENDS FB_BA_View
VAR_INPUT
eMedium : E_BA_Medium;
stFacade : ST_BA_Facade;
END_VAR
VAR_INPUT CONSTANT
Ctrl : FB_BA_HeatCool_PID;
VlvHtg : FB_BA_ActuatorAnalog;
VlvCol : FB_BA_ActuatorAnalog;
PrcDetc : FB_BA_SensorBinary;
Presence : FB_BA_PresenceMonitoring;
WdwCon1 : FB_BA_SensorBinary;
WdwCon2 : FB_BA_SensorBinary;
DewPointSensor : FB_BA_SensorBinary;
RmTSen1 : FB_BA_SensorAnalog;
RmTSen2 : FB_BA_SensorAnalog;
RmTAdj : FB_BA_SensorAnalog;
SunBldZone : FB_BA_SunblindZone;
SunBld1 : FB_BA_SunBld;
SunBld2 : FB_BA_SunBld;
VAR
RmTAvg : FB_BA_EnAvrg02;
END_VAR
VAR
bBlindUp AT %I* : BOOL;
bBlindDown AT %I* : BOOL;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
eMedium | Current medium, if there is a two-pipe system: heating or cooling | |
stFacade | Facade-specific blind data and telegrams. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
Ctrl | Heating-cooling control block. | |
VlvHtg | Analog output object heating valve. | |
VlvCol | Analog output object cooling valve. | |
PrcDetc | Binary input object occupancy sensor. | |
Presence | Presence evaluation function block with switch-off delay and reset. | |
WdwCon1 | Binary input object window contact. | |
WdwCon2 | Binary input object window contact. | |
DewPointSensor | Binary input object dew point sensor. | |
RmTSen1 | Analog input object room temperature sensor. | |
RmTSen2 | Analog input object room temperature sensor. | |
RmTAdj | Analog input object setpoint adjustment. | |
SunBldZone | Function block blind-specific zone functions. | |
SunBld1 | Control block for a blind. | |
SunBld2 | Control block for a blind. |
VAR
Name | Type | Description |
---|---|---|
RmTAvg | FB_BA_EnAvrg02 | Averaging over the room temperatures. |
bBlindUp | BOOL | Control variable blinds up. |
bBlindDown | BOOL | Control variable blinds down. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |