Function Description
The function block UA_SubscriptionCreate is used to create a subscription. The subscription is made to a list of variables. The function block provides callback when a variable value is changed. The publishing interval is defined in this function block.
Representation in FBD

Parameter Description
Name |
Type |
Comment |
---|---|---|
EXECUTE |
BOOL |
FB performs its task on rising edge on this input. |
CONNECTIONHDL |
DWORD |
Connection handle |
PUBLISHINGENABLE |
BOOL |
Activate the publishing. |
PRIORITY |
BYTE |
Priority of the Subscription in the server relative to the other Subscriptions created by this client. See OPC UA Part 4 Chapter 51322 Parameters (Table 86) |
TIMEOUT |
TIME |
Maximum time to response |
Name |
Type |
Comment |
---|---|---|
DONE |
BOOL |
FB has successfully completed its task |
BUSY |
BOOL |
The FB is not finished and new output values are to be expected. |
ERROR |
BOOL |
Signals that an error has occurred within the FB. Set to true is either ErrorID or any of the NodeErrorIDs indicates an error. |
ERRORID |
DWORD |
|
SUBSCRIPTIONHDL |
DWORD |
Subscription handle. |
Name |
Type |
Comment |
---|---|---|
PUBLISHINGINTERVAL |
TIME |
Publishing interval (can be changed by the Server revised publishing interval). |
Runtime Error
Refer to the Appendix for a list of OPC UA detected error codes.