FB_BARSunblindPrioritySwitch

Priority controller for up to 9 positioning telegrams (stSunblind_Prio1 ... stSunblind_Prio9) of the type ST_BARSunblind.

FB_BARSunblindPrioritySwitch 1:
FB_BARSunblindPrioritySwitch

Structure of the blind positioning telegram ST_BARSunblind.

TYPE ST_BARSunblind:
STRUCT
     uiPosition  : UINT;
     iAngle      : INT;
     bManUp      : BOOL;
     bManDown    : BOOL;
     bManualMode : BOOL;
     bActive     : BOOL;
END_STRUCT
END_TYPE

Up to 9 positioning telegrams from different control function blocks can be applied to this function block. The telegram on stSunblind_Prio1 has the highest priority and that on stSunblind_Prio9 the lowest. The active telegram with the highest priority is output at stSunblind. "Active" means that the variable bActive is set within the structure of the positioning telegram.

FB_BARSunblindPrioritySwitch 2:

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. uiPosition=0, iAngle=0, bManUp=FALSE, bManDown=FALSE, bManualMode=FALSE, bActive=FALSE. Since the blind function block FB_BARSunblindActuator or the roller blind function block FB_BARRollerblind does not take account of the flag bActive, 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

stSunblind_Prio1  : ST_BARSunblind;
stSunblind_Prio2  : ST_BARSunblind;
stSunblind_Prio3  : ST_BARSunblind;
stSunblind_Prio4  : ST_BARSunblind;
stSunblind_Prio5  : ST_BARSunblind;
stSunblind_Prio6  : ST_BARSunblind;
stSunblind_Prio7  : ST_BARSunblind;
stSunblind_Prio8  : ST_BARSunblind;
stSunblind_Prio9  : ST_BARSunblind;

stSunblind_Prio1..stSunblind_Prio9 : positioning telegrams available for selection. stSunblind_Prio1 has the highest priority and stSunBld_Prio9 the lowest.

VAR_OUTPUT

stSunblind    : ST_BARSunblind;

stSunblind: resulting positioning telegram.