Alarms and Events
Alarm: Alarms represent warnings of process conditions that could cause problems, and require an operator response.
Examples can be many, like suppose a Tank water level has increased beyond the desired value and that time SCADA system should give Alarm. Some other example could be for example:
=>Circuit breaker tripped
The intention of an alarm is to signal that something has gone wrong, or that a particular stage of processing has been reached. For example, an alarm might indicate that a boiler has exceeded a safe temperature limit.
Event: Events represent normal system status messages, and do not require an operator response. An event is defined as a detectable occurrence, which may or may not is associated with an alarm.
For example, in our yard gate example, whenever the user has opened the gate from our HMI that we can log as an event. But say, nobody commanded to open the gate but the gate opened by itself due to a bug in the software that can be treated as an alarm
A simple example of an Event in Industrial automation can be the simple logging of an Operator with his user name to the SCADA application. The SCADA system can log that event in a text file if configured to do so.
The central event system is integrated in the TwinCAT HMI server. It is possible to manage events from the HMI server and its extensions. The TcHmiEventlogger extension can be connected with the TwinCAT 3 event logger from local or remote real-time systems.
The event system has been built as an extension. The extension can be loaded automatically when a project is created or can be installed via NuGet packages. When we install the NuGet package we might encounter a computability problem as the interface may not match.
The Event Grid Control is a control for the tabular display of alarms and messages. It automatically displays the alarms and messages of the target systems addressed in the event logger extension. Alarms can be confirmed directly in the control.
The Event Grid Control is located in the Toolbox under the category Beckhoff, from where you can insert it into an HMI page by drag-and-drop. We shall use the same sample here as references.
How to install NuGet packages:
Visual Studio project | Manage NuGet Packages, then select the desired version as shown in the following images.
TC_EVENTS is a global TwinCAT system variable list (GVL). Each constant in this list represents an event class that is available on a TwinCAT system. The instances of the event classes are structured data types. Their member variables are instances of individual events. The events can be used, for example, in a PLC project or in a PLC library for logging the most diverse messages. The TwinCAT system has several predefined event classes. Further event classes are brought along by the integrated PLC libraries (functions) or defined by the user in the PLC application. The Global Variable List of the event classes is automatically created and updated by the TwinCAT system. The number of available event classes can vary from system to system as a result.
How do we add own event types in PLC System:
=>In TwinCATproject, select SYSTEM | Type System (double click), it will insert a NewEventClass (TMC Editor)
=>Give a suitable Name (for example, I gave TestClass for testing) and Description
=>In the left pane, under Events add, remove and reorder Events, as shown in the following figure.