The following Functionblocks have been released with specification v1. For future use it’s recommended to work with the new “List” version of these Functionblocks.
Example: Instead of multiple times calling UA_NamespaceGetIndex or UA_Read to handle one node it makes sense to reduce effort and complexity by using once only UA_NamespaceGetIndexList and UA_ReadList.
Customers who implemented their applications based on this set of Functionblocks of v1.0 can continue using this standard – but should think about using the newly specified Functionblocks in the future.
10.1 UA_NamespaceGetIndex
FB-Name
UA_NamespaceGetIndex
This Function Block is used to get the namespace-index of a namespace-URI
VAR_INPUT
B
Execute
BOOL
FB performs its task on rising edge on this input.
B
ConnectionHdl
DWORD
Connection handle.
B
NamespaceUri
STRING
Namespace URI.
B
Timeout
TIME
Maximum time to response.
VAR_OUTPUT
B
NamespaceIndex
UINT
Namespace Index.
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: This FB is deprecated and just for backward compatibility – better use UA_NamespaceGetIndexList
UA_NamespaceGetIndex
BOOL
Execute
NamespaceIndex
UINT
DWORD
ConnectionHdl
Done
BOOL
STRING
NamespaceUri
Busy
BOOL
TIME
Timeout
Error
BOOL
ErrorID
DWORD
10.2 UA_TranslatePath
FB-Name
UA_TranslatePath
This Function Block is used to get the node parameters of a node using path of the node.
VAR_INPUT
B
Execute
BOOL
FB performs its task on rising edge on this input.
B
ConnectionHdl
DWORD
Connection handle.
B
StartNodeID
STRUCT
See UANodeID. Structure UANodeID with node parameters for starting node.
B
RelativePath
STRING
Path of the Target node; BNF of RelativePath is defined in OPC 10000-4.
B
Timeout
TIME
Time to response.
VAR_OUTPUT
B
TargetNodeID
STRUCT
See UANodeID. Structure UANodeID with node parameters. For target node mentioned by RelativePath at the input of this FB.
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: This FB is deprecated and just for backward compatibility – better use UA_TranslatePathList
UA_TranslatePath
BOOL
Execute
TargetNodeID
STRUCT
DWORD
ConnectionHdl
Done
BOOL
STRUCT
StartNodeID
Busy
BOOL
STRING
RelativePath
Error
BOOL
TIME
Timeout
ErrorID
DWORD
10.3 UA_NodeGetHandle
FB-Name
UA_NodeGetHandle
This Function Block is used to get the node handle.
VAR_INPUT
B
Execute
BOOL
FB performs its task on rising edge on this input.
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: The NodeHdl is a reference to the internal management object for the node in the client. But the client shall also register the node at the server (“RegisterNode”). This enables the OPC UA Server to optimize the communication.
The scope of the NodeHdl is the connection. So a NodeHdl is unique for a connection but could be equal to a NodeHdl of another connection. This FB is deprecated and just for backward compatibility – better use UA_NodeGetHandleList
UA_NodeGetHandle
BOOL
Execute
NodeHdl
DWORD
DWORD
ConnectionHdl
Done
BOOL
STRUCT
NodeID
Busy
BOOL
TIME
Timeout
Error
BOOL
ErrorID
DWORD
10.4 UA_NodeReleaseHandle
FB-Name
UA_NodeReleaseHandle
This Function Block is used to release the node handle.
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 to be released.
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: After calling UA_NodeReleaseHandle the NodeHdl will be invalid.
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: This FB is deprecated and just for backward compatibility – better use UA_NodeGetInformation
UA_NodeGetInfo
BOOL
Execute
NodeInfo
UANodeInfo
DWORD
ConnectionHdl
Done
BOOL
STRUCT
NodeID
Busy
BOOL
TIME
Timeout
Error
BOOL
ErrorID
DWORD
10.6 UA_SubscriptionOperate
FB-Name
UA_SubscriptionOperate
This Function Block is designed to be optionally called -even cyclically- to check if the variables have been published and to check and 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
Published
BOOL
Indicates, that variables have been published since the previous call.
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: This FB is deprecated and just for backward compatibility – better use UA_NodeGetInformation
UA_SubscriptionOperate
BOOL
Execute
Published
BOOL
DWORD
SubscriptionHdl
Done
BOOL
BOOL
PublishingEnable
Busy
BOOL
BYTE
Priority
Error
BOOL
TIME
Timeout
ErrorID
DWORD
TIME
PublishingInterval
PublishingInterval
TIME
10.7 UA_MonitoredItemAdd
FB-Name
UA_MonitoredItemAdd
This Function Block can be used to add handle that values are updated by subscription.
VAR_INPUT
B
Execute
BOOL
On rising edge monitored item will be added to a subscription.
Notes: VAR_IN_OUT: „Variable” 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_MonitoredItemAdd
BOOL
Execute
MonitoredItemHdl
DWORD
DWORD
SubscriptionHdl
Done
BOOL
DWORD
NodeHdl
Busy
BOOL
DWORD
NodeAddInfo
Error
BOOL
TIME
Timeout
ErrorID
DWORD
Vendor specific
Variable
Variable
Vendor specific
STRUCT
MonitoringSetting
MonitoringSetting
STRUCT
10.8 UA_MonitoredItemRemove
FB-Name
UA_MonitoredItemRemove
This Function Block can be used to remove a handle from a subscription.
VAR_INPUT
B
Execute
BOOL
On rising edge node information will be read.
B
MonitoredItemHdl
DWORD
Monitored item 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_MonitoredItemRemove
BOOL
Execute
Done
BOOL
DWORD
MonitoredItemHdl
Busy
BOOL
TIME
Timeout
Error
BOOL
ErrorID
DWORD
10.9 UA_MonitoredItemOperate
FB-Name
UA_MonitoredItemOperate
This Function Block is designed to be optionally called to check and modify monitored item parameters.
VAR_INPUT
B
Execute
BOOL
On rising edge node information will be read.
B
MonitoredItemHdl
DWORD
Monitored item handle.
B
Timeout
TIME
Time to response.
VAR_OUTPUT
B
ValueChanged
BOOL
Indicates that the value of the monitored item has been changed.
B
TimeStamp
DT
TimeStamp
B
RemainingValueCount
UINT
Number of remaining value changes available for processing This parameter is for diagnostic purpose and relates to the que size: High numbers indicate that the system is overloaded and should result in reducing the sample rate to faster process incoming MonitoredItems.
B
Done
BOOL
FB has completed its task.
B
Busy
BOOL
The FB is not finished and new output values are to be expected.
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
TimeStamp
DT
TimeStamp.
This parameter is optional. If not existing the internal client implementation shall not ask for any timestamp from server side.
VAR_IN_OUT
B
Variable
Vendor specific
Vendor specific
Notes: Vendors can handle “Variable” 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: “Variable” 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 “Variable” and the firmware client just provide the blob (UA memory layout – so called “raw data”) into that byte array.
“Variable” could be the name of the variable so the internal firmware can get address, length, data type of variable.
This FB is deprecated and just for backward compatibility – better use UA_ReadList
UA_Read
BOOL
Execute
Done
BOOL
DWORD
ConnectionHdl
Busy
BOOL
DWORD
NodeHdl
Error
BOOL
STRUCT
NodeAddInfo
ErrorID
DWORD
TIME
Timeout
TimeStamp
DT
Vendor specific
Variable
Variable
Vendor specific
10.11 UA_Write
FB-Name
UA_Write
This Function Block is used to write a value to a single node.
VAR_INPUT
B
Execute
BOOL
On rising edge node information will be written.
B
ConnectionHdl
DWORD
Connection handle.
B
NodeHdl
DWORD
Node handle.
B
NodeAddInfo
STRUCT
See UANodeAdditionalInfo. Specifies the attribute and IndexRange. 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.
VAR_IN_OUT
B
Variable
Vendor specific
To be defined by vendor.
Notes: Vendors can handle “Variable” 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: “Variable” 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 “Variable” and the firmware client just provide the blob (UA memory layout – so called “raw data”) into that byte array.
“Variable” could be the name of the variable so the internal firmware can get address, length, data type of variable.
This FB is deprecated and just for backward compatibility – better use UA_WriteList
UA_Write
BOOL
Execute
Done
BOOL
DWORD
ConnectionHdl
Busy
BOOL
DWORD
NodeHdl
Error
BOOL
STRUCT
NodeAddInfo
ErrorID
DWORD
TIME
Timeout
Vendor specific
Variable
Variable
Vendor specific
10.12 UA_MethodGetHandle
FB-Name
UA_MethodGetHandle
This Function Block is used to get the method handle for a method call.
VAR_INPUT
B
Execute
BOOL
FB performs its task on rising edge on this input.