FB_BA_AreaLighting
Selection of lighting operation for an area based on a schedule (Sched) and manual operation (OpModMan).
The manual operation has the following modes:
Value | Meaning |
---|---|
1 | Automatic mode. |
2 | Manual selection Night watchman tour. |
3 | Manual selection Building cleaning. |
4 | Manual selection Maintenance. |
5 | Manual selection User-defined 1. |
6 | Manual selection User-defined 2. |
If Automatic mode is selected, the function block DeMuxManMod sets the output bQ01. Since this output is not connected to the PrioSwi, the manual mode on the PrioSwi is disabled and the schedule Sched is active. This can assume the following values:
Value | Meaning |
---|---|
1 | Default. |
2 | Night watchman tour. |
3 | Building cleaning. |
4 | User-defined 1. |
5 | User-defined 2. |
The currently selected lighting mode eAreaMode, which is of the same type as the building mode, is then displayed via the OpModPr function block.
One of the Event function blocks is enabled based on the currently valid lighting mode. All possible light telegrams are routed to the priority function block PrioSwi in addition to the floor telegram stFloor on the input side. The resulting telegram is available to the room templates at the stArea output.
The initialization of the template takes place within the method FB_Init. |
Block diagram
Syntax
FUNCTION_BLOCK FB_BA_AreaLighting EXTENDS FB_BA_View
VAR_INPUT
stFloor : ST_BA_Lighting;
END_VAR
VAR_OUTPUT
stArea : ST_BA_Lighting;
END_VAR
VAR_INPUT CONSTANT
OpModMan : FB_BA_MV_Op;
OpModPr : FB_BA_MV_Op;
Sched : FB_BA_SchedM;
LgtValNightWatch : FB_BA_AV_Op;
LgtTNightWatch : FB_BA_AV_Op;
NightWatch : FB_BA_LightingEvt := ( ePrio := E_BA_LightingPrio.eNightWatch);
LgtValCleaning : FB_BA_AV_Op;
LgtTCleaning : FB_BA_AV_Op;
Cleaning : FB_BA_LightingEvt := ( ePrio := E_BA_LightingPrio.eCleaning);
LgtValMaintenance : FB_BA_AV_Op;
LgtTMaintenance : FB_BA_AV_Op;
Maintenance : FB_BA_LightingEvt := ( ePrio := E_BA_LightingPrio.eMaintenance);
LgtValUserDefined1 : FB_BA_AV_Op;
LgtTUserDefined1 : FB_BA_AV_Op;
UserDefined1 : FB_BA_LightingEvt := ( ePrio := 10);
LgtValUserDefined2 : FB_BA_AV_Op;
LgtTUserDefined2 : FB_BA_AV_Op;
UserDefined2 : FB_BA_LightingEvt := ( ePrio := 10);
END_VAR
VAR
DeMuxManMod : FB_BA_DMUX_B08;
DeMuxSched : FB_BA_DMUX_B08;
AreaMode : FB_BA_PrioSwi_UDI16;
eAreaMode : E_BA_BuildingMode;
PrioSwi : FB_BA_LightingTgmSel8;
END_VAR
Outputs
Name | Type | Description |
---|---|---|
stArea | Resulting light control telegram from this template, which represents the "Area" level. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
OpModMan | Manual input object for the building mode. | |
OpModPr | Resulting mode | |
Sched | Schedule object (automatic) for the building mode. | |
LgtValNightWatch | Input object for the night watchman tour light value. | |
LgtTNightWatch | Input object for the light temperature night watchman tour. | |
NightWatch | Event function block Night watchman tour. | |
LgtValCleaning | Input object for the building cleaning light value. | |
LgtTCleaning | Input object for the building cleaning light temperature. | |
Cleaning | Event function block Building cleaning. | |
LgtValMaintenance | Input object for the maintenance light value. | |
LgtTMaintenance | Input object for the maintenance light temperature. | |
Maintenance | Event gunction block Maintenance. | |
LgtValUserDefined1 | Input object for the "User-defined1" light value. | |
LgtTUserDefined1 | Input object for the "User-defined1" light temperature. | |
UserDefined1 | Event function block "User-defined1". | |
LgtValUserDefined2 | Input object for the "User-defined2" light value. | |
LgtTUserDefined2 | Input object for the "User-defined2" light temperature. | |
UserDefined2 | Event function block "User-defined2". |
VAR
Name | Type | Description |
---|---|---|
DeMuxManMod | Conversion of the multistate value of the manual selection to a binary output. | |
DeMuxSched | Conversion of the multistate value of the schedule to a binary output. | |
AreaMode | Prioritizing reconversion of the states to a resulting multistate or enumeration value for lighting operation in the building area. | |
eAreaMode | Currently valid lighting operation in building area. | |
PrioSwi | 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 |