FB_BA_ControlCabinetBasic
![FB_BA_ControlCabinetBasic 1:](Images/png/12785905675__Web.png)
The template is used to control a collective error signal lamp, to acknowledge or reset alarms by means of a push button and to reset hardware in the control cabinet by outputting a momentary pulse.
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).
A momentary pulse for resetting hardware, is output via the function block RstHw. This is extended to two seconds by the timing element tpResetHw. In this way, relay switching within the control cabinet is reliably acknowledged by a sufficiently long pulse.
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
![FB_BA_ControlCabinetBasic 3:](Images/png/14531559179__Web.png)
Syntax
FUNCTION_BLOCK FB_BA_ControlCabinetBasic EXTENDS FB_BA_View
VAR_INPUT CONSTANT
LampFault : FB_BA_ActuatorCmd;
AckButton : FB_BA_CombinationBI_BV;
RstHw : FB_BA_ActuatorCmd;
EventObserver : FB_BA_EventObserver;
END_VAR
VAR
bHasEvent : BOOL;
bHasUnackEvent : BOOL;
Blink : FB_BA_Blink;
tpResetHw : TP;
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. |
RstHw | The template can be used to wipe in relay circuits (e.g. frost protection relay). | |
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. |
Blink | FB_BA_Blink | The function block generates a blink pulse. This blink pulse is written to the global variable BA2_Param.bBlink. |
tpResetHw | TP | The timing element extends the acknowledgement pulse for interfacing relay circuits (e.g. frost protection relay). |
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 |