EventsToOPC-UA
EventsToOPC-UA
OPC UA includes a system for event-handling, similar to how it is done in the CDP Framework. OPC UA also has a special event class called condition events that can carry information about the state of the object that the event is associated with. The condition events will be sent out when some monitored condition changes. Similar to the CDP alarms, the OPC UA condition events have a special event sub-class called alarm events that can be used to indicate that the object is in a state that requires attention.
Read more about the OPC UA events from the OPC UA reference documentation, at events specification.
The EventsToOPC-UA is a block that can be added to the OPC-UA-Server in order to propagate CDP events out to the OPC UA clients as OPC UA events.
To start forwarding CDP events to OPC UA, add an instance of the EventsToOPC-UA block to the OPC-UA-Server. With the default configuration, the block will start to listen to all the CDP events, convert and forward them to the OPC UA clients as OPC UA events. In addition, the block is also able to forward the OPC UA event acknowledge and/or confirm method calls (made by any OPC UA client) back to the CDP event system to acknowledge the corresponding CDP alarm.
EventsToOPC-UA has the following configuration properties:
Property | Description |
---|---|
ListenPaths<string> | Semicolon-separated list of CDP object paths to listen only. When left empty, all object events are listened to. |
EventConverterScript<string> | A ChaiScript to calculate the OPC UA event attributes (to the value map named UAEvent) from the CDP event attributes (accessible in the value map named CDPEvent). See Event Conversion ChaiScripts for more information. |
UAMethodThatAcknowleges<unsigned char> | Flags, that specify what OPC UA method calls (Acknowledge or Confirm or both) are causing the corresponding CDP alarm to be acknowledged. |
EventSourceNodeId<string> | Together with EventSourceNodeIdType and EventSourceNodeNamespaceIndex properties specifies an OPC UA node that the block is emitting the events from under. By default, a OPC UA Server information object (i=2253) node is used. |
EventSourceNodeIdType<string> | Together with EventSourceNodeId and EventSourceNodeNamespaceIndex properties specifies an OPC UA node that the block is emitting the events from under. By default, a OPC UA Server information object (i=2253) node is used. |
EventSourceNodeNamespaceIndex<unsigned short> | Together with EventSourceNodeId and EventSourceNodeIdType properties specifies an OPC UA node that the block is emitting the events from under. By default, a OPC UA Server information object (i=2253) node is used. |
You can also add multiple EventsToOPC-UA blocks to OPC-UA-Server with different configurations. Multiple blocks with different ListenPath settings can be useful when different CDP subsystems (like applications or components) events should converted to OPC UA events using very different conversion logic and conversion scripts or they should be sent out from different OPC UA nodes.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.