FB_BA_ControlCabinetBasicExt
The template is used to control a collective error signal lamp and to acknowledge or reset alarms by means of a push button.
All alarms in the PLC are acknowledged, reset and output via the function block FB_BA_EventObserver used in the template.
The resulting collective alarm is used in the template LampFault to control a collective error signal lamp. In case of a new, unacknowledged alarm or event, the signal lamp is flashing.
If only acknowledged alarms are present, the lamp is permanently on (new value message).
To acknowledge and reset an alarm, the acknowledge button must be pressed twice. If the acknowledgement and reset should be done with a button press, then in the GVL BA_Param the value of eEvtMgmt_AckMode.eSingle must be changed to eEvtMgmt_AckMode.eEntire.
The initialization of the template takes place within the method FB_Init. |
Block diagram
Syntax
FUNCTION_BLOCK FB_BA_ControlCabinetBasicExt EXTENDS FB_BA_View
VAR_INPUT CONSTANT
LampFault : FB_BA_ActuatorCmd;
AckButton : FB_BA_CombinationBI_BV;
EventObserver : FB_BA_EventObserver;
END_VAR
VAR
bHasEvent : BOOL;
bHasUnackEvent : BOOL;
bTrigRstSwi : BOOL;
bTrigRstButton : BOOL;
END_VAR
VAR_INPUT CONSTANT
Name | Type | Description |
---|---|---|
LampFault | The template is used to control a collective error signal lamp. | |
AckButton | FB_BA_CombinationBI_BV | The template contains a binary input for connecting the acknowledgement button as well as a binary Value object for remote triggering of an acknowledgement from the management level. |
EventObserver | The function block EventObserver realizes the evaluation of all alarms / events of the project structure (base framework) and their acknowledgement. The connection to the project structure is made by initializing the property Parent of the template FB_BA_EventObserver. In this template an assignment to the base object FB_BA_TopView of the project structure/base framework is implemented at the property. |
VAR
Name | Type | Description |
---|---|---|
bHasEvent | BOOL | This variable indicates that an alarm is present in the project. |
bHasUnackEvent | BOOL | This variable indicates that there are unacknowledged alarms in the project. |
bTrigRstSwi | BOOL | Display of the acknowledgement signal from the BV object Input (see FB_BA_CombinationBI_BV). |
bTrigRstButton | BOOL | Display of the acknowledgement signal from the BV object Value (see FB_BA_CombinationBI_BV). |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |