Siemens SIMATIC S7-1500 Function Manual page 141

Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

OPC UA communication
9.1 What you need to know about OPC UA
Reading data from the server and writing to the server
You now know the namespace, identifier and data type of PLC tags. This means that you
can now specifically read individual PLC tags and DB components as well as complete
arrays and structures.
You can find examples of the reading of Boolean tags and array data blocks in Addressing
nodes (Page 135).
Rules for access to structures are available here (Page 266).
With the information that you obtain while navigating through the address space of the server
(index, identifier and data type), you can also transfer values to the S7-1500 with the OPC
UA client. The following example overwrites the first three values in the array data block
"MyDB".
For "Array Range" you specify which components of the array you want to overwrite. The
"Good" status code indicates that the values were transferred successfully. However, you
can only write the values to the S7-1500 but not the time stamps of these values. The time
stamps can only be read.
Faster access through registration
Registered Read/Write lends itself to repeated, optimized access to data – with maximum
performance. When tag nodes are registered, the OPC UA server creates a numerical
Identifier (numerical NodeId) that directly references the registered node. For read or write
jobs of the client to this numerical Identifier, the server does not have to resolve any strings
as Identifier and can access the requested tag in an optimized manner.
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.
140
Function Manual, 11/2019, A5E03735815-AH
Communication

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents