FB_BA_LightAnalog

FB_BA_LightAnalog 1:

This template is used to control an analog light actuator.

The core element is the analog output function block FB_BA_AO_Raw, which provides the light value in BACnet and also converts the light value from 0 to 100 % to 0 to 32767. The allocated variable nLgtVal enables a direct link to a dimmer terminal (KL2751, KL2761).

The function block ignores the color temperature when controlling the light actuator.

The template has a feedback structure stFeedback.

If the programmed light actuator is an individual actuator or the reference actuator of a group, this feedback telegram must be linked to the controlling room (zone) user function in order to obtain information about the state of the actuator.

FB_BA_LightAnalog 2:

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

Block diagram

FB_BA_LightAnalog 3:

Syntax

FUNCTION_BLOCK FB_BA_LightAnalog  EXTENDS FB_BA_View
VAR_INPUT
  bEn                  : BOOL;
  stLightingCmd        : ST_BA_Lighting;
END_VAR
VAR_OUTPUT
  fActualLightValue    : REAL;
  eActualLightPrio     : BYTE;
  stFeedback           : ST_BA_LightActuatorFeedback;
END_VAR
VAR_INPUT CONSTANT
  ActualLightValue     : FB_BA_AO_Raw;
END_VAR
VAR
  nLgtVal      AT %Q*  : INT;
END_VAR

FB_BA_LightAnalog 4: Inputs

Name

Type

Description

bEn

BOOL

Enabling the function block.

stLightingCmd

ST_BA_Lighting

Resulting telegram from the higher-level zone (room).

FB_BA_LightAnalog 5: Outputs

Name

Type

Description

fActualLightValue

REAL

Current light value in percent.

eActualLightPrio

BYTE

Current priority of the command telegram stLightingCmd.

stFeedback

ST_BA_LightActuatorFeedback

Feedback telegram for linking to the controlling room (zone) application function. In this way, information about the state of the light actuator is fed back into the application function.

FB_BA_LightAnalog 6: Inputs CONSTANT

Name

Type

Description

ActualLightValue

FB_BA_AO_Raw

Function block for converting the percentage light value to the value range 0..32767 and for simultaneous display in BACnet.

VAR

Name

Type

Description

nLgtVal

INT

Output variable for linking with the dimmer terminal.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0