FB_BARWithinRangeElevation

FB_BARWithinRangeElevation 1:

This function block checks whether the current angle of elevation (vertical position of the sun) lies within the limits entered. As can be seen in the overview, the function block provides an additionally evaluation as to whether the sun shading of a window group should be activated. Therefore the observations in the remainder of the text always apply to one window group.

A normal vertical facade is irradiated by the sun at an angle of elevation of 0° to maximally 90°.

FB_BARWithinRangeElevation 2:

If the facade has projections, however, this range is limited. This limitation can be checked with the help of this function block. However, the position of the window group on the facade also plays a role. If it lies in the lower range, this gives rise to the following situation (the values are only examples):

FB_BARWithinRangeElevation 3:

The values change for a group below the projection:

FB_BARWithinRangeElevation 4:

The lower observation limit, lrLowLimit, may thereby not be greater than or equal to the upper limit, lrHighLimit. Such entries result in an error on the output bError – the test output bOut is then additionally set to FALSE.

VAR_INPUT

eDataSecurityType  : E_HVACDataSecurityType;
lrElevation        : LREAL;

eDataSecurityType: If eDataSecurityType:= eHVACDataSecurityType_Persistent, the persistent VAR_IN_OUT variables of the function block are stored in the flash of the computer if a value changes. For this to work, the function block FB_HVACPersistentDataHandling must be instanced once in the main program, which is called cyclically. Otherwise the instanced FB is not released internally.

A change of value can be initiated by the building management system, a local operating device or via a write access from TwinCAT. When the computer is restarted the saved data are automatically read back from the flash into the RAM.

Application example: example_persistent.zip

If eDataSecurityType:= eHVACDataSecurityType_Idle the persistently declared variables are not saved in a fail-safe manner.

Notice

A cyclically changing variable must never be linked with the IN_OUT variable of a function block, if eDataSecurityType:= eHVACDataSecurityType_Persistent. It would lead to early wear of the flash memory.

lrElevation: Current angle of elevation in degrees.

VAR_OUTPUT

bOut       : BOOL;
bError     : BOOL;
udiErrorId : UDINT;

bOut: binary delayed output of the threshold switch

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

udiErrorId: contains the error code if the values entered should be erroneous. See Error codes.

VAR_IN_OUT

lrLowLimit   : LREAL;
lrHighLimit  : LREAL;

In order for the registered parameters to be retained beyond a controller failure, it is necessary to declare them as In-Out variables. A reference variable is then assigned to them in the program. Each change of the value of these reference variables is persistently stored in the function block and written back to the reference variable following a controller failure and restart. If the parameters were only to be defined as input variables, they would not be able to write a reference variable.
Application example: example_persistent.zip.

lrLowLimit: Lower limit value in degrees.

lrHighLimit: Upper limit value in degrees.

Requirements

Development environment

required library

required function

TwinCAT 3.1 build 4022.16 or higher

Tc2_HVAC V3.3.1.0

TF8000 | TC3 HVAC V1.0.0.0