OPC-UA Sub Flat
Type |
---|
'opcuasubflat' |
The OPC-UA Sub Flat adapter block is used to subscribe to a number of OPC-UA Variable nodes in order to receive any data as it changes, and convert that data to flat JSON format.
The following table details the fields of this block's config object. For details on what any common fields mean, see Configuration Properties for OPC-UA Protocol Adapter.
Field | Type | Required | Default |
---|---|---|---|
transport_addr | String | yes | |
data_map | Array | yes | |
log_level | String | 'off' | |
log_name | String | ||
options | Object | ||
report_bad_quality | Boolean | false |
data_map
field is an array that contains objects with two fields: alias
and id
. - The
alias
field gives that node an alias to be used in the flat JSON output data. This alias becomes the Time Series Tag if the data is converted to Time Series Format using the Flat to Time Series conversion block. - The
id
field determines the Node ID of the node on the OPC-UA server.
report_bad_quality
When set to 'true', the report_bad_quality
field is used to send bad quality data about the subscribed tags to the timeseries when connectivity to the OPC UA server is lost. The value of the tags would be set to 'NULL' and the data is sent exactly once to the timeseries. When connectivity is restored, normal data is sent again. If this field is set to 'false', then no data would be sent to timeseries when connectivity to the OPC UA server is lost.
Example Config Block
"opcua": {
"type": "opcuasubflat",
"config": {
"transport_addr": "opc-tcp://<OPCUA_HOST>:<OPCUA_PORT>",
"log_level": "debug",
"report_bad_quality": false,
"data_map": [
{
"alias": "Integration.App.Device1",
"id": "ns=5;s=Counter1"
}
]
}
}