FB_HVAC2PointActuator

FB_HVAC2PointActuator 1:

Application

This function block serves to control two-point valves or two-point dampers.

VAR_INPUT

eDataSecurityType      : E_HVACDataSecurityType;
bSetDefault            : BOOL;
bEnable                : BOOL; 
bIn                    : BOOL; 
eCtrlModeActuator      : E_HVAC2PointActuatorMode;
bManSwitch             : BOOL;          
bLimitSwitchClose      : BOOL;
bLimitSwitchOpen       : BOOL;
bCtrlVoltage           : BOOL;
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: FB_HVAC2PointActuator 2: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 function block is enabled by the PLC program with the input variable bEnable. The actuator always remains closed as long as the function block is not enabled. Output bOut is permanently FALSE.

bIn: in automatic mode the actuator is closed by a FALSE and opened by a TRUE.

eCtrlModeActuator: Enum that defines the operation mode.

bManSwitch: if the two-point drive has a manual/emergency switch in the control cabinet, this can be connected to the input bManSwitch; the status of the manual/emergency switch will then be monitored. If bManSwitch = FALSE, then output bOut of the drive will be set to FALSE.

bLimitSwitchClose: actuator feedback TRUE when the actuator is completely closed.

bLimitSwitchOpen: actuator feedback TRUE when the actuator is completely open.

bCtrlVoltage: the parameter bCtrlVoltage serves to check the control voltage. The control voltage is present if the bCtrlVoltage variable is TRUE. The feedback control is suppressed if the control voltage fails.

bReset: acknowledge input in the event of a fault.

VAR_OUTPUT

bOut                  : BOOL;
byState               : BYTE;
eStateModeActuator    : E_HVAC2PointActuatorMode;
bErrorLimitSwitch     : BOOL;
bInvalidParameter     : BOOL;

bOut: the actuator is connected to this output (FALSE = closing drive; TRUE = opening drive).

byState: displays the status of the control from the actuator:
byState.0:= Enable
byState.1:= Manual Switch
byState.2:= Enable Feedback Control
byState.3:= Control Voltage
byState.4:= Reset
byState.5:= bOut

eStateModeActuator: indicates in which operation mode the actuator is.

bErrorLimitSwitch: becomes TRUE if no limit switch is triggered after the preset stroke time. bErrorLimitSwitch is acknowledged with a positive edge on the input bReset.

bInvalidParameter: TRUE if an error occurs during the plausibility check. The message must be acknowledged with bReset.

VAR_IN_OUT

bEnableLimitSwitch     : BOOL;
tStrokeTime            : TIME;               

bEnableLimitSwitch: if the input is TRUE, then the function control of the drive is activated by means of the limit switches.

tStrokeTime: in order to set the function control correctly, the stroke time of the drive from fully closed to fully opened drive must be entered here (0s..3600s). The variable is saved persistently. Preset to 200 s.