Back to Aurora Vision Studio website

You are here: Start » Filter Reference » System » OPC UA » OPCUAClient_WriteByteBufferValue

OPCUAClient_WriteByteBufferValue


Module: FoundationLite

Writes a ByteString value to a variable node in a OPC UA server.

Name Type Range Description
Input value inConnectionId Integer 0 - 99 Slot id of the open connection to the server
Input value inNodeId OpcUaNodeId Id of the variable node to write the value to
Input value inValue ByteBuffer? The value to write to the variable node
Input value inStatus Integer OPC UA status code for the variable value

Description

This filter is used to write (send) a value into the "Value" property of a Variable Class node on a OPC UA server.

The inConnectionId input specifies the server connection slot id and must correspond to the value specified in the OPCUAClient_Connect filter.

The inNodeId input specifies the Node Id of the server node to write the value to (see OpcUaNodeId for details). The node pointed to by this id must be of Variable class and with a compatible value data type (see below), otherwise the filter will throw an IOError exception.

The inValue input specifies the value to be written. This input has a conditional type. Setting the value to Nil will result in writing Null to the node's value variant.

The inStatus input specifies the value's usability Status Code to be assigned to the value in the server. In most cases, when writing a valid non-Null value, this input will be left on the default status of 0 (StatusCodeGood). Writing a Null value usually requires to specify a status code in the "Bad" severity range.

This filter can write a scalar value to variables with OPC UA basic data type of ByteString or derived from it, by converting the inValue input value of type ByteBuffer.

This filter can be used to send an image to the OPC UA server, by writing to variable nodes of types Image, ImageBMP, ImageJPG or ImagePNG (all deriving from the ByteString type). To achieve this the source Image must be first saved to an in-memory buffer using the SaveImageToBuffer filter, selecting the image file format appropriate for the destination node type, then writing the intermediate ByteBuffer with the stored image to the OPC UA server.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

This filter will throw an IOError exception on network connection errors, server service call errors and write operation or data conversion errors.

Complexity Level

This filter is available on Basic Complexity Level.

Disabled in Lite Edition

This filter is disabled in Lite Edition. It is available only in full, Aurora Vision Studio Professional version.

Filter Group

This filter is member of OPCUAClient_WriteValue filter group.

See Also