Skip to main content
Version: 2.6

OPC-UA Alarm and Event Access

Alarm and condition module of OPC-UA server can be accessed using the alarm event source info.

The address is the node id of the main object providing A&C.

{
"AlarmEventPool": {
"Id": "FA1611AB-B6C9-4FF4-B34D-BF35E6A44232",
"Name": "AlarmEventPool",
"Tasks": [
{
"Id": "E669AF07-0991-4A40-A7A4-9D2B2B881D07",
"Name": "Standard Messages",
"Address": "ns=2;g={ece37fdf-4862-4543-af23-48ffdb8203c7}"
}
],
"HistoryMode": {
"Retention": 1,
"SampleRate": 1000
}
}
}

OEM Message Mapping

The driver supports PLC alarms by mapping source. It is possible to declare multiple alarm sources (tasks) for one alarm address (pool).

As source address only System.Byte[] is allowed.

This example shows three alarm sources with a mapping file:

  "AlarmEventPool": {
"Id": "FA1611AB-B6C9-4FF4-B34D-BF35E6A44232",
"Name": "AlarmEventPool",
"Tasks": [
{
"Id": "66d0a44d-83e8-494d-9e15-5af16df60d55",
"Name": "Alarm Messages",
"Address": "OEMAlarmEvent",
"Properties": [
{
"Name": "MessageMappingFile",
"Value": "OEMBitMessages.json"
},
{
"Name": "MessageCount",
"Value": 8,
"DataType": "System.Int32"
},
{
"Name": "SourceName",
"Value": "OpcUa",
"DataType": "System.String"
},
{
"Name": "StartAddress",
"Value": "ns=2;s=Demo.Static.Arrays.Byte"
},
{
"Name": "MessageFormat",
"Value": "BitMessage"
},
{
"Name": "Message:Type",
"Value": "Raise"
}
]
}
]
}
AccessorDescription
IdUnique Id for each task
NameA name for the task
AddressAlarm address (pool)
Property MessageMappingFileThe mapping file to load (copy to .\Config\HumanOS.UHAL.OpcUaControl\)
Property MessageCountAmount of messages which are mapped (depends on the Property MessageFormat)
Property StartAddressThe corresponding source address with offset and length (depends on the Property MessageFormat)
Property MessageFormatBitMessage or Channel32Message
Property Message:TypeType of each message that occurs from this source

A property which starts with Message: is attached as property to the alarm item (e.g. message) which means additional fields are added with this data and can be used later on.

Mapping means, the alarms and events are defined by the data given and not the data that the alarm source provides.
The mapping source must either be of type JSON and must be structured like this example:

{
"Messages": [
{
"Id": 0,
"AlarmType": "Alarm",
"OemId": "Alarm 1",
"Text": "PU Sammelfehler",
"Properties": [
{
"Name": "MyProperty",
"Value": "Some other info"
},
{
"Name": "EnableRmq",
"Value": "1"
},
{
"Name": "EnableRest",
"Value": "0"
}
]
}
]
}
AccessorDescription
IdSpecifies the bit number (absolute)
AlarmTypeSpecifies the Alarm type, see Alarm Types in Alarm and Event Source
OemIdThe Condition name of the alarm or event
TextSpecifies the message
PropertiesSpecify properties which are attached to this alarm or event and can later be accessed
Properties:NameProperty name
Properties:ValueProperty value