FB_BA_BuildingLighting

FB_BA_BuildingLighting 1:

This template compiles cross-building control telegrams for the light functions.

The "fire" and "burglary" alarms are usually recorded in the building controller (FB_BA_FireAlarmSystem and FB_BA_BurglarAlarmSystem). From there, they are sent with other information via the communication server (FB_BA_AdsComServer_Basic) to the floor controllers, where they are received in the counter-block FB_BA_AdsComClient_Basic and made available centrally in the local variable list Site.

The fire and burglary alarms can each trigger a separate light telegram via the FireAlert and Burglary Event function blocks. The telegrams are routed to a priority function block PrioSwi.

In addition to the alarms, a global reset of the light functions is provided in this template. On the one hand, it consists of manual triggering via a GlobalReset input object, which is parameterized in FB_Init as a push button and on the other hand, a trigger signal is generated when the building energy level "Protection" or "Economy" is reached, which is intended to signal "Absence".

The resulting light telegram from PrioSwi and the global reset "Light" are made available via the stBuildingLighting structure in the local variable list Site.

FB_BA_BuildingLighting 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_BuildingLighting 3:

Syntax

FUNCTION_BLOCK FB_BA_BuildingLighting EXTENDS FB_BA_View
VAR_INPUT CONSTANT PERSISTENT
  fLgtVal_FireAlert    : REAL;
  fLgtT_FireAlert      : REAL;
  fLgtVal_Burglary     : REAL;
  fLgtT_Burglary       : REAL;
END_VAR
VAR_INPUT CONSTANT
  FireAlert            : FB_BA_LightingEvt := ( ePrio := E_BA_LightingPrio.eFire);
  Burglary             : FB_BA_LightingEvt := ( ePrio := E_BA_LightingPrio.eBurglary);
  GlobalReset          : FB_BA_BV_Op;
END_VAR
VAR
  rtResetByEnergLvl    : R_TRIG;
  PrioSwi              : FB_BA_LightingTgmSel4;
END_VAR

FB_BA_BuildingLighting 4: VAR_INPUT CONSTANT PERSISTENT

Name

Type

Description

fLgtVal_FireAlert

REAL

Input light value [%] in case of fire.

Pre-set to 100% in FB_Init.

fLgtT_FireAlert

REAL

Input light temperature [K] in case of fire.

Pre-set to 4000 K in FB_Init.

fLgtVal_Burglary

REAL

Input light value [%] in case of burglary.

Pre-set to 100% in FB_Init.

fLgtT_Burglary

REAL

Enter the light temperature [K] in case of burglary.

Pre-set to 4000 K in FB_Init.

FB_BA_BuildingLighting 5: VAR_INPUT CONSTANT

Name

Type

Description

FireAlert

FB_BA_LightingEvt

Event telegram block for the fire alarm.

Burglary

FB_BA_LightingEvt

Event telegram block for the burglary alarm.

GlobalReset

FB_BA_BV_Op

Binary input object: Operating option to reset the light functions. This object is parameterized as non-latching in FB_Init, i.e. it generates a TRUE pulse.

VAR

Name

Type

Description

rtResetByEnergLvl

R_TRIG

Triggers the reset signal generated from the energy levels.

PrioSwi

FB_BA_LightingTgmSel4

Telegram selection block for the light telegrams.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0