FB_BA_ShdCorr

FB_BA_ShdCorr 1:

The function block is used to assess the shading of a group of windows on a facade.

The function block FB_BA_ShdCorr calculates whether a window group lies in the shadow of surrounding objects. The result, which is output at the output bGrpNotShdd, can be used to judge whether sun shading makes sense for this window group.
The function block thereby accesses two lists, which are to be defined:

On the basis of the facade orientation (rFcdOrtn), the direction of the sun (rAzm) and the height of the sun (rElv), a calculation can be performed for each corner of a window to check whether this lies in a shaded area. A window group is considered to be completely shaded if all corners are shaded.

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 function block performs its calculations only if the sun is actually shining on the facade. Considering the drawing presented in the introduction, this is the case if:

Facade orientation < azimuth angle < facade orientation + 180°

FB_BA_ShdCorr 2:

In addition, a calculation is also not required, if the sun has not yet risen, i.e. the solar elevation is below 0°. In both cases the output bFcdSunlit is set to FALSE.

The situation is different for the southern hemisphere. The following applies to the facade orientation (looking out the window):

Line of sight

Facade orientation

South

β=0°

East

β=90°

North

β=180°

West

β=270°

The internal calculation or the relationship between facade and sunbeam also changes:

FB_BA_ShdCorr 3:

To distinguish between the situation in the northern and southern hemisphere, set the input parameter bSouth to FALSE (northern hemisphere) or TRUE (southern hemisphere)

VAR_INPUT

stTiActl   : TIMESTRUCT;
rFcdOrtn   : REAL;
rAzm       : REAL;
rElv       : REAL;
diGrpID    : DINT;
bSouth     : BOOL;
arrShdObj  : ARRAY[1..Param.uiMaxShdObj] OF ST_BA_ShdObj;

stTiActl: Input of the current time - local time in this case, since this time takes into account the shaded months. If the UTC time (or GMT) is used, the month may change in the middle of the day, depending on the location on the earth (see TIMESTRUCT).

rFcdOrtn: Facade orientation, see illustration above.

rAzm: Direction of the sun at the time of observation [°].

rElv: Solar altitude at the time of observation [°].

diGrpId: Window group regarded. The group 0 is reserved here for unused window elements, see FB_BA_FcdElemEntry. A 0-entry would lead to an error output (bErr=TRUE). The function block is then not executed any further and bGrpNotShdd is set to FALSE.

bSouth: FALSE: Calculations refer to conditions in the northern hemisphere - TRUE: In the southern hemisphere

arrShdObj: List of shading objects.

VAR_OUTPUT

bGrpNotShdd : BOOL;
bFcdSunlit  : BOOL;
bErr        : BOOL;
sErrDescr   : T_MAXSTRING

bGrpNotShdd: Is TRUE as long as the window group is not calculated as shaded.

bFcdSunlit: This output is set to TRUE if the sun is shining on the facade. See description above.

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

sErrDescr: Contains the error description.

Error description

01: Error: The index of the window group usiGrpId under consideration is 0.

02: Error: An element of the facade list is invalid. This is specified in the error description sErrDescr as arrFcdElem[nColumn,nRow].

VAR_IN_OUT

arrFcdElem     : ARRAY[1..Param.uiMaxColumnFcd, 1..Param.uiMaxRowFcd] OF ST_BA_FcdElem;

arrFcdElem: List of facade elements.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0