FB_HVACFixedLimit

This function block represents a limit value switch, whose output signal is switched depending on the time delays tDelayHighLimit / tDelayLowLimit, the mode bModeFixedLimit, the limit values rHighLimit / rLowLimit and the input signal rInputValue.
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
bEnable : BOOL;
rInputValue : REAL;
bReset : BOOL;
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. |
bSetDefault: The default values of the VAR_IN_OUT variables are adopted with a rising edge at this input variable.
bEnable: The function block is enabled if bEnable = TRUE.
rInputValue: Input signal
bReset: Input for acknowledging the incorrect parameter entry via a rising edge.
VAR_OUTPUT
bEvent : BOOL;
bEdgeHighLimit : BOOL;
bEdgeLowLimit : BOOL;
bInvalidParameter : BOOL;
bEvent: Output signal, which is switched depending on the time delays tDelayHighLimit / tDelayLowLimit, the mode bModeFixedLimit, the input signal rInputValue and the limit values rHighLimit / rLowLimit.
bEdgeHighLimit: Is TRUE for one PLC cycle after the input signal rInputValue has exceeded the variable rHighLimit for the duration of tDelayHighLimit.
bEdgeLowLimit: Is TRUE for one PLC cycle after the input signal rInputValue has undershot the variable rLowLimit for the duration of tDelayLowLimit.
bInvalidParameter: Indicates that an incorrect parameter is present at one of the variables rHighLimit, rLowLimit, tDelayHighLimit or tDelayHighLimit. An incorrect parameter entry does not lead to a standstill of the block; see description of variables. After rectifying the incorrect parameter entry, the message bInvalidParameter must be acknowledged via bReset.
VAR_IN_OUT
bModeFixedLimit : BOOL;
rHighLimit : REAL;
rLowLimit : REAL;
tDelayHighLimit : TIME;
tDelayLowLimit : TIME;
bModeFixedLimit: If bModeFixedLimit = TRUE then the output variable bEvent becomes TRUE if the input signal rInputValue has exceeded the variable rHighLimit for the duration of tDelayHighLimit. If bEvent = TRUE, then bEdgeHighLimit is set for one PLC cycle. If the input signal rInputValue undershoots the variable rLowLimit for the duration of tDelayLowLimit, then bEvent becomes FALSE and bEdgeLowLimit is set for one PLC cycle.
If bModeFixedLimit = FALSE then the output variable bEvent becomes TRUE if the input signal rInputValue has undershot the variable rLowLimit for the duration of tDelayLowLimit. If bEvent = TRUE, then bEdgeLowLimit is set for one PLC cycle. If the input signal rInputValue exceeds the variable rHighLimit for the duration of tDelayHighLimit, then bEvent becomes FALSE and bEdgeHighLimit is set for one PLC cycle.
The variable is saved persistently. Preset to 1.
rHighLimit: Upper limit value.
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally.
The variable is saved persistently. Preset to 22.
rLowLimit: Lower limit value.
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally.
The variable is saved persistently. Preset to 18.
tDelayHighLimit: Switching delay [s] when the upper limit value is exceeded.
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally.
The variable is saved persistently. Preset to 1 s.
tDelayLowLimit: Switching delay [s] when the lower limit value is undershot.
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally.
The variable is saved persistently. Preset to 1 s.
Behavior of the output value

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 |