FB_BA_SunPrtc

FB_BA_SunPrtc 1:

The function block is used for glare protection with the aid of a slatted blind.

Glare protection is realized through variation of the louvre angle and positioning of the blind height.

The louvre angle is set as a function of the sun position such that direct glare is prevented, while letting as much natural light through as possible.

Three different operating modes are available for varying the blind height.

  1. When sun protection is active, the blind moves to a fixed height. The height value is specified with the variable rFixPos.
  2. The blind position is varied as a function of the sun position. The position is specified in the table (ST_BA_BldPosTab). See also description of FB_BA_BldPosEntry.
  3. The high of the blind is calculated based on the window geometry such that the sun's rays reach a specified depth in the room. The incidence depth of the sun's rays is defined with the variable rMaxLgtIndc.

In order to avoid excessive repositioning of the louvre angle, the variable udiPosIntval_min can be used to specify a time interval, within which the louvre angle is not adjusted. In order to avoid glare, the angle is always changed sufficiently for the respective time interval.

The following conditions must be met for positioning the blind and setting the louvre angle.

VAR_INPUT

bEn               : BOOL;
stUTC             : TIMESTRUCT;
udiPosIntval_min  : UDINT;
rDegLngd          : REAL;
rDegLatd          : REAL;
rFcdOrtn          : REAL;
rFcdAngl          : REAL;
rLamWdth          : REAL;
rLamDstc          : REAL;
rFixPos           : REAL;
rMaxLgtIndc       : REAL;
rWdwHght          : REAL;
rDstcWdwFr        : REAL;
stBldPosTab       : ST_BA_BldPosTab;
ePosMod           : E_BA_PosMod;

bEn: If this input is set to FALSE the positioning is inactive, i.e. the active bit (bActv) is reset in the positioning structure stSunBld of the type ST_BA_Sunbld and the function block itself remains in a standstill mode. If on the other hand the function block is activated, then the active bit is TRUE and the function block outputs its control values (rPos, rAngl) in the positioning structure at the appropriate times.

stUTC: Input of current time as coordinated world time (UTC - Universal Time Coordinated, previously referred to as GMT, Greenwich Mean Time) (see TIMESTRUCT). The function block FB_BA_GetTime can be used to read this time from a target system.

FB_BA_SunPrtc 2:

A jump of more than 300 seconds leads to immediate repositioning, if the blind is in the sun and glare protection is active, based on the above criteria. This functionality was added to ensure a reproducible program execution.

udiPosIntval_min: Positioning interval in minutes - time between two blind position outputs. Valid range: 1 min...720 min.

rDegLngd: Longitude [°]. Valid range: - 180°...180°.

rDegLatd: Latitude [°]. Valid range: - 90°...90°.

rFcdOrtn: Facade orientation [°]:

In the northern hemisphere, the following applies for the facade orientation (looking out of the window):

Line of sight

Facade orientation

North

β=0°

East

β=90°

South

β=180°

West

β=270°

The following applies for the southern hemisphere:

Line of sight

Facade orientation

South

β=0°

East

β=90°

North

β=180°

West

β=270°

rFcdAngl: Facade inclination [°]. See facade inclination.

rLamWdth: Width of the louvres in mm, see Louvre adjustment.

rLamDstc: Louvre spacing in mm, see Louvre adjustment.

rFixPos: Fixed (constant) shutter height [0..100%]. Applies if ePosMod = ePosModFix (see enumerator E_BA_PosMod).

rMaxLgtIndc: Maximum desired light incidence in mm measured from the outside of the wall (see Height adjustment). The parameters rWdwHght and rDstcWdwFlr are used to calculate how high the blinds must be, depending on the position of the sun, such that the incidence of light does not exceed the value rMaxLgtIndc. Applies if ePosMod = ePosModeMaxIncidence (see enumerator E_BA_PosMod).

rWdwHght: Window height in mm for the calculation of the shutter height if the mode "maximum desired incidence of light" is selected.

rDstcWdwFlr: Distance between the floor and the window sill in mm for the calculation of the shutter height if the mode "maximum desired incidence of light" is selected.

stBldPosTab: Table of 6 interpolation points, 4 of which are parameterizable, from which a blind position is then given in relation to the position of the sun by linear interpolation. Applies if ePosMod = ePosModFix (see enumerator E_BA_PosMod). For a more detailed description please refer to FB_BA_BldPosEntry.

ePosMod: Selection of the positioning mode, see enumerator E_BA_PosMod.

VAR_OUTPUT

stSunBld     : ST_BA_SunBld;
bActv        : BOOL;
bErr         : BOOL;
sErrorDescr  : T_MAXSTRING;

stSunBld: Output structure of the blind positions, see ST_BA_SunBld

bActv: The function block is in active state, i.e. no error is pending, the function block is enabled, and the sun position is in the specified facade area (the facade is sunlit).

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

sErrDescr: Contains the error description.

Error description

01: Error: The duration of the positioning interval is less than or equal to zero, or it exceeds 720 min.

02: Error: The longitude entered is not within the valid range from -180°..180°.

03: Error: The latitude entered is not within the valid range from -90°..90°.

04: Error: The value entered for the facade inclination rFcdAngl is outside the valid range of -90°..90°.

05: Error: The value for the louvre spacing (rLamDstc) is greater than or equal to the value for the louvre width (rLamWdth). This does not represent a "valid" blind, since the louvres cannot close fully. Mathematically, this would lead to errors.

06: Error: The value entered for the louvre width rLamWdth is zero.

07: Error: The value entered for the louvre spacing rLamDstc is zero.

08: Error: The value entered for the fixed blind height (rFixPos) is greater than 100 or less than 0. At the same time, "fixed blind height" positioning is selected - ePosMod=ePosModFix.

09: Error: The bit "values valid" (bVld) in the positioning table stBldPosTab is not set - invalid values: see FB_BA_BldPosEntry. At the same time, "Table" positioning is selected - ePosMod=ePosModTab.

10: Error: The value entered for the maximum required light incidence rMaxLgtIndc is less than or equal to zero. At the same time, "maximum light incidence" is selected - ePosMod=ePosModMaxIndc.

11: Error: The value entered for the window height rWdwHght is less than or equal to zero. At the same time, "maximum light incidence" is selected - ePosMod=ePosModMaxIndc.

12: Error: The distance between lower window edge and floor rDstcWdwFlr that was entered is less than zero. At the same time, "maximum light incidence" is selected - ePosMod=ePosModMaxIndc.

13: Error: An invalid positioning mode is entered at input ePosMod.

FB_BA_SunPrtc 3:

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.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0