Alarms Dispatcher

Use Case

The wastewater basin in the sewage plant is about to overflow, a sluice blocks or an important drive overheats? On all these events you must get an immediate and reliable message from your system control.

Especially for this purpose we introduced the Alarms Dispatcher in PLCnext Technology. It enables you to send alarms to other applications running on your PLCnext Control, whether it be a C++, Simulink®, IEC 61131-3 or an embedded OPC UA Server application.

The PLCnext alarms model is oriented towards the OPC UA Alarms and Conditions specification and is directly available for any compatible OPC UA client.

Alarms can be parameterized for priority and request to confirm by user. So when alarms are set up properly, no upcoming emergency in the plant gets past you.

Concept

Every application in C++, IEC 61131-3 and Simulink® can register an alarm in PLCnext. Each alarm needs an AlarmID that is unique within the controller.

Reference

Essential alarm status features

Every alarm is oriented towards the OPC UA Alarms and Conditions specification and has these properties:

  • Active – the alarm condition is active
  • Acknowledged – the user has seen the alarm condition
  • Confirmed – the user has solved the problem that caused the alarm
  • Severity – the severity of the alarm (from 1 = information to 1000 = severe error)
  • Retain – the alarm is to be shown to the user (evaluated by the client)
  • Message – the message to be shown to the user
  • AlarmType – the alarm type can be used for filtering in the client
  • AlarmId – the unique name of the alarm on the device
  • as an option, timestamps for a variety of substatuses can be set

To introduce an alarm to the system, it has to be registered before the first use. As a result, you can see in the OPC UA Server which alarms can occur.

Note: It is not possible to cancel alarms. However, they are deleted during each cold and warm restart. This is why alarms have to be registered after each cold or warm restart. Registering an alarm twice does not trigger an error message.

Some alarms must be acknowledged and sometimes even confirmed. To do so, the Acknowledge and Confirm methods can be used. These are also messages in PLCnext Technology. However, they are sent from a client to the alarm source. The alarm source must process this message. Usually, this results in a new alarm status which, as usual, is sent to all clients.

Additional information to send with the alarm message

Often there is the requirement to add additional information to an alarm, which is available in the client and can be displayed in the message. For this, there are alarm blocks that can take on a structure with additional parameters. These parameters must be entered during registration so that they are known to the client. In the message, the parameters can be referenced using placeholders. The following placeholders are supported:

Placeholder Meaning
{0} Alarm name - must be unique within the controller
{1} Alarm type
{2} First user parameter
{3} Second user parameter

The ALM_ALARM and ALM_ALARM_PARAM function blocks implement defined semantics of the alarms. Via Requires Acknowledge and Requires Confirm, you can only specify if the alarm is to be acknowledged or confirmed.

For more complex scenarios, you can write your own alarm blocks. This way you can, for example, check additional conditions, implement a different time behavior, or implement several alarms with a single block. For these tasks, the ALM_CUSTOM_ALARM block is available. It provides the Low Level methods that were used for implementing the other blocks. The same functions are also available in C++.