AlarmManagerToOpcUaConnector Library Documentation¶
- Company:
CODESYS
- Title:
AlarmManagerToOpcUaConnector
- Version:
4.6.0.0
- Categories:
System|SysLibs
- Author:
CODESYS Development GmbH
- Placeholder:
AlarmManagerToOpcUaConnector
Description [1]¶
This library connects the CODESYS Alarm Configuration with the CODESYS OPC UA Server. If this library is inserted it will automatically connect to alarm configuration as a client and send the events to the OPC UA Server. The OPC UA server then sends the events to the clients which are monitoring events.
Note
Typicall this library should not be added by the user. It is automatically added when mapping alarms using the CommunicationManager. If alarms should be mapped using the symbolconfiguration, add the CompatibleAlarmManagerToOpcUaConnector library to your project.
Note
Before Visualization Support 4.3.0.0 the AlarmConfiguration requires that a visualization is added. If no visualization is added the no message texts will be available.
How alarms and events are added to the OPC UA server is described here:¶
If the application contains an alarm configuration and this library is added this application will be registered as an event source at the OPC UA server.
The application will have the SubscribeToEvent flag set if this library is added. The application will be put into the OPC UA servers eventing infrastructure to allow proper handling of the event.
If an event or alarm is triggered by the alarm configuration this alarm will be sent to the OPC UA server. The corresponding application node will be used as the event source inside the OPC UA server.
#. The event will be transported to the OPC UA server node (id:2253) via the PLC node (e.g. CODESYS Control Win V3). So the event will be sent to clients subscribed to the application node, the PLC Node or the servernode. This library connects the CODESYS Alarm Configuration with the CODESYS OPC UA Server. If this library is inserted it will automatically connect to alarm configuration as a client and send the events to the OPC UA Server. The OPC UA server then sends the events to the clients which are monitoring events.
Note
Nothing expect adding this library has to be done by the user. This library doesn’t contain any functions or interfaces which are intended to be called from the user application code.
Note
The current implementation requires that the application contains a symbolconfiguration. If this object is not available the mapping will not work and the events will not be sent to the OPC UA client. If no symbols of the application are required just add the editor and clear the selection inside the editor.
How alarms and events are added to the OPC UA server is described here:¶
If the application contains an alarm configuration and this library is added this application will be registered as an event source at the OPC UA server.
The application will have the SubscribeToEvent flag set if this library is added. The application will be put into the OPC UA servers eventing infrastructure to allow proper handling of the event.
If an event or alarm is triggered by the alarm configuration this alarm will be sent to the OPC UA server. The corresponding application node will be used as the event source inside the OPC UA server.
The event will be transported to the OPC UA server node (id:2253) via the PLC node (e.g. CODESYS Control Win V3). So the event will be sent to clients subscribed to the application node, the PLC Node or the servernode.
Mapping of events:¶
The events of the alarm configuration are mapped to the BaseEventType of OPC UA.
EventID: Combined by the Providers component ID, the application ID and the events internal ID.
EventType: BaseEventType
SourceNode: NodeId of the application which fired the event.
SourceName: Name of the application which fired the event.
Time: Timestamp when the event occurred.
Message: Message hold by the event.
Severity: The conversion is done using the following rule: (1000 - (priority * (999.0/255))). This converts the Alarmmanager range (255 (low) to 0 (high) into the OPC UA range 1(low) to 1000(high)). If this mapping is not appropriate for your needs, use the SetCustomMapping function to set your own mapping.
ReceiveTime: Will be filled up by the server automatically.
Mapping of alarms:¶
Alarms are mapped according to OPC UA Alarms and Conditions (Part 9).
Mapping of EventTypes
Acknowledgement method |
OPC UA EventType |
REP |
ConditionType |
ACK |
AcknowledgeableConditionType |
REP_ACK |
AlarmConditionType |
ACK_REP |
AlarmConditionType (OPC UA and ISA 18.2 compliant) |
ACK_REP_ACK |
AlarmConditionType |
Acknowledge is possible by an OPC UA Client
The confirm within the state-machine of the AlarmManager is mapped to OPC UA AckedState and not ConfirmedState.
ConditionRefresh(2) is supported to allow clients to synchronize to the current state of the alarms.
Change behavior of Library¶
The AlarmManagerToOpcUaConnector will load the default texts (default language) by default upon application start. If this behavior is not desired set the application define AlarmManagerToOpcUaConnector_DontLoadDefaultTexts do disable this.