Skip to main content

general

Monitor OPC UA Variables

The monitored items are the nodes that are monitored by the client.

The client will send a notification when the value of the node changes.

You can either specify a nodeId to monitor directly on this node, or inject or more node-id.

The output message will contain the current value of the monitored nodes.

This node is configured once and then can be forgotten, it will send messages whenever the conditions are met.

Properties

  • Name: The name of the node

  • Endpoint: The predefined endpoint of the OPC UA server to connect to.

  • Subscription : The subscription to use for monitoring the nodes, Subscriptions are defined in the "Endpoint" node.

    The frequence at which the server will send a batch of notification is handled by the subscription is specified in this subscription.

    A subscription can typically hold a large number of monitored items.

    This node manages a single or a subset of the monitored items handled by the selected subscription.

  • Start Immediately: indicates if the subscription should be launch immediately when the flow starts:

    If checked, the subscription will start immediately, by automatically monitoring the nodes specified in NodeId field.

    If unchecked, the subscription will start when the first message arrives, with the nodeId property in the payload (see belows) or with the nodeId property specified in the node configuration.

    If you want to monitor an array of UAVariable or a JSON structure, you need to unset the `start immediatly' node, clear the NodeId field and inject the NodeId you want to monitor using one of the technics decribed below.

  • Sample Interval: The interval in milliseconds to use for monitoring the nodes.

    This is the interval at which the client will request the server to sample variable changes. (default: 1000 ms)

    Sampling is done by the OPC UA Server itself on behalf the cliient.

    The OPC UA server will only submit data change notificiation if the UAVariable dataValue has actually changed, as per OPC UA specificiations.

  • Queue Size: The maximum number of notifications that the client will store in the queue. If the queue is full, the oldest notification will be removed. (default: 1000) see OPC UA Specification

  • Discard Oldest: If the queue is full, the oldest notification will be removed. If unchecked, the newest notification will be removed. (default: true)

  • Deadband: The deadband value to use for monitoring the nodes.

    • Not Use : No dead band filter

    • Absolute : The deadband is an absolute value. The server will send a notification if the value changes by more than the deadband value.

    • Percent : The deadband is a percentage value. The server will send a notification if the value changes by more than the deadband percentage value.

      The monitored Value must have a EURange property so that the actual deadband value can be calculated.

monitoring a single OPC UA node specified in the node configuration

simply specify the nodeId of the node you want to monitor in the nodeId field.

monitoring a single OPC UA node injected in the node

If you want to inject the nodeId, you have to unset the "start immediately" checkbox. The subscription will start when the first message arrives, with the nodeId property in the payload.

monitoring an array of OPC UA nodes

monitoring a arbitrary structure of OPC UA nodes

you can also inject an object with a structure of nodeIds. The output message will contain the same structure with the current values.

for instances:

{
"nodeId1": "ns=1;s=MyVariable1",
"nodeId2": "ns=1;s=MyVariable2",
"sub": {
"nodeId3": "ns=1;s=MyVariable3"
}
}

will be automatically monitoring 3 nodes and produce the following ouput when either node value changes:

{
"nodeId1": 123,
"nodeId2": 456,
"sub": {
"nodeId3": 789
}
}
{
"nodeId1": {
"value": 123,
"statusCode": "Good",
"sourceTimestamp": "2020-01-01T00:00:00.000Z"
},
"nodeId2": {
"value": 456,
"statusCode": "Good",
"sourceTimestamp": "2020-01-01T00:00:00.000Z"
},
"sub": {
"nodeId3": {
"value": 789,
"statusCode": "Good",
"sourceTimestamp": "2020-01-01T00:00:00.000Z"
}
}
}

Note: A JSON structure with nodeId or browse path that represent a complex OPC UA UA can easily be created with the Explore. (see OpcUa-Explore node and monitoring a OPC UA subtree below)

Interval is setting for Client requestedPublishingInterval (default: 1000 ms).

Input msg.payload.samplingInterval can bring a specific sampling Interval for monitored Items/Events in the subscription.

monitoring a OPC UA subtree

If you want to monitor a subtree of a OPC UA server, you can conveniently redirect the output of a "OpcUa Explore Node" (with outputType=NodeID) node to the input of this node.

As a result, all nodes of the explored subtree will be monitored. and the payload of the output message of this node will contain the exact structure of the subtree with the current values.

A new message is sent when the value of one of the nodes changes.

Tips & Notes

  • A OPC UA Monitiored Item only notify change if a change has occured.
  • You will always received a initial change notificiation when the monitored item is originally created.

msg properties

  • msg.outputType: undefined | "Value" | "DataValue"

  • msg.samplingInterval: sampling interval in miliseconds or 0 to use minimumSampling interval of the corresponding monitored variable. When specified, it will override the node configuration for the sampling interval.

  • msg.deadbandType: undefined | "None" | "Absolute" | "Percent" When specified, it will override the node configuration for the deadband type.

  • msg.deadbandValue: deadband value to use for monitoring the nodes.

  • msg.queueSize: <positive number>The maximum number of notifications that the client will store in the queue. If the queue is full, the oldest notification will be removed. (default: 1000) [see OPC UA Specification](https://reference.opcfoundation.org/Core/Part4/v105/docs/ (default: 1)

  • msg.discardOldest: true|false If the queue is full, the oldest notification will be removed. If unchecked, the newest notification will be removed. (default: false)