FB_BA_SunBldScn

FB_BA_SunBldScn 1:

This function block represents an extension of the manual controller FB_BA_SunBldSwi by a scene memory and a call function. The blind control FB_BA_SunBldActr or the roller blind control FB_BA_RolBldActr can be active in manual mode and also directly target previously stored positions (scenes). Up to 21 scenes can be saved.

Structure of the blind positioning telegram ST_BA_Sunbld.

TYPE ST_BA_SunBld:
STRUCT
     rPos        : REAL;
     rAngl       : REAL;
     bManUp      : BOOL;
     bManDwn     : BOOL;
     bManMod     : BOOL;
     bActv       : BOOL;
END_STRUCT
END_TYPE

Operation

In manual mode, the function block controls the blind function block FB_BA_SunBldActr or the roller shutter function block FB_BA_RolBldActr via the command inputs bUp and bDwn; bUp has priority. The commands are passed on to the respective commands bManUp and bManDwn of the positioning telegram. If a command input is activated that is longer than the entered time udiSwiOvrTi_ms [ms], then the corresponding control command latches. Activating a command input again releases this latch.
A rising edge on bSavScn saves the current position and louvre angle in the scene selected in udiSlcdScn . This procedure is possible at any time, even during active positioning. The selected scene is called with bClScn, i.e. the saved position and angle values are driven to.
If the function block is activated by input bEn=TRUE, bit bActv is set immediately in the positioning telegram. The function block uses this to notify a priority switch (FB_BA_SunBldPrioSwi4 or FB_BA_SunBldPrioSwi8) of its priority over lower priorities. If the command "Call Scene" is not active (bClScn =TRUE), the bit bManMod is also set in the positioning telegram to notify the connected actuator function blocks that they should respond to manual commands.

If the function block is deactivated by bEn=FALSE, both bits, bActv and bManMod, are set to FALSE again.

Linking to the blind function block

Like the "normal" manual mode function block FB_BA_SunBldSwi, the scene selection function block can be connected either via an upstream priority control FB_BA_SunBldPrioSwi4 or FB_BA_SunBldPrioSwi8, or directly via the blind function block. The connection is established via the positioning telegram ST_BA_Sunbld. Furthermore the scene function block requires the current positions from the blind function block for the reference blind:

Use of a priority controller:

FB_BA_SunBldScn 2:

Direct connection:

FB_BA_SunBldScn 3:

VAR_INPUT

bEn            : BOOL;
bUp            : BOOL;
bDwn           : BOOL;
udiSwiOvrTi_ms : UDINT;
udiSlcdScn     : UDINT;
bClScn         : BOOL;
bSavScn        : BOOL;
rSpPos         : REAL;
rSpAngl        : REAL;

bEn: The function block has no function if this input is FALSE. In the positioning telegram ST_BA_Sunbld, 0 is output for the position and the angle - bManMod and bActv are FALSE. For a connection with priority controller this means that another functionality takes over control of the blind. Conversely, a direct connection allows the blind to drive directly to the 0 position, i.e. fully up, since the actuator function block does not evaluate the bit bActv itself.

bUp: Command input for blind up.

bDwn: Command input for blind down.

udiSwiOvrTi_ms: Time [ms] until the corresponding manual command in the positioning telegram ST_BA_Sunbld switches to latching mode, if the command input is activated permanently. Internally limited to a minimum value of 0.

udiSlcdScn: Selected scene which should either be saved (bSavScn) or called (bClScn). Internally limited to a minimum value of 0 to cMaxSunBldScn.

bClScn: Call selected scene.

bSavScn: Save selected scene.

rSpPos: Set position [%] that is to be saved in the selected scene. This must be linked to the actual position of the actuator function block FB_BA_SunBldActr or FB_BA_RolBldActr of the reference blind/roller shutter, in order to be able to save a position that was previously approached manually. Internally limited to values between 0 and 100.

rSpAngl: ditto. Louvre angle [°].

VAR_OUTPUT

stSunBld      : ST_BA_SunBld;
bActv         : BOOL;
rActlScnPos   : REAL;
rActlScnAngl  : REAL;

stSunBld: Positioning telegram, see ST_BA_SunBld.

bActv: Corresponds to the boolean value bActv in the blind telegram ST_BA_SunBld and is solely used to indicate whether the function block sends an active telegram.

rActlScnPos: Indicates the saved relative blind height position [%] for the currently selected scene.

rActlScnAngl: ditto. Louvre angle [°].

FB_BA_SunBldScn 4:

If an error occurs, this automatic control is deactivated, and the position and angle are set to 0. This means that if a priority controller is in use, another function with a lower priority (see Overview) automatically takes over control of the blind. In the case of a direct connection, conversely, the blind will drive to position/angle 0.

VAR_IN_OUT

arrSunBldScn : ARRAY[0..Param.usiMaxSunBldScn] OF ST_BA_SunBldScn;

arrSunBldScn: Table with the scene entries of the type ST_BA_SunBldScn.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0