FB_BARLightCircuit

FB_BARLightCircuit 1:

This function block represents a simple light switching circuit without a dimming function.

The function block knows three different modes, which can be set via the input uiLightCtrlMode:

In automatic mode (uiLightCtrlMode=0) the function block can be controlled via the inputs bSwitch, bCentralOff and bCentralOn. A rising edge on bCentralOff switches the output lrDimValue to 0.0, while a rising edge on bCentralOn sets the output to 100.0. Rising edges on bSwitch make the output lrDimValue change each time between 0.0 and 100.0.

In the manual operation modes the output value lrDimValueOut is set constantly to the value 100.0 if uiLightCtrlMode=1 and constantly to the value 0.0 if uiLightCtrlMode=2.

VAR_INPUT

uiLightCtrlMode    : UINT;
bSwitch            : BOOL;
bCentralOn         : BOOL;
bCentralOff        : BOOL;

uiLightCtrlMode: Operation mode.

bSwitch: Rising edges on bSwitch make the output lrDimValue change each time between 0.0 and 100.0.

bCentralOn: Switches the output lrDimValueOut to 100.0.

bCentralOff: Switches the output lrDimValueOut to 0.0.

Note: All switching commands, bSwitch, bCentralOn and bCentralOff are effective only in automatic mode.

VAR_OUTPUT

lrDimValue  : LREAL;
bLight      : BOOL;
bError      : BOOL;
udiErrorId  : UDINT;

lrDimValue: Light output value in percent; 0.0 if the light is switched off and 100.0 if the light is switched on.

bLight: FALSE if lrDimmValue = 0.0, otherwise TRUE.

bError: This output is switched to TRUE if the parameters entered are erroneous.

udiErrorId: Contains the error code if the values entered should be erroneous. See Error codes.

Requirements

Development environment

required library

required function

TwinCAT 3.1 build 4022.16 or higher

Tc2_HVAC V3.3.1.0

TF8000 | TC3 HVAC V1.0.0.0