FB_HVAC2PointCtrl

This function block represents a 2-point controller. The controller is enabled via bEnable = TRUE and is then active.
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
bEnable : BOOL;
rW : REAL;
rX : 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: If the variable is TRUE, the default values of the VAR_IN_OUT variables are adopted.
bEnable: The controller is enabled via a TRUE and is then active.
rW: The setpoint is transferred with the rW variable.
rX: The actual value of the control loop is transferred with the rX variable.
bReset: Acknowledge input in the event of a fault.
VAR_OUTPUT
bOut : BOOL;
bInvalidParameter : BOOL;
bOut: Switching output of the two-point controller.
bInvalidParameter: TRUE if an error has occurred during the plausibility check. The message must be acknowledged with bReset.
VAR_IN_OUT
rHighLimit : REAL;
rLowLimit : REAL;
bDirection : BOOL;
tDelayOn : TIME;
tDelayOff : TIME;
rHighLimit: Upper limit of the control deviation (0..32767). The variable is saved persistently. Preset to 0.
rLowLimit: Lower limit of the control deviation (0..32767). The variable is saved persistently. Preset to 0.
bDirection: The control direction of the controller is determined by bDirection. FALSE = heating mode; TRUE = cooling mode. The variable is saved persistently. Preset to 0.
tDelayOn: Switch-on delay [s]. The variable is saved persistently. Preset to 0 s.
tDelayOff: Switch-off delay [s]. The variable is saved persistently. Preset to 0 s.
Timing characteristics
Figure 1:
Curve of switching output bOut for a two-point controller in relation to the upper/lower limits of the control deviation, with no switch-on or release delay.

Figure 2:
Curve of switching output bOut for a two-point controller in relation to the upper limit rHighLimit = 3 and the lower limit rLowLimit = 8 with a switch-on delay of tDelayOn = 4s and a release delay of tDelayOff = 6s.

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 |