FB_BARWithinRangeAzimuth

FB_BARWithinRangeAzimuth 1:

This function block checks whether the current azimuth angle (horizontal 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 smooth facade is always irradiated by the sun at an azimuth angle of Facade orientation-90° to Facade orientation+90°.

FB_BARWithinRangeAzimuth 2:

If the facade has lateral 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 centrally, this gives rise to the following situation (the values are only examples):

FB_BARWithinRangeAzimuth 3:

The values change for a group at the edge:

FB_BARWithinRangeAzimuth 4:

The beginning of the range lrBeginRange may thereby be larger than the end lrEndRange; it is then regarded beyond 0°:

Example:

lrAzimuth

10.0°

lrBeginRange

280.0°

lrEndRange

20.0°

bOut

TRUE

However, the range regarded may not be greater than 180° or equal to 0° – this would be unrealistic. 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;
lrAzimuth          : 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.

lrAzimuth: Current azimuth angle.

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

lrBeginRange : LREAL;
lrEndRange   : 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.

lrBeginRange: Beginning of the range in degrees.

lrEndRange: End of the range 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