FB_BA_BldPosEntry

This 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.

FB_BA_BldPosEntry 1:

Functional description

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 block is to be preceded by the function block FB_BA_BldPosEntry. Four interpolation points can be parameterised on this 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 lrSunElv1 .. lrSunElv4 must be unique; for example, the following situation must be avoided:
[lrSunElv1 = 10 ; rBldPos1 = 50] and at the same time [lrSunElv2 = 10 ; rBldPos2 = 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 values entered for these conditions and outputs an error code if they are not satisfied. In addition, the output bValid 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 lrSunElv4 at rSunElv = 90 with rBldPos4. This ensures that 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 block.

Inputs/outputs

VAR_INPUT

lrSunElv1 : LREAL;
lrPos1    : LREAL;
lrSunElv2 : LREAL;
lrPos2    : LREAL;
lrSunElv3 : LREAL;
lrPos3    : LREAL;
lrSunElv4 : LREAL;
lrPos4    : LREAL;

lrSunElv1: position of the sun of the 1st interpolation point (0°…90°)

rBldPos1: blind position (degree of closure) at the 1st interpolation point (0%…100%)

lrSunElv2: position of the sun of the 2nd interpolation point (0°…90°)

rBldPos2: blind position (degree of closure) at the 2nd interpolation point (0%…100%)

lrSunElv3: position of the sun of the 3rd interpolation point (0°…90°)

rBldPos3: blind position (degree of closure) at the 3rd interpolation point (0%…100%)

lrSunElv4: position of the sun of the 4th interpolation point (0°…90°)

rBldPos4: blind position (degree of closure) at the 4th interpolation point (0%…100%)

VAR_OUTPUT

bValid        : BOOL;
uiErrorId     : UDINT;
stBldPosTab   : ST_BA_BldPosTab;

stBldPosTab: transfer structure of the interpolation points, see ST_BA_BldPosTab

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

udiErrId / udiErrArg: contains the error number and the error argument. See error codes.

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0