FB_BA_SunBldScn
The function block FB_BA_SunBldScn represents an extension of the manual operation FB_BA_SunBldSw by a scene memory and a call function. The blind actuator FB_BA_SunBldActr or the roller blind actuator FB_BA_RolBldActr can thus be controlled in manual operation mode and can also drive directly to previously saved positions (scenes). Up to 21 scenes can be saved.
Operation
In manual mode, the function block controls the blind function block FB_BA_SunBldActr or the roller blind 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 for longer than the entered time nSwiOvrTi [ms], the corresponding control command latches. Activating a command input again releases this latch.
A rising edge on bSavScn saves the current position and lamella angle in the scene selected in nSlcdScn. This procedure is possible at any time, even during active positioning.
A rising edge at bClScn calls the scene that is present at input nSlcdScn. This scene call can be interrupted by manual commands to bUp and bDwn.
Manual control and scene positioning are each carried out with the priority that is preselected under ePrio.
If the function is no longer active due to the resetting of bEn, then the active flag in the positioning telegram stSunBld is reset and the positions for height and angle are set to "0". The priority function block (e.g. FB_BA_SunBldPrioSwi4) enables a function with lower priority to take over the control by resetting.
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:
Direct connection:
Inputs
VAR_INPUT
bEn : BOOL;
bUp : BOOL;
bDwn : BOOL;
nSwiOvrTi : UDINT;
nSlcdScn : UDINT;
bClScn : BOOL;
bSavScn : BOOL;
fSpPos : REAL;
fSpAngl : REAL;
END_VAR
Name | Type | Description |
---|---|---|
bEn | BOOL | The function block has no function if this input is FALSE. 0 is output for the position and the angle in the positioning telegram ST_BA_Sunbld - bManMod and bActv are set to 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 | BOOL | Command input for blind up. |
bDwn | BOOL | Command input for blind down. |
nSwiOvrTi | UDINT | 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. |
nSlcdScn |
UDINT |
Selected scene which should either be saved (bSavScn) or called (bClScn). Internally limited to a minimum value from 0 to BA_Param.nSunPrt_MaxSunBldScn |
bClScn |
BOOL |
Call selected scene |
bSavScn |
BOOL |
Save selected scene |
fSpPos |
REAL |
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 blind, in order to be able to save a position that was previously approached manually. Internally limited to values between 0 and 100. |
fSpAngl |
REAL |
ditto slat angle [°] |
Inputs CONSTANT PERSISTENT
VAR_INPUT CONSTANT PERSISTENT
ePrio : E_BA_SunBldPrio := E_BA_SunBldPrio.eScene1;
END_VAR
Name | Type | Description |
---|---|---|
ePrio | E_BA_SunBldPrio | Priority of the active telegram. |
/ Inputs/Outputs
VAR_IN_OUT
aSunBldScn : ARRAY[0..BA_Param.nSunPrt_MaxSunBldScn] OF ST_BA_SunBldScn;
END_VAR
Name | Type | Description |
---|---|---|
aSunBldScn | ARRAY OF ST_BA_SunBldScn | Table with the scene entries |
Outputs
VAR_OUTPUT
stSunBld : ST_BA_SunBld;
bActv : BOOL;
fActlScnPos : REAL;
fActlScnAngl : REAL;
END_VAR
Name | Type | Description |
---|---|---|
stSunBld | Output telegram, for the position and angle of the lamella. | |
bActv | BOOL | 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. |
fActlScnPos | REAL | Indicates the saved relative blind height position [%] for the currently selected scene. |
fActlScnAngl | REAL | ditto slat angle [°] |
If an error occurs, this automatic control is disabled 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. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.22 | Tc3_BA2 from v5.2.5.0 |