Brief description of the used letter’s "B", "E" and "V":

B

Basic

Mandatory VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT.

E

Extended

Optional VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT.

V

Vendor Specific

Vendor specific VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT.

The detailed description can be found in Annex A.

VAR_INPUT is shown on the left side of the Function Blocks.

VAR_OUTPUT is shown on the right side of the Function Blocks.

VAR_IN_OUT is shown on the left and right side of the Function Blocks and has a dashed line below.

FB-Name

UA_Connect

This Function Block is used to create a (optional secure) transport connection and an OPC UA session. The connection shall be terminated by calling the UA_Disconnect after establishing the connection.

VAR_INPUT

B

Execute

BOOL

On rising edge connection is started.

B

ServerEndpointUrl

Vendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING. URL

B

SessionConnectInfo

STRUCT

See UASessionConnectInfo

B

Timeout

TIME

Maximum time to establish the connection.

VAR_OUTPUT

B

Done

BOOL

Signals a connection has been initially established.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

ConnectionHdl

DWORD

Connection handle – is valid until UA_Disconnect is called.

Notes: The connection monitoring and the reconnect handling are to be done by the client vendor implementation. The reconnect sequence is defined in OPC 10000-4.

UA_Connect

BOOL

Execute

Done

BOOL

Vendor specific

ServerEndpointUrl

Busy

BOOL

STRUCT

SessionConnectInfo

Error

BOOL

TIME

Timeout

ErrorID

DWORD

ConnectionHdl

DWORD

FB-Name

UA_Disconnect

This Function Block is used to close a transport connection of an OPC UA session.

VAR_INPUT

B

Execute

BOOL

On rising edge connection is terminated.

B

ConnectionHdl

DWORD

Connection handle of connection to be closed.

B

Timeout

TIME

Maximum time to close the connection.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

Notes: Calling UA_Disconnect (even in case of timeout or error) will release the ConnectionHdl, all node-handles and MonitoredItems.

UA_Disconnect

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

TIME

Timeout

Error

BOOL

ErrorID

DWORD

FB-Name

UA_NamespaceGetIndexList

This Function Block is used to get the namespace-indexes of numerous namespace-URIs

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

NamespaceUrisCount

UINT

Number of NamespaceUris in Array of NamespaceUris.

B

NamespaceUris

ARRAY OFVendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING. Array of Vendor specific with the NamespaceUris. See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

B

Timeout

TIME

Maximum time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

ErrorIDs

ARRAY OFDWORD

Error codes. Array shall be the same number of elements as NamespaceUrisCount.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

B

NamespaceIndexes

ARRAY OFUINT

Namespace Indexes. Array shall be the same number of elements as NamespaceUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

Notes: Reads the Server-Object NamespaceArray (NS:0; Id: 2255) and returns the indexes of the requested elements which can be used in subsequent calls where the Namespace-Array-Index is required - e.g., UA_NodeGetHandleList.

This is a convenient function block – could also be done with ReadList and the returned unknown array length of the NamespaceArray could be evaluated in the user program.

In case the requested NamespaceUri is not found the error PLCopenUA_Bad_NSNotFound will be returned in the corresponding ErrorIDs.

UA_NamespaceGetIndexList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NamespaceUrisCount

Error

BOOL

ARRAY of Vendor specific

NamespaceUris

ErrorID

DWORD

TIME

Timeout

ErrorIDs

ARRAY of DWORD

NamespaceIndexes

ARRAY of UINT

FB-Name

UA_ServerGetUriByIndex

This Function Block is used to get the server-URI with a given index.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

ServerIndex

UDINT

ServerArray Index.

B

Timeout

TIME

Maximum time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

ServerUri

Vendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING.

The URI from the ServerArray with the given ServerIndex.

Notes: -

UA_ServerGetUriByIndex

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UDINT

ServerIndex

Error

BOOL

TIME

Timeout

ErrorID

DWORD

ServerUri

Vendor specific

FB-Name

UA_ServerGetIndexByUriList

This Function Block is used to get several server-indexes of server-URIs

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

ServerUrisCount

UINT

Number of ServerUris in Array of ServerUris.

B

ServerUris

ARRAY OFVendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING.

Array of Vendor specific with the ServerUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

B

Timeout

TIME

Maximum time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

ErrorIDs

ARRAY OFDWORD

Error codes. Array shall be the same number of elements as ServerUrisCount.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

B

ServerIndexes

ARRAY OFUDINT

Server Indexes. Array shall be the same number of elements as ServerUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

Notes: Reads the Server-Object ServerArray (NS:0; Id: 2254) and returns the indexes of the requested elements which can be used in subsequent calls where the Server-Array-Index is required - e.g. UA_Browse.

This is a convenient function call – could also be done with ReadList and the returned unknown array length of the ServerArray could be evaluated in the user program.

In case the requested ServerUri is not found the error PLCopenUA_Bad_NSNotFound will be returned in the corresponding ErrorIDs.

UA_ServerGetIndexByUriList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

ServerUrisCount

Error

BOOL

ARRAY of Vendor specific

ServerUris

ErrorID

DWORD

TIME

Timeout

ErrorIDs

ARRAY of DWORD

ServerIndexes

ARRAY of UINT

FB-Name

UA_TranslatePathList

This Function Block is used to get the node parameters of a node using paths of the node for multiple nodes.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

BrowsePathsCount

UINT

Number of UABrowsePath in Array of BrowsePaths.

B

BrowsePaths

ARRAY OFUABrowsePath

An Array of UABrowsePath with node parameters for starting node and relative path.

See Constants of Array Lengths (MAX_ELEMENTS_RELATIVEPATH)

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

TargetNodeIDs

ARRAY OFSTRUCT

See UANodeID. Structure UANodeID with node parameters. For target node mentioned by BrowsePath at the input of this FB. Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths

B

TargetErrorIDs

ARRAY OFDWORD

Array of TargetErrorIDs. Contains an error code for each element of the TargetNodeIDs array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths.

Shall be same size like the NoOfElements in BrowsePath array length.

Notes: -

UA_TranslatePathList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

BrowsePathsCount

Error

BOOL

ARRAY OF UABrowsePath

BrowsePaths

ErrorID

DWORD

TIME

Timeout

TargetNodeIDs

ARRAY OF STRUCT

TargetErrorIDs

ARRAY OF DWORD

FB-Name

UA_NodeGetHandleList

This Function Block is used to get node handles for multiple nodes.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeIDCount

UINT

Number of NodeIDs in Array of NodeIDs.

B

NodeIDs

ARRAY OFUANodeID

See UANodeID.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Array length of NodeIDs and NodeHdls must be same.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB. Set to TRUE if either ErrorID or any of the NodeErrorIDs indicates an error.

B

ErrorID

DWORD

Error code.

B

NodeErrorIDs

ARRAY OFDWORD

Array of NodeErrorIDs. Contains an error code for each valid element of the NodeIds array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the NodesIDs array length.

B

NodeHdls

ARRAY OFDWORD

Array of Node Handles. Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Array length of NodeIDs and NodeHdls must be same.

Notes: The NodeHdl is a reference to the internal management object for the node in the client. However, the internal client implementation shall also register the node at the server (“RegisterNode”). This enables the OPC UA Server to optimize the communication.

UA_NodeGetHandleList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NodeIDCount

Error

BOOL

ARRAY OF STRUCT

NodeIDs

ErrorID

DWORD

TIME

Timeout

NodeErrorIDs

ARRAY OF DWORD

NodeHdls

ARRAY OF DWORD

FB-Name

UA_NodeReleaseHandleList

This Function Block is used to release a set of node handles.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeHdlCount

UINT

Number of Nodes in NodeHdls Array.

B

NodeHdls

ARRAY OF DWORD

Array of Node handles to be released.Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths NULL is not a valid handle.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB. Set to TRUE if either ErrorID or any of the NodeErrorIDs indicates an error.

B

ErrorID

DWORD

Error code.

B

NodeErrorIDs

ARRAY OF DWORD

Array of DWORD. Contains an error code for each valid element of the NodeHdls array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the NodeHdls array length.

Notes: After calling UA_NodeReleaseHandleList the NodeHdls will be invalid.

UA_NodeReleaseHandleList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NodeHdlCount

Error

BOOL

ARRAY OF DWORD

NodeHdls

ErrorID

DWORD

TIME

Timeout

NodeErrorIDs

ARRAY OF DWORD

FB-Name

UA_NodeGetInformation

This Function Block is used to get the node information.

VAR_INPUT

B

Execute

BOOL

On rising edge node information will be read.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeID

UANodeID

See UANodeID

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

NodeGetInfoErrorIDs

ARRAY [0 .. 22] OFDWORD

Array of DWORD. Contains an error code for each valid element of the NodeHdls array.

Shall be same size like number of UANodeInformation elements. This struct has 20 elements.The NodeGetInfoErrorIDs have the same indices as in OPC 10000-6 specification defined, e.g. (Value = 13). The size of the array is from 0 to 22 where elements 0 and 1 are not being used.

B

NodeInfo

UANodeInformation

See UANodeInformation

Notes: Depending on the responded NodeClass (see UANodeClassMask) the corresponding NodeGetInfoErrorID shall have the following errors.

  • Elements, which are not in this NodeClass existing shall have PLCopenUA_Bad_AttributeIdUnknown.
  • Elements, which should exist but don’t, shall have PLCopenUA_Bad_AttributeIdInvalid.
  • Valid elements shall have OpcUa_Good.

UA_NodeGetInformation

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

STRUCT

NodeID

Error

BOOL

TIME

Timeout

ErrorID

DWORD

NodeGetInfoErrorIDs

ARRAY OF DWORD

NodeInfo

UANodeInformation

FB-Name

UA_SubscriptionCreate

This Function Block can be used to create a subscription.

VAR_INPUT

B

Execute

BOOL

On rising edge subscription will be created.

B

ConnectionHdl

DWORD

Connection handle.

B

PublishingEnable

BOOL

Activate the publishing.

B

Priority

BYTE

Priority of the Subscription in the server relative to the other Subscriptions created by this client.See OPC 10000-4.

B

Timeout

TIME

Maximum time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

SubscriptionHdl

DWORD

Subscription handle.

VAR_IN_OUT

B

PublishingInterval

TIME

Publishing interval (can be changed by the Server revised publishing interval).

Notes: The connection monitoring and the reconnect handling are to be done by the client vendor implementation. The reconnect sequence is defined in OPC 10000-4.

SubscriptionHdl must be unique even if the client is connected to multiple servers.

UA_SubscriptionCreate

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

BOOL

PublishingEnable

Error

BOOL

BYTE

Priority

ErrorID

BOOL

TIME

Timeout

SubscriptionHdl

DWORD

TIME

PublishingInterval

PublishingInterval

TIME

FB-Name

UA_SubscriptionDelete

This Function Block can be used to delete a subscription.

VAR_INPUT

B

Execute

BOOL

On rising edge, the subscription mentioned by SubscriptionHdl will be deleted.

B

SubscriptionHdl

DWORD

Subscription handle.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

Notes: -

UA_SubscriptionDelete

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

TIME

Timeout

Error

BOOL

ErrorID

DWORD

FB-Name

UA_SubscriptionModify

This Function Block is designed to be optionally called to modify publishing parameters (enable / interval).

VAR_INPUT

B

Execute

BOOL

FB operates on rising edge.

B

SubscriptionHdl

DWORD

Subscription handle.

B

PublishingEnable

BOOL

Activates the publishing.

B

Priority

BYTE

Priority of the Subscription in the server relative to the other Subscriptions created by this client.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

VAR_IN_OUT

B

PublishingInterval

TIME

Publishing interval (can be changed by the Server revised publishing interval).

Notes: -

UA_SubscriptionModify

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

BOOL

PublishingEnable

Error

BOOL

BYTE

Priority

ErrorID

DWORD

TIME

Timeout

TIME

PublishingInterval

PublishingInterval

TIME

FB-Name

UA_SubscriptionProcessed

This Function Block is designed to be optionally called to check if monitored items have been published. The use of the function block depends on the underlying system – see notes.

VAR_INPUT

B

Execute

BOOL

FB operates on each call.

B

SubscriptionHdl

DWORD

Subscription handle.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

Published

BOOL

Indicates, that variables have been published since the last call.

Notes: It is expected to use this call, if the underlying system WILL publish the values automatically. Shall not be used together with the function block UA_MonitoredItemOperateList. This call is expected to return with a valid result after it is called. See also 4.2 Monitored Items.

UA_SubscriptionProcessed

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

TIME

Timeout

Error

BOOL

ErrorID

BOOL

Published

DWORD

FB-Name

UA_MonitoredItemAddList

This Function Block can be used to add handle of multiple nodes using a list of node handles.

VAR_INPUT

B

Execute

BOOL

On rising edge monitored items will be added to a subscription.

B

SubscriptionHdl

DWORD

Subscription handle.

B

NodeHdlCount

UINT

Number of valid elements in the array to add.

B

NodeHdls

ARRAY OFDWORD

Array of Node handles.

Max length of array is to be defined by the vendor and shall be same length thanVariables array length. Shall be the same size as NodeHdlCount.

See Constants of Array Lengths (MAX_ELEMENTS_MONITORLIST)

B

SyncMode

UAMonitoringSyncMode

See UAMonitoringSyncMode

See chapter 4.2 Monitored Items for general concept of SyncModes

  • 0 = UAMSync_UnknownDefault, this results into an error code – has to be set to one of the following options
  • 1 = UAMS_ControllerSync
  • 2 = UAMS_FwSync

B

NodeAddInfos

ARRAY OFUANodeAdditionalInfo

See UANodeAdditionalInfo. Specifies the attribute and IndexRange.

See Constants of Array Lengths (MAX_ELEMENTS_MONITORLIST)

This parameter is optional. If not existing, the UAAI_Value (13) will be taken from internal implementation.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

NodeErrorIDs

ARRAY OFDWORD

Array of DWORD. Contains an error code for each element of the Variables array.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same length than NodeHdlCount.

B

MonitoredItemHdls

ARRAY OFDWORD

Array of monitored item handles.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same length than NodeHdlCount.

VAR_IN_OUT

B

Variables

ARRAY OFUAMonitoredVariables

See UAMonitoredVariables.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same length as NodeHdlCount

B

MonitoringParameter

ARRAY OFUAMonitoringParameter

See UAMonitoringParameter

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same length as NodeHdlCount.

B

ValuesChanged

ARRAY OFBOOL

Indicates that the values of the monitored item have been changed.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). Shall be the same length as NodeHdlCount.See Constants of Array Lengths

B

MinLostValueCount

ARRAY OFUINT

Count the minimum lost values if queue size is > 1 – see also UAMonitoredVariables.

Notes: VAR_IN_OUT: „Variables” as would provide best type save solution for users: The client firmware is able to map the UA memory layout to the controller layout. The firmware client can receive the type definition from the OPC UA Server.Workaround would be to provide a byte array as “Variables” and the firmware client just provide the blob (UA memory layout – so called “raw data”) into that byte array.

A “Variable” could be the name of the variable so the internal firmware can get address, length, data type of variable.

UA_MonitoredItemAddList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UINT

NodeHdlCount

Error

BOOL

ARRAY OF DWORD

NodeHdls

ErrorID

DWORD

UAMonitoringSyncMode

SyncMode

NodeErrorIDs

ARRAY OF DWORD

ARRAY OFUANodeAdditionalInfo

NodeAddInfos

MonitoredItemHdls

ARRAY OF DWORD

TIME

Timeout

ARRAY OFUAMonitoredVariables

Variables

Variables

ARRAY OFUAMonitoredVariables

ARRAY OFUAMonitoringParameter

MonitoringParameter

MonitoringParameter

ARRAY OFUAMonitoringParameter

ARRAY OF BOOL

ValuesChanged

ValuesChanged

ARRAY OF BOOL

ARRAY OF UINT

MinLostValueCount

MinLostValueCount

ARRAY OF UINT

FB-Name

UA_MonitoredItemRemoveList

This Function Block can be used to remove multiple nodes from a subscription using a list of node handles.

VAR_INPUT

B

Execute

BOOL

On rising edge monitored items will be removed from the subscription.

B

SubscriptionHdl

DWORD

Subscription handle.

B

MonitoredItemHdlCount

UINT

Number of valid elements in the array to remove.

B

MonitoredItemHdls

ARRAY OFDWORD

Monitored item handles.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same size than MonitoredItemHdlCount

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

NodeErrorIDs

ARRAY OFDWORD

Array of DWORD. Contains an error code for each valid element of the Variables array.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths

Shall be the same size than MonitoredItemHdlCount.

Notes: -

UA_MonitoredItemRemoveList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UINT

MonitoredItemHdlCount

Error

BOOL

ARRAY OF DWORD

MonitoredItemHdls

ErrorID

DWORD

TIME

Timeout

NodeErrorIDs

ARRAY OF DWORD

FB-Name

UA_MonitoredItemModifyList

This Function Block is designed to be optionally called to modify a list of monitored item parameters.

VAR_INPUT

B

Execute

BOOL

On rising edge monitored items will be modified.

B

SubscriptionHdl

DWORD

Subscription handle.

B

MonitoredItemHdlCount

UINT

Number of valid elements in the array to modify.

B

MonitoredItemHdls

ARRAY OFDWORD

Array of monitored item handles.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same size than MonitoredItemHdlCount

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

NodeErrorIds

ARRAY OFDWORD

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths – including the “Overflow bit” indication

VAR_IN_OUT

B

MonitoringParameters

ARRAY OFUAMonitoringParameter

See UAMonitoringParameter

Notes: -

UA_MonitoredItemModifyList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UINT

MonitoredItemHdlCount

Error

BOOL

ARRAY OF DWORD

MonitoredItemHdls

ErrorID

DWORD

TIME

Timeout

NodeErrorIds

ARRAY OF DWORD

ARRAY OFUAMonitoringParameter

MonitoringParameters

MonitoringParameters

ARRAY OFUAMonitoringParameter

FB-Name

UA_MonitoredItemOperateList

This Function Block is designed to be called to update the values of a list of Variables and the corresponding information in the associated lists like ValuesChanged, TimeStamps and NodeQualityIDs of the control program. The use of the function block depends on the underlying system – see notes.

VAR_INPUT

B

Execute

BOOL

On rising edge monitored items will be modified.

B

SubscriptionHdl

DWORD

Subscription handle.

B

MonitoredItemHdlCount

UINT

Number of valid elements in the array to modify.

B

MonitoredItemHdls

ARRAY OFDWORD

Array of monitored item handles.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths. Shall be the same size than MonitoredItemHdlCount.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

NodeErrorIDs

ARRAY OFDWORD

Array of DWORD. Contains an error code for each element of the MonitoredItemHdls-Array.

Length is vendor-specific (MAX_ELEMENTS_MONITORLIST). See Constants of Array Lengths Shall be the same length than MonitoredItemHdlCount.

B

Published

BOOL

Indicates, that variables have been published since the last call. At least one element of the array of ValuesChanged will be TRUE.

Notes: It is expected to use this call, if the underlying system will NOT update the values automatically. Shall not be used together with the function block UA_SubscriptionProcessed. After the successful execution it is expected, that the values of the Variables and the corresponding information in the associated lists like ValuesChanged, TimeStamps and NodeQualityIDs have been updated. See also 4.2 Monitored Items.

UA_MonitoredItemOperateList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UNIT

MonitoredItemHdlCount

Error

BOOL

ARRAY OF DWORD

MonitoredItemHdls

ErrorID

DWORD

NodeErrorIDs

ARRAY OF DWORD

Published

BOOL

FB-Name

UA_ReadList

This Function Block is used to read values of multiple nodes using a list of node handles.

VAR_INPUT

B

Execute

BOOL

On rising edge node information will be read.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeHdlCount

UINT

Number of valid elements in the array to read.

B

NodeHdls

ARRAY OFDWORD

Array of Node Handles.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

B

NodeAddInfos

ARRAY OFUANodeAdditionalInfo

See UANodeAdditionalInfo. Array of UANodeAdditionalInfo. Specifies the attribute and IndexRange.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

This parameter is optional. If not existing the UAAI_Value (13) will be taken from internal implementation.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected

B

Error

BOOL

Signals that an error has occurred within the FB. Set to TRUE if either ErrorID or any of the NodeErrorIDs indicates an error.

B

ErrorID

DWORD

Error code for the OPC UA service call.

B

NodeErrorIDs

ARRAY OFDWORD

Array of DWORD. Contains an error code for each valid element of the Variables array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

B

TimeStamps

ARRAY OFVendor specific

Shall be DT or LDT. The recommendation for new implementation is to use LDT. Contains a TimeStamp for each valid element of the Variables array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). Constants of Array Lengths Constants of Array LengthsShall be same size like the Variables array length.

This parameter is optional. If not existing the internal client implementation shall not ask for any timestamp from server side.

VAR_IN_OUT

B

Variables

ARRAY OFVendor specific

Vendor specific. Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths

Notes: Vendors can handle “Variables” in a vendor specific way. Independent of the vendor specific solution the mapping of the controller data type and OPC UA data type shall be handled in the function block.

VAR_IN_OUT: “Variables” as would provide best type save solution for users: The client firmware is able to map the UA memory layout to the controller layout. The firmware client can receive the type definition from the OPC UA Server.Workaround would be to provide a byte array as “Variables” and the firmware client just provide the blob (UA memory layout – so called “raw data”) into that byte array.

A “Variable” could be the name of the variable so the internal firmware can get address, length, data type of variable.

UA_ReadList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NodeHdlCount

Error

BOOL

ARRAY OF DWORD

NodeHdls

ErrorID

DWORD

ARRAY OF STRUCT

NodeAddInfos

NodeErrorIDs

ARRAY OF DWORD

TIME

Timeout

TimeStamps

ARRAY OF Vendor specific

ARRAY OF Vendor specific

Variables

Variables

ARRAY OF Vendor specific

FB-Name

UA_WriteList

This Function Block is used to write values to multiple nodes using a list of node handles.

VAR_INPUT

B

Execute

BOOL

On rising edge node values will be written.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeHdlCount

UINT

Number of valid elements in the array to write.

B

NodeHdls

ARRAY OFDWORD

Array of Node Handles.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

B

NodeAddInfos

ARRAY OFUANodeAdditionalInfo

See UANodeAdditionalInfo. Array of UANodeAdditionalInfo. Specifies the attribute and IndexRange.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

This parameter is optional. If not existing, the UAAI_Value (13) will be taken from internal implementation.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB. Set to TRUE if either ErrorID or any of the NodeErrorIDs indicates an error.

B

ErrorID

DWORD

Error code for the OPC UA service call.

B

NodeErrorIDs

ARRAY OFDWORD

Array of DWORD. Contains an error code for each valid element of the Variables array.

Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths Shall be same size like the Variables array length.

VAR_IN_OUT

B

Variables

ARRAY OFVendor specific

Vendor specific. Length is vendor-specific (MAX_ELEMENTS_NODELIST). See Constants of Array Lengths.

Notes: Vendors can handle “Variables” in a vendor specific way. Independent of the vendor specific solution the mapping of the controller data type and OPC UA data type shall be handled in the function block.

VAR_IN_OUT: “Variables” as would provide best type save solution for users: The client firmware is able to map the UA memory layout to the controller layout. The firmware client can receive the type definition from the OPC UA Server.

Workaround would be to provide a byte array as “Variables” and the firmware client just provide the blob (UA memory layout – so called “raw data”) into that byte array.

A “Variable” could be the name of the variable so the internal firmware can get address, length, data type of variable.

UA_WriteList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NodeHdlCount

Error

BOOL

ARRAY OF DWORD

NodeHdls

ErrorID

DWORD

ARRAY OF STRUCT

NodeAddInfos

NodeErrorIDs

ARRAY OF DWORD

TIME

Timeout

ARRAY OF Vendor specific

Variables

Variables

ARRAY OF Vendor specific

FB-Name

UA_MethodGetHandleList

This Function Block is used to get multible method handles for method calls.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeIDCount

UINT

Number of elements the ObjectNodeIDs and MethodNodeIDs shall have.

B

ObjectNodeIDs

ARRAY OF

UANodeID

See UANodeID. Array shall have the size of NodeIDCount

See Constants of Array Lengths

B

MethodNodeIDs

ARRAY OF

UANodeID

See UANodeID. Array shall have the size of NodeIDCount

See Constants of Array Lengths

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

ErrorIDs

ARRAY OFDWORD

Error codes.

B

MethodHdls

ARRAY OFDWORD

Method handles.

Notes: -

UA_MethodGetHandleList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

NodeIDCount

Error

BOOL

ARRAY OF UANodeID

ObjectNodeIDs

ErrorID

DWORD

ARRAY OF UANodeID

MethodNodeIDs

ErrorIDs

ARRAY OF DWORD

TIME

Timeout

MethodHdls

ARRAY OF DWORD

FB-Name

UA_MethodReleaseHandleList

This Function Block is used to release method handles.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

MethodHdlCount

UINT

Number of elements the MethodHdls shall have.

B

MethodHdls

ARRAY OFDWORD

Method handles to be released.

See Constants of Array Lengths (MAX_ELEMENTS_METHOD)

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

ErrorIDs

ARRAY OFDWORD

Error codes. See Constants of Array Lengths (MAX_ELEMENTS_METHOD)

Notes: After calling UA_MethodReleaseHandle or MethodReleaseHandleList the MethodHdl(s) will be invalid.

UA_MethodReleaseHandleList

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UINT

MethodHdlCount

Error

BOOL

ARRAY OF DWORD

MethodHdls

ErrorID

DWORD

TIME

Timeout

ErrorIDs

ARRAY OF DWORD

FB-Name

UA_MethodCall

This Function Block is used to call a method routine.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

MethodHdl

DWORD

Method handle.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

VAR_IN_OUT

E

MethodResult

DWORD

StatusCode of the Method executed in the Server.

If a vendor do not provide this extended output then the operation result should be returned in the ErrorID.

B

InputArguments

Vendor specific

Variable containing input parameters. Vendor specific.

B

OutputArguments

Vendor specific

Variable containing output parameters. Vendor specific.

Notes: -

UA_MethodCall

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

DWORD

MethodHdl

Error

BOOL

TIME

Timeout

ErrorID

DWORD

DWORD

MethodResult

MethodResult

DWORD

Vendor specific

InputArguments

InputArguments

Vendor specific

Vendor specific

OutputArguments

OutputArguments

Vendor specific

FB-Name

UA_Browse

This Function Block is used to navigate through the Address Space. Passing a starting node, the server retuns a list of nodes by references.The MaxArray size is configured for the controller must be passed as the RequestMaxReferencePerNode in the firmeware service call.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

E

ViewDescription

UAViewDescription

Optional: Shall be an empty parameter if NOT browsing a View.

B

BrowseDescription

UABrowseDescription

Starting Node and other information for navigation.

See UABrowseDescription

Hint: This parameter is ignored if the ContinuationPointIn is not 0

B

ContinuationPointIn

DWORD

If set to 0 the browse starts with starting node.

If set to ContinuationPointOut it can be used for browse next service.

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

BrowseResultCount

UINT

The number of entries in the BrowseResult array

B

BrowseResult

ARRAY OFUAReferenceDescription

List of references and target node information for the node passing the filter criteria in the request

See UAReferenceDescription

Length is vendor-specific (MAX_ELEMENTS_BROWSERESULT). See Constants of Array Lengths Hint: MaxSize is initialized by a predefined fixed size

B

ContinuationPointOut

DWORD

Set when the server was not able to to deliver all results. Can be used to copy it to ContinuationPointIn for browse next service

Notes: -

UA_Browse

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

UAViewDescription

ViewDescription

Error

BOOL

UABrowseDescription

BrowseDescription

ErrorID

DWORD

DWORD

ContinuationPointIn

BrowseResultCount

UINT

TIME

Timeout

BrowseResult

ARRAY OFUAReferenceDescription

ContinuationPointOut

DWORD

FB-Name

UA_EventItemAdd

This Function Block is used to add handles for events.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

SubscriptionHdl

DWORD

Subscription handle.

B

NodeHdl

DWORD

Handle of the node to monitor for emitted events. Events are only produced by the node classes Object and View. Whether a node is actually producing events or not may be determined by its EventNotifier attribute.

B

EventType

UANodeID

Type of the event to monitor. The EventType will be included as OfType operator in the Where Clause of the event monitored item filter.

B

EventFieldSelectionCount

UINT

Number of elements in EventFieldSelections

B

EventFieldSelections

ARRAY OFUARelativePath

Array of UARelativePath for the event fields to select. The path starts from the event type node. The FieldSelection is used as Select Clause of the event monitored item filter.

Examples are

0: Message selects the Message event field

0: ActiveState/0: Id selects the Boolean representation of the Alarm ActiveState.

Length is vendor-specific (MAX_EVENT_FIELD_SELECTIONS). See Constants of Array Lengths Hint: MaxSize is initialized by a predefined fixed size

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code

B

EventItemHdl

DWORD

Event Item Handle. The handle can be used to process the published events with UA_EventItemOperate and remove them from the subscription with UA_EventItemRemove.

VAR_IN_OUT

B

EventFields

ARRAY OFVendor specific

Vendor specific list of variables used to receive the events field data for one event occurrence. Vendor specific.

B

EventProcessed

BOOL

Indicates that the values of the event item have been changed.

B

RemainingEventCount

UINT

Number of remaining events available for processing

B

FieldErrorIDs

ARRAY OF

DWORD

Contains an error code for each valid element of the EventFieldSelection array.

Length is vendor-specific (MAX_EVENT_FIELD_SELECTIONS). See Constants of Array Lengths – including the “Overflow bit” indication.

Notes: -

UA_EventItemAdd

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

ARRAY OF DWORD

NodeHdl

Error

BOOL

ARRAY OF UANodeId

EventType

ErrorID

DWORD

UINT

EventFieldSelectionCount

EventItemHdl

DWORD

ARRAY OF UARelativePath

EventFieldSelection

TIME

Timeout

ARRAY OF Vendor specific

EventFields

EventFields

ARRAY OF Vendor specific

BOOL

EventProcessed

EventProcessed

BOOL

UINT

RemainingEventCount

RemainingEventCount

UINT

ARRAY OF DWORD

FieldErrorIDs

FieldErrorIDs

ARRAY OF DWORD

FB-Name

UA_EventItemOperateList

This Function Block is used to get a list of event infomation.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

SubscriptionHdl

DWORD

Subscription handle.

B

EventItemHdlCount

UINT

Number of elements the EventItemHdls shall have.

B

EventItemHdls

ARRAY OFDWORD

Event Item Handles

Length is vendor-specific (MAX_ELEMENTS_EVENTITEMLIST). See Constants of Array Lengths

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

B

ErrorID

DWORD

Error code.

B

EventProcessed

BOOL

Indicates if a new event was processed.

B

FieldErrorIDs

ARRAY OFDWORD

Contains an error code for each valid element of the EventFieldSelection array.

Length is vendor-specific (MAX_ELEMENTS_EVENTITEMOPERATE). See Constants of Array Lengths – including the “Overflow bit” indication.

Note: For compatibility reason “FieldErrorIDs” is not renamed, but “EventErrorIDs” is ment therefore instead.

Notes: The EventFields has to be defined what is the best declaration in IEC language for 25 different event type structures.

UA_EventItemOperateList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UINT

EventItemHdlCount

Error

BOOL

ARRAY OF DWORD

EventItemHdls

ErrorID

DWORD

TIME

Timeout

EventProcessed

BOOL

FieldErrorIDs

ARRAY OF DWORD

FB-Name

UA_EventItemRemoveList

This Function Block can be used to remove an event item handle from a subscription.

VAR_INPUT

B

Execute

BOOL

On rising edge node information will be read.

B

SubscriptionHdl

DWORD

Subscription handle.

B

EventItemHdlCount

UINT

Number of elements the EventItemHdls shall have.

B

EventItemHdls

ARRAY OFDWORD

Event item handles.

Length is vendor-specific (MAX_ELEMENTS_EVENTITEMLIST). See Constants of Array Lengths

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected.

B

Error

BOOL

Signals that an error has occurred within the FB.

E

ErrorID

DWORD

Error code.

B

ErrorIDs

ARRAY OFDWORD

Error codes

Notes: -

UA_EventItemRemoveList

BOOL

Execute

Done

BOOL

DWORD

SubscriptionHdl

Busy

BOOL

UINT

EventItemHdlCount

Error

BOOL

ARRAY OF DWORD

EventItemHdls

ErrorID

DWORD

TIME

Timeout

ErrorIDs

ARRAY OF DWORD

FB-Name

UA_HistoryUpdate

This Function Block is used to insert or replace or update data in the historical database.

VAR_INPUT

B

Execute

BOOL

FB performs its task on rising edge on this input.

B

ConnectionHdl

DWORD

Connection handle.

B

NodeHdl

DWORD

Node handle.

B

PerformInsert

BOOL

PerformInsert

PerformReplace

Description

TRUE

FALSE

The passed value will only be written to the history if no value exists at the specified timestamp.

FALSE

TRUE

The passed value will only be written to the history if a value exists at the specified timestamp. The existing value will be replaced.

TRUE

TRUE

The passed value will be inserted if no value exists for the timestamp but will also replace an existing value at the given timestamp.

B

PerformReplace

BOOL

B

DataValueCount

UNIT

Number of values to be inserted, replaced or updates

B

DataValues

ARRAY of UAHADataValue

Array of UAHADataValue

See UAHADataValue

B

Timeout

TIME

Time to response.

VAR_OUTPUT

B

Done

BOOL

FB has completed its task.

B

Busy

BOOL

The FB is not finished and new output values are to be expected

B

Error

BOOL

Signals that an error has occurred within the Function Block.

B

ErrorID

DWORD

Error code. (StatusCode)

B

ValueErrorIDs

ARRAY OFDWORD

Contains an error code for each valid element.

Notes: The idea of this scenario is to have an OPC UA server with HA (Historical Access) functionality available, either local on the same system or remotely in the network. In traditional way the OPC UA Server is responsible to collect data on his own from the underlying process. This FB UA_HistoryUpdate allows the OPC UA-HA Server to stay inactive and wait that an OPC UA client is actively pushing data into OPC UA-HA-Server making use of the Server’s HistoryUpdate interface.

UA_HistoryUpdate

BOOL

Execute

Done

BOOL

DWORD

ConnectionHdl

Busy

BOOL

DWORD

NodeHdl

Error

BOOL

BOOL

PerformInsert

ErrorID

DWORD

BOOL

PerformReplace

ValueErrorIDs

ARRAY OF DWORD

UINT

DataValueCount

ARRAY OF UAHADataValue

DataValues

TIME

Timeout