-

General Information on Alarms

In PLCnext Engineer alarms are represented as messages. These messages provide information on state changes in the controller. Alarms can be sent between different components. The OPC UA server is, for example, a typical interface for accessing the alarms. After reception of the alarms, the OPC UA server forwards the alarms to all interested UA clients.

Alarms are defined by the alarm state. All changes of the alarm state are sent as alarm message by the alarm source (for example the application program). The alarm state provides, amongst other, information about the following:

Registration of alarms
To make an alarm known in the system, it has to be registered before its initial use. After successful registration, the OPC UA server provides information on the alarms that may occur. To register alarms in the system, the alarming function blocks ALM_REGISTER and ALM_REGISTER_PARAM can be used.
There is no function block for unregistering an alarm. However, the OPC UA server removes all alarms during cold start and warm start of the controller. Therefore the alarms need to be reregistered after the start of the controller. If an alarm is registered a second time, the second registration is ignored.

Sending alarms
The function blocks ALM_ALARM and ALM_ALARM_PARAM are used to send alarm states to the OPC UA server. The alarm state information as listed above is held in a predefined structure that is connected to the function blocks. The ALM_ALARM_PARAM function block allows you to send user-defined information in addition to the alarm state. For this, the function block provides a structure that can be filled with the user-defined data.

Acknowledgment and confirmation of alarms
The UA client receiving the alarm from the OPC UA server can ask the OPC UA server for an acknowledgment and/or confirmation of an alarm. This acknowledgment and confirmation is done using the function blocks ALM_ACK and ALM_CONF.