OPC UA communication
9.1 What you need to know about OPC UA
Communication
Function Manual, 12/2017, A5E03735815-AF
143
Faster access through registration
The examples up to now use strings as Identifier, for example, "MyBD2"."THIS". If, however,
an Identifier is used as a numeric Node ID instead of a String Node ID, access is much
faster. If you access specific tags regularly, you should use the functions "RegisteredRead"
and "RegisteredWrite":
In this case, your client first logs in the PLC tag on the server., and the server returns an
Identifier that the client uses for the actual access. This Identifier applies solely to the current
session and has to be queried again when the session connection is terminated/lost.
In the following example, the "StartTimer" tag is first registered on the server. Afterwards, the
rapid function "RegisteredWrite" is used for setting the value.
In accordance with the same scheme, the "RegisteredRead" function can also be used,
which is particularly useful for recurring data readouts. Take into account, however, that
depending on the application it may be advisable to use a Subscription instead.
Recommendation: It is best to place registrations in the startup program of the OPC UA
client, since the registration takes up time.
Please note that you can set the maximum number of registered nodes in the properties of
the S7-1500 CPU and that the Clients have to respect this number, see General settings of
the OPC UA server (Page 164).
The term "Subscription" is used for a function in which only those tags for which an OPC UA
client has registered at the OPC UA server are transferred. The OPC UA server only sends a
message to the OPC UA client for these registered tags (Subscriptions) when a value has
changed. The monitoring of these tags makes constant sampling by the OPC UA client
superfluous which reduces the network load.
You have to create a Subscription to use this function. For this purpose, you specify the
"Publishing Interval" at the UA client and click the "Create" button. The "Publishing interval"
is the time interval in which new values are sent to the client.