FB_BA_BldPosEntry
The function block FB_BA_BldPosEntry serves for the input of interpolation points for the function block FB_BARSunProtectionEx, if this should be operated in the height positioning mode with the help of a table (see E_BARPosMode).
In addition to the operation modes "Fixed blind height" and "Maximum light incidence", the function block FB_BA_SunPrtc also offers the possibility to control the blind height in relation to the sun elevation by means of table entries. By entering several interpolation points, the blind 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 fSunElv1 ... fSunElv4 must be unique, for example, the following situation must be avoided:
[ fSunElv1 = 10 ; fPos1 = 50] and simultaneously [fSunElv2 = 10 ; fPos2 = 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.
In addition, the entries for the position of the sun and blind height must lie within the valid range.
Mathematically this means that the following conditions must be satisfied:
- fSunElv1 < fSunElv2 < fSunElv3 < fSunElv4 - (values ascending and not equal)
- 0 ≤ fSunElv ≤ 90 ([°] - scope source values)
- 0 ≤ fPos ≤ 100 (in percent - scope target values)
The function block checks the entered values for these conditions and issues an error message if they are not met. In addition, the control value bVld of ST_BA_BldPosTab is set to FALSE.
Furthermore, the function block independently ensures that the boundary areas are filled out: Internally, another interpolation point is set at fSunElv = 0 with fPos1 and another one above fSunElv4 at fSunElv = 90 with fPos4. This ensures that a sensible target value exists for all valid input values 0 ≤fSunElv ≤ 90 without the user having to assign an entry for fSunElv = 0 and fSunElv = 90:
The actual number of interpolation points transferred to the function block FB_BA_SunPrtc thus increases to 6, see ST_BA_BldPosTab.
The interpolation of the values takes place in the glare protection function block.
Inputs
VAR_INPUT
fSunElv1 : REAL;
fPos1 : REAL;
fSunElv2 : REAL;
fPos2 : REAL;
fSunElv3 : REAL;
fPos3 : REAL;
fSunElv4 : REAL;
fPos4 : REAL;
END_VAR
Name | Type | Description |
---|---|---|
fSunElv1 | REAL | Position of the sun at the first interpolation point [°] (0...90). |
fPos1 | REAL | Blind position (degree of closure) at the first interpolation point [%] (0…100). |
fSunElv2 | REAL | Position of the sun at the second interpolation point [°] (0...90). |
fPos2 | REAL | Blind position (degree of closure) at the second interpolation point [%] (0…100). |
fSunElv3 | REAL | Position of the sun at the third interpolation point [°] (0...90). |
fPos3 | REAL | Blind position (degree of closure) at the third interpolation point [%] (0…100). |
fSunElv4 | REAL | Position of the sun at the fourth interpolation point [°] (0...90). |
fPos4 | REAL | Blind position (degree of closure) at the fourth interpolation point [%] (0…100). |
Outputs
VAR_OUTPUT
stBldPosTab : ST_BA_BldPosTab;
bErr : BOOL;
sErrDescr : T_MAXSTRING;
END_VAR
Name | Type | Description |
---|---|---|
stBldPosTab | Transfer structure of the interpolation points | |
bErr | BOOL | In case of a fault, e.g. if warning stages are active, this output is set to TRUE. |
sErrDescr | T_MAXSTRING | 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: A position value that was entered is outside the valid range of 0%...100%. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.22 | Tc3_BA2 from v5.2.5.0 |