FB_HVACTempChangeFunction

Function block for the input of the interpolation points of the pre-start function.

FB_HVACTempChangeFunction 1:
FB_HVACTempChangeFunctionEntry

To keep the function blocks FB_HVACOptimizedOn and FB_HVACOptimizedOff uncluttered, they do not contain any input of the individual value pairs for the temperature change function - the function blocks access the structure variable of the temperature change function (ST_HVACTempChangeFunction) via an IN-OUT variable. The function block FB_HVACTempChangeFunction enables the writing of the structure variable in a clear form and also makes sure that the value pairs, as required, are entered in ascending order of the outside temperature and that there are no two points with the same outside temperature. Mathematically speaking, there would be no unambiguous functional correlation in this case. The value pairs are to be entered at the corresponding inputs rOutsideTemperature_1.. rOutsideTemperature_10 (outside temperature) and rRoomTempChange_1..rRoomTempChange_10 (room temperature change). The function block continuously checks whether the described requirement for ascending order of the outside temperature is fulfilled and whether two value pairs exist with the same outside temperature.

FB_HVACTempChangeFunction 2:

The writing of the temperature change functions should take place once in order to give the pre-start/pre-stop function blocks basic values, which are then continually improved by these function blocks over the course of time.

VAR_INPUT

bWrite             : BOOL;
rOutsideTemp_1     : REAL;
rRoomTempChange_1  : REAL;
rOutsideTemp_2     : REAL;
rRoomTempChange_2  : REAL;
rOutsideTemp_3     : REAL;
rRoomTempChange_3  : REAL;
rOutsideTemp_4     : REAL;
rRoomTempChange_4  : REAL;
rOutsideTemp_5     : REAL;
rRoomTempChange_5  : REAL;
rOutsideTemp_6     : REAL;
rRoomTempChange_6  : REAL;
rOutsideTemp_7     : REAL;
rRoomTempChange_7  : REAL;
rOutsideTemp_8     : REAL;
rRoomTempChange_8  : REAL;
rOutsideTemp_9     : REAL;
rRoomTempChange_9  : REAL;
rOutsideTemp_10    : REAL;
rRoomTempChange_10 : REAL;

bWrite : a rising edge at this input copies the values entered at the inputs to the pre-start function.

(rOutsideTemp_1 - rRoomTempChange1) ... (rOutsideTemp_10 - rRoomTempChange10): value pairs of the pre-start function: room temperature change (rRoomTempChange) in degrees Kelvin per minute at outside temperature (rOutsideTemp) in degrees Celsius.

VAR_OUTPUT

bValid          : BOOL;
udiErrorID      : UDINT;

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

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

VAR_IN_OUT

stTempChangeFunction  : ST_HVACTempChangeFunction;

stTempChangeFunction : structure variable of type ST_HVACTempChangeFunction, which contains the 10 value pairs (outside temperature, room temperature change). These value pairs, which have to be entered in the field variable in ascending order of the outside temperature, define the 9 pitch lines of the pre-start function.