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 examples could be for example:
Download the sample Project done by Beckhoff.
=>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 be associated with an alarm. So event means something interesting happened to the system that may be an indication of an unwanted state or some info that we are interested in.
For example, in our yard gate example, whenever the user has opened the gate from our HMI that we can log as an event. This can be used for reporting. 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, say our motor has burned and we commanded to open the gate and it did not open, this is an alarm. If an alarm occurs then the operator needs to do something.
The central event system is integrated into 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.
Download the sample from the link given above.
Next, let’s try to understand what is a recipe at https://www.hemelix.com/scada-hmi/beckhoff-hmi/scada-hmi-recipe-management/
Ask questions related to Hemelix sample code and design at Google group https://groups.google.com/g/hemelix