CrossVentilation_Sulzer
CrossVentilation_Sulzer (FB)
CrossVentilation_Sulzer (FB)FUNCTION_BLOCK CrossVentilation_Sulzer
Short description
Control of cross-ventilation using window elements via four separately adjustable characteristic curves Curve 1: Opening time depending on outside temperature Curve 2: Degree of opening depending on outside temperature Curve 3: Degree of opening depending on wind speed Curve 4: Waiting time depending on outside temperature Typical application: Control of cross-ventilation by the room CO2 actual value
Representation

Interfaces
Inputs
xStartCrossVentilation
BOOL
FALSE
Start of cross-ventilation (on each rising edge)
xAbortCrossVentilation
BOOL
FALSE
Abort cross-ventilation (on each rising edge)
xEn_WT
BOOL
FALSE
Enable / disable waiting time (TRUE = enabled)
xEnComplete_OT
BOOL
FALSE
Enable / disable the input ‘xComplete_OT’ (FALSE = disabled) (_OT = Opening Time)
xComplete_OT
BOOL
FALSE
Enable / disable manual abort of the opening duration (on each rising edge, if xEnComplete_OT = TRUE) (e.g. abort via CO2 level after the opening duration has elapsed)
rOutsideTemp
REAL
0.0
Outside temperature
rOutsideWindSpeed
REAL
0.0
Wind speed
xResError
BOOL
FALSE
Reset of the outputs ‘xError’ and ‘sErrorCode’ (on each rising edge)
xValidData_OT
BOOL
FALSE
Validity of the data of the curve ‘Opening Time - Outside Temperature’ (_OT = Opening Time) (TRUE = valid)
xValidData_WDOO_OT
BOOL
FALSE
Validity of the data of the curve ‘Window Degree Of Opening - Outside Temperature’ (_WDOO = Windows Degree Of Opening, _OT = OutsideTemp) (TRUE = valid)
xValidData_WDOO_WS
BOOL
FALSE
Validity of the data of the curve ‘Window Degree Of Opening - Wind Speed’ (_WDOO = Windows Degree Of Opening, _WS = Wind Speed) (TRUE = valid)
xValidData_WT
BOOL
FALSE
Validity of the data of the curve ‘Waiting Time - Outside Temperature’ (_WT = Waiting Time) (TRUE = valid)
Inputs and outputs
arData_OT
stCurve_Real_Time
Array with the support points for the curve ‘Opening Time - Outside Temperature’ (_OT = Opening Time)
arData_WDOO_OT
stCurve_Real_Real
Array with the support points for the curve ‘Window Degree Of Opening - Outside Temperature’ (_WDOO = Windows Degree Of Opening, _OT = OutsideTemp)
arData_WDOO_WS
stCurve_Real_Real
Array with the support points for the curve ‘Window Degree Of Opening - Wind Speed’ (_WDOO = Windows Degree Of Opening, _WS = Wind Speed)
arData_WT
stCurve_Real_Time
Array with the support points for the curve ‘Waiting Time - Outside Temperature’ (_WT = Waiting Time)
Outputs
tTimeCurve_OT
TIME
T#0s
Current opening time duration from the curve (_OT = Opening Time)
tRemainingTime_OT
TIME
T#0s
Remaining time of the active opening time duration (_OT = Opening Time)
xActive_OT
BOOL
FALSE
Feedback - Active opening time duration (TRUE = active) (_OT = Opening Time)
rDegreeCurve_WDOO_OT
REAL
0.0
Current window degree of opening [ % ] depending on outside temperature from the curve (_WDOO = Windows Degree Of Opening, _OT = OutsideTemp)
rDegreeCurve_WDOO_WS
REAL
0.0
Current window degree of opening [ % ] depending on wind speed from the curve (_WDOO = Windows Degree Of Opening, _WS = Wind Speed)
rDegree_WDOO
REAL
0.0
Current window degree of opening [ % ] (_WDOO = Windows Degree Of Opening)
xActive_WDOO
BOOL
FALSE
Feedback - Active window opening (TRUE = active) (_WDOO = Windows Degree Of Opening)
tTimeCurve_WT
TIME
T#0s
Current waiting time from the curve (_WT = Waiting Time)
tRemainingTime_WT
TIME
T#0s
Remaining time of the active waiting time (_WT = Waiting Time)
xActive_WT
BOOL
FALSE
Feedback - Active waiting time (TRUE = active) (_WT = Waiting Time)
xError
BOOL
FALSE
Error state (FALSE = no error, TRUE = error)
sErrorCode
STRING
‘’
String with the numbers of the active errors
Setpoints / parameters
rOutsideTempLimit
REAL
-15
Outside temperature threshold, below which no window opening will be initiated.
Function description
Characteristic curves
The total of four freely adjustable characteristic curves (each with 10 support points, FB ‘Curve_10XY_Real’ or FB ‘Curve_10XY_Real_Time’) are connected to the associated data inputs (arData_XX), as well as the outputs of the curves that signal the validity of the data (xValidData_XX). The assignment of the characteristic curves to the inputs is fixed as follows:
Index _OT (Opening Time): Curve ‘Opening time depending on outside temperature’
Index _WDOO_OT (_WDOO = Windows Degree Of Opening, _OT = Outside Temp): Curve ‘Degree of opening depending on outside temperature’
Index _WDOO_WS (_WDOO = Windows Degree Of Opening, _WS = Wind Speed): Curve ‘Degree of opening depending on outside wind speed”
Index _WT (Waiting Time): Curve ‘Waiting time depending on outside temperature’
If an input value (= X-value) outside the range specified by support points 1 and 10 is passed to a curve, the Y-value of the nearest support point is returned (example: support point 1 (1, 10), support point 10 (10, 100), X-value = -5 — Y-value = 10)
Procedure
Cross-ventilation is started with a rising edge at the input ‘xStartCrossVentilation’. The opening time duration is calculated from curve 1. The degree of opening is determined and output from curves 2 and 3. After the window opening is completed, the waiting time calculated from curve 4 is started, which temporarily prevents another cross-ventilation.
Start of cross-ventilation
Cross-ventilation is started with a rising edge at the input ‘xStartCrossVentilation’ if all of the following conditions are met:
The waiting time is not active (xActive_WT = FALSE)
The opening time is not active (xActive_OT = FALSE)
All four curves contain valid data (xValidData_XX = TRUE)
The outside temperature exceeds the absolute minimum limit (rOutsideTemp > rOutsideTempLimit)
Opening duration
After successful start of cross-ventilation, the opening time duration is calculated once from curve 1 depending on the current outside temperature. During the opening time duration, the status indicator ‘xActive_OT’ is active and the remaining time duration is output on the output ‘tRemainingTime_OT’.
Abort
The active cross-ventilation can be aborted at any time by a rising edge at the input ‘xAbortCrossVentilation’.
Degree of opening
After successful start of cross-ventilation, the degree of opening is determined once from the two curves 2 and 3 depending on the current outside temperature and the current outside wind speed: Variable Z = ((Value from curve 2) X (Value from curve 3)) / 100 The variable Z is then compared with fixed predefined range limits and the degree of opening assigned to the respective range is output: 0 <= Z < 15: Degree of opening = 0% 15 <= Z < 25: Degree of opening = 25% 25 <= Z < 50: Degree of opening = 50% 50 <= Z < 75: Degree of opening = 75% Z > 75 : Degree of opening = 100% The determined degree of opening is output at the output ‘rDegree_WDOO’, the output ‘xActive_WDOO’ signals an active window opening (= TRUE).
Waiting time
Directly after the end of the opening duration, a possible waiting time until the next activation of cross-ventilation begins. For this, the waiting time duration must generally be enabled (xEn_WT = TRUE). At the start of the waiting time, the duration is determined once from curve 4 depending on the outside temperature. During the active waiting time the status indicator ‘xActive_WT’ is active and the remaining time duration is output at the output ‘tRemainingTime_WT’. The waiting time ends when the duration expires or when the waiting time is disabled (xEn_WT = FALSE).
End of opening time
The opening time ends immediately when the duration elapses (xEnComplete_OT = FALSE). The opening time ends after the duration elapses (xEnComplete_OT = TRUE) if a rising edge is detected at the input ‘xComplete_OT’. This serves to extend the opening duration until an acceptable CO2 level is reached.
Blocking cross-ventilation via outside temperature
Cross-ventilation is only started if the current outside temperature at the start time exceeds the adjustable limit ‘rOutsideTempLimit’.
Input ‘xResError’
Each rising edge on this input resets the outputs ‘xError’ and ‘sErrorCode’ to their respective no-error state.
Output ‘xError’
The output is active (= TRUE) if at least one error has been detected (‘sErrorCode <> ‘‘).
Output ‘sErrorCode’
This output signals the current error status. An empty string ‘’ indicates that no error is present. Currently the following error states are defined: ‘1’: xValidData_OT = FALSE (Curve 1 without valid data) ‘2’: xValidData_WDOO_OT = FALSE (Curve 2 without valid data) ‘3’: xValidData_WDOO_WS = FALSE (Curve 3 without valid data) ‘4’: xValidData_WT = FALSE (Curve 4 without valid data)
This function block can be applied as follows:
The output ‘xActive_WDOO’ (= TRUE) signals the request to open the windows for cross-ventilation, the output ‘rDegree_WDOO’ the window opening degree in the range 0.0 - 100.0% (0.0% = closed). This function block can be applied as follows:

CODESYS
InOut:
Input
xStartCrossVentilation
BOOL
FALSE
Input
xAbortCrossVentilation
BOOL
FALSE
Input
xEn_WT
BOOL
TRUE
Input
xEnComplete_OT
BOOL
FALSE
Input
xComplete_OT
BOOL
FALSE
Input
rOutsideTemp
REAL
0.0
Input
rOutsideWindSpeed
REAL
0.0
Input
xResError
BOOL
FALSE
Input
xValidData_OT
BOOL
FALSE
Input
xValidData_WDOO_OT
BOOL
FALSE
Input
xValidData_WDOO_WS
BOOL
FALSE
Input
xValidData_WT
BOOL
FALSE
Input
arData_OT
POINTER TO stCurve_Real_Time
Input
arData_WDOO_OT
POINTER TO stCurve_Real_Real
Input
arData_WDOO_WS
POINTER TO stCurve_Real_Real
Input
arData_WT
POINTER TO stCurve_Real_Time
Output
tTimeCurve_OT
TIME
TIME#0ms
Output
tRemainingTime_OT
TIME
TIME#0ms
Output
xActive_OT
BOOL
FALSE
Output
rDegreeCurve_WDOO_OT
REAL
0.0
Output
rDegreeCurve_WDOO_WS
REAL
0.0
Output
rDegree_WDOO
REAL
0.0
Output
xActive_WDOO
BOOL
FALSE
Output
tTimeCurve_WT
TIME
TIME#0ms
Output
tRemainingTime_WT
TIME
TIME#0ms
Output
xActive_WT
BOOL
FALSE
Output
xError
BOOL
FALSE
Output
sErrorCode
STRING
‘’
Input Const
rOutsideTempLimit
REAL
-15.0
Methods:
mCalculateCurveSectionValue_Real_Real
mCalculateCurveSectionValue_Real_Time
mCalculateCurveValue_Real_Real
mCalculateCurveValue_Real_Time
mResData
Structure:
mCalculateCurveSectionValue_Real_Real (Method)
mCalculateCurveSectionValue_Real_Time (Method)
mCalculateCurveValue_Real_Real (Method)
mCalculateCurveValue_Real_Time (Method)
mResData (Method)
Last updated

