Back to Aurora Vision Studio website

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

OPCUAClient_ReadBoolValue


Module: FoundationLite

Reads a Boolean value of a variable node from 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 read the value from
Input value inAcceptBadStatus Bool Accept variable value read Bad status code without generating an error
Output value outValue Bool? The value read from the variable node
Output value outStatusCode Integer OPC UA status code of the variable value reported by the server
Output value outSourceTimestamp Long OPC UA UtcTime value source timestamp reported by the server
Output value outServerTimestamp Long OPC UA UtcTime server timestamp

Description

This filter is used to read a value of 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 read the value from (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.

When the inAcceptBadStatus input is set to false, the filter will throw an IOError exception when the value read operation on the server fails or when the StatusCode, currently associated with the value on the server, is in the "Bad" severity range. When this input is set to true, the filter will throw an exception only on connection related errors and will finish successfully even when the read operation fails (e.g. the node id does not exists or the user has no access rights to read it), or when the value usability StatusCode is in the "Bad" severity range. In this case the StatusCode identifying the error will be reported on the outStatusCode output. This mode can be helpful when explicitly handling the value usability status (e.g. the value not yet set condition).

The read value is returned on the outValue output. This output has a conditional type and can return Nil when the source value on the server is equal to Null. Please note that the OPC UA data model allows for the value to be equal to Null on multiple levels (e.g. null string in a variant, or null variant). This filter does not distinguish those levels and returns a single conditional value that is equal to Nil in all those cases. When the inAcceptBadStatus is set to true, this output can also return Nil on read operation failure or when the value usability status severity is "Bad".

The outSourceTimestamp and outServerTimestamp outputs return timestamps associated with the value on the server. When the server does not supports the appropriate timestamp zero is returned in its place. Timestamps format is defined by the OPC UA UtcTime data type (number of 100 nanosecond intervals since January 1, 1601 Universal Time Coordinate). The OPCUA_FormatDateTime filter can be used to convert timestamps into a readable format.

This filter can access scalar variables with OPC UA basic data types of: Boolean, SByte, Byte (or derived from those). The value is internally converted to Bool and returned on the outValue output.

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 read operation 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_ReadValue filter group.

See Also