FB_BA_LightingEvt

FB_BA_LightingEvt 1:

The function block FB_BA_LightingEvt is used to set the light value and the color temperature at any event. It can be used, for example, to switch the lights during the night watchman tour or for building cleaning.

If the function block is enabled via the input bEn, the active flag in the light control telegram (bActv in stLighting) is set at output stLighting. The values entered at the input variables fLgtVal for the light value [%] and fLgtT for the light temperature [K] are passed on in this telegram. If the function is no longer active by resetting bEn, the active flag in the light control telegram stLighting is reset and the values for brightness and color temperature are set to "0". With a telegram selection block (e.g. FB_BA_LightingTgmSel8) a function of lower priority can take over the control by resetting.

The priority (E_BA_LightingPrio) of the output telegram can be defined via the parameter ePrio (VAR_INPUT CONSTANT PERSISTENT). It is preset to eManualActuator.

Information about inherited elements

The function block inherits from the internal base class FB_BA_BaseLightingEvt, which contains a telegram counter for determining the last command sent.

FB_BA_LightingEvt 2: Inputs

VAR_INPUT
  bEn         : BOOL;
  fLgtVal     : REAL;
  fLgtT       : REAL;
END_VAR

Name

Type

Description

bEn

BOOL

A TRUE signal on this input activates the function block and transfers the entered setpoints together with the active flag in the light setting telegram ST_BA_Lighting. A FALSE signal resets the active flag again and sets the light value to zero.

fLgtVal

REAL

Light value [%]

fLgtT

REAL

Light temperature [K]

FB_BA_LightingEvt 3: Inputs CONSTANT PERSISTENT

VAR_INPUT CONSTANT PERSISTENT
  ePrio         : E_BA_LightingPrio := E_BA_LightingPrio.eScene1;
END_VAR

Name

Type

Description

ePrio

E_BA_LightingPrio

Priority E_BA_LightingPrio of the telegram, preset to eScene1.

FB_BA_LightingEvt 4: Outputs

VAR_OUTPUT
  stLighting    : ST_BA_Lighting;
  bActv         : BOOL;
END_VAR

Name

Type

Description

stLighting

ST_BA_Lighting

Light setting telegram

bActv

BOOL

Active

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0