FB_BA_BldPosEntry

FB_BA_BldPosEntry 1:

This function block is used for entering interpolation points for the function block FB_BA_SunPrtc, if this function block is operated in height positioning mode with the aid of a table, see E_BA_PosMod.

In addition to the operating modes "Fixed shutter height" and "Maximum incidence of light", the function block FB_BA_SunPrtc also offers the possibility to control the shutter height in relation to the position of the sun by means of table entries. By entering several interpolation points, the shutter height relative to the respective sun position is calculated by linear interpolation. However, since incorrectly entered values can lead to malfunctions in FB_BA_SunPrtc, this function block is to be preceded by the function block FB_BA_BldPosEntry. Four interpolation points can be parameterized on this function block, whereby a missing entry is evaluated as a zero entry.
The function block does not sort the values entered independently, but instead ensures that the positions of the sun entered in the respective interpolation points are entered in ascending order. Unintentional erroneous entries are noticed faster as a result.
The values chosen for rSunElv1 .. rSunElv4 must be unique; for example, the following situation must be avoided:
[ rSunElv1 = 10 ; rPos1 = 50] and at the same time [rSunElv2 = 10 ; rPos2 = 30 ].
This would mean that there would be two different target values for one and the same value, which does not allow a unique functional correlation to be established.
On top of that the entries for the position of the sun and shutter height must lie within the valid range.
Mathematically this means that the following conditions must be satisfied:

The function block checks the entered values for these conditions and issues an error message if they are not met. In addition, the value bValid of ST_BA_BldPosTab is set to FALSE.
Furthermore the function block independently ensures that the boundary areas are filled out: Internally, a further interpolation point is set at rSunElv = 0 with rBldPos1 and another one above rSunElv4 at rSunElv = 90 with rBldPos4. This ensures that a meaningful target value is available for all valid input values 0 rSunElv 90, without the user having to enter rSunElv = 0 and rSunElv = 90:

FB_BA_BldPosEntry 2:

This increases the actual number of interpolation points transferred to the function block FB_BA_SunPrtc to 6; see ST_BA_BldPosTab.

The interpolation of the values takes place in the glare protection function block.

VAR_INPUT

rSunElv1 : REAL;
rPos1    : REAL;
rSunElv2 : REAL;
rPos2    : REAL;
rSunElv3 : REAL;
rPos3    : REAL;
rSunElv4 : REAL;
rPos4    : REAL;

rSunElv1: Sun position at the first interpolation point (0°..90°).

rPos1: Blind position (degree of closure) at the first interpolation point (0%..100%).

rSunElv2: Sun position at the second interpolation point (0°..90°).

rPos2: Blind position (degree of closure) at the second interpolation point (0%..100%).

rSunElv3: Sun position at the third interpolation point (0°..90°).

rPos3: Blind position (degree of closure) at the third interpolation point (0%..100%).

rSunElv4: Sun position at the fourth interpolation point (0°..90°).

rPos4: Blind position (degree of closure) at the fourth interpolation point (0%..100%).

VAR_OUTPUT

stBldPosTab  : ST_BA_BldPosTab;
bErr         : BOOL;
sErrDescr    : T_MAXSTRING;

stBldPosTab: Transfer structure of the interpolation points, see ST_BA_BldPosTab.

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

sErrDescr: Contains the error description.

Error description

01: Error: The x-values (elevation values) in the table are either not listed in ascending order, or they are duplicated.

02: Error: An elevation value that was entered is outside the valid range of 0°..90°.

03: Error: An position value that was entered is outside the valid range of 0°...100%.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0