FB_HVACAlarm
Application
A TRUE on the input bAlarmIn indicates that an alarm signal is present. The alarm is passed on to the output bAlarm only if bAlarmIn is present for longer than the preset time tAlarmDelay. Furthermore, the input bCtrlVoltage must be TRUE in order for an alarm to be announced. Output bAlarm remains set to TRUE until bAlarmIn = FALSE and the alarm is acknowledged by a positive edge on bReset.
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
bAlarmIn : 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: 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.
bAlarmIn: a TRUE on the input bAlarmIn indicates that an alarm signal is present.
bCtrlVoltage: a check via the input bCtrlVoltage is made of whether control voltage is present.
bReset: acknowledge input.
VAR_OUTPUT
bAlarm : BOOL;
bAlarm: TRUE if an alarm is announced.
VAR_IN_OUT
tAlarmDelay : TIME;
tAlarmDelay: delay after the alarm is first signaled if, during the preset time, bAlarmIn was constantly present (0s..500s). The variable is saved persistently. Preset to 500s..