OPC-UA-Write
Use the OPC-UA-Write node to connect App Connect Enterprise applications to an OPC UA server.
Using OPC-UA-Write node in a message flow
The OPC-UA-Write node is a mid-flow node and its driven by OPC-UA-Input and OPC-UA-Read node.
The OPC-UA-Write node processes an XML message that contains the address of an OPC UA server and a list of client items and values. The OPC-UA-Write node connects to the server and writes the specified values to the client items. The incoming message must be a XMLNSC domain message.
You can use OPC-UA-Write node along with OPC-UA-Input node to write the values by using the manufacturing schemas and mapping node.
CREATE LASTCHILD OF itemsRef AS itemRef NAMESPACE wrns NAME 'Item';
SET itemRef.(XMLNSC.Attribute)wrns:path='';
SET itemRef.Data ='';
itemRef.(XMLNSC.Attribute)wrns:path
- Specify the client item path.itemRef.Data
- Specify the client item value based on the data type of the source item to which the client item is mapped to.
Multiple client items can be specified, and array type client items can contain multiple values. For more information, see App Connect for Manufacturing XML schema.
You can route or transform this data by using the nodes that are in the Toolkit palette. For example, you can publish the data with the MQTTPublish node, and then subscribe to the data with the MQTTSubsribe node.
Terminals
Terminal | Description |
---|---|
Failure | The output terminal to which a message is routed if an error occurs during processing. |
Out | The output terminal to which any successful client item readings are routed. |
Properties
mandatoryproperty is marked with an asterisk and a
configurableproperty allows you to edit when you add the message flow to the broker archive (BAR) file.
Basic tab properties
Field | Subfields | Description | OP-UA-Write | Mandatory | Configurable |
---|---|---|---|---|---|
Trigger Item List (OPC-UA-Input Node) or Client Item List | Triggered By | The browse paths of the client items that contain the data that you want to receive. You can add and delete client items. You can discover client items from your OPC UA Server. You can add multiple client items. | |||
Client Item | The browse paths of the client items that contain the data that you want to receive. You can add and delete client items. You can discover client items from your OPC UA Server. You can add multiple client items. | ✓ | Yes | Yes | |
Index Range | Supports reading specific index range from the Read 1D, 2D, or
3D array. Applicable for a node of array type. You can specify the index range against each client
item. The specified is stored in the message flow file, then later fetched and passed in a service
request made to the OPC server. You can override the index range property by using Compute
node. Note: An empty index range is not supported for 2D and 3D array for the Write
node.
|
✓ | No | Yes | |
DataSource Policy Name List | Policy Name | The policy name that is configured for a datasource. | ✓ | ||
DataSource UUID | The DataSource UUID details. | ✓ | |||
DataSource Details | The DataSource details, where the TCP/IP connection for the
destination application, in the form of the following
format. opc.tcp://<host_name>:<port>/<UAServer_name>
Where
<host_name> is the name of the host, <port> is the
number of the port, and <UAServer_name> is the name of the OPC UA
Server. |
✓ |
Monitoring tab properties
Use the Monitoring tab on the properties of a message flow node to add one or more monitoring events. An event source is a point in a message flow from which a monitoring event can be emitted. Each event source has a set of properties that control the contents of the monitoring events that it emits.
For more information, see Configuring monitoring event sources by using monitoring properties.
Field | Description | OPC-UA-Write | Mandatory | Configurable |
---|---|---|---|---|
Policy Project | The policy project name that you want to override the datasource configuration properties at run time. You can use the user-defined policy to control the behavior of the manufacturing message flows, and the nodes in message flows, at run time. | ✓ | No | Yes |
Runtime reconfiguration
If you have an existing client item in the Basic tab, you can add
additional client items at run time using the Compute
node. The "path" provided for each item
in the Compute
node should be unique and can be any dummy path like /xyz
or /abc. Following is the format that gets added to the
readFlow_Compute.esql file.
SET itemRef.(XMLNSC.Attribute)wrns:sourceItemNodeId='sourceItemNodeIdvalue';
SET itemRef.(XMLNSC.Attribute)wrns:path='/anyDummyPath';
SET itemRef.Data = 'DataToBeWritten';
Client item pathof the item on which the write operation is to be performed.