FB_BA_SunBldPrioSwi8

FB_BA_SunBldPrioSwi8 1:

The function block is used for priority control for up to 8 positioning telegrams (stSunBld_Prio1 ... stSunBld_Prio8) of type ST_BA_SunBld.

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

Up to 8 positioning telegrams from different control function blocks can be applied to this function block. The telegram on stSunBld_Prio1 has the highest priority and that on stSunBld_Prio8 the lowest. The active telegram with the highest priority is output at the output stSunBld. "Active" means that the variable bActv is set within the structure of the positioning telegram.

This function block is to be programmed in such a way that one of the applied telegrams is always active. If no telegram is active, an empty telegram is output, i.e. rPos=0, rAngl=0, bManUp=FALSE, bManDwn=FALSE, bManMod=FALSE, bActv=FALSE. Since the blind function block FB_BA_SunBldActr or the roller blind function block FB_BA_RolBldActr does not take account of the flag bActv, this telegram would be interpreted as movement command to position "0", i.e. fully open. The absence of an active telegram therefore does not represent a safety risk for the blind.

VAR_INPUT

stSunBld_Prio1  : ST_BA_SunBld;
stSunBld_Prio2  : ST_BA_SunBld;
stSunBld_Prio3  : ST_BA_SunBld;
stSunBld_Prio4  : ST_BA_SunBld;
stSunBld_Prio5  : ST_BA_SunBld;
stSunBld_Prio6  : ST_BA_SunBld;
stSunBld_Prio7  : ST_BA_SunBld;
stSunBld_Prio8  : ST_BA_SunBld;

stSunBld_Prio1..stSunBld_Prio8: Positioning telegrams available for selection. stSunBld_Prio1 has the highest priority and stSunBld_Prio8 the lowest.

VAR_OUTPUT

stSunBld    : ST_BA_SunBld;
udiActvPrio : UDINT;

stSunBld: Resulting positioning telegram.
udiActvPrio: Active positioning telegram. If none is active, "0" is output.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0