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
BExecuteBOOLOn rising edge monitored item will be added to a subscription.
BSubscriptionHdlDWORDSubscription handle.
BNodeHdlDWORDNode handle.
BNodeAddInfoDWORDSee UANodeAdditionalInfo. Specifies the attribute and IndexRange.
BTimeoutTIMETime to response.
VAR_OUTPUT
BMonitoredItemHdlDWORDMonitored item handle.
BDoneBOOLFB has completed its task.
BBusyBOOLThe FB is not finished and new output values are to be expected.
BErrorBOOLSignals that an error has occurred within the FB.
BErrorIDDWORDError code.
VAR_IN_OUT
BVariableVendor specificTo be defined by vendor.
BMonitoringSettingsSTRUCTSee 9.1 UAMonitoredSettings (phased out structured data types)

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
BOOLExecuteMonitoredItemHdlDWORD
DWORDSubscriptionHdl DoneBOOL
DWORDNodeHdlBusyBOOL
DWORDNodeAddInfoErrorBOOL
TIMETimeoutErrorIDDWORD
Vendor specificVariableVariableVendor specific
STRUCTMonitoringSettingMonitoringSettingSTRUCT