OPC UA communication
9.4 Using the S7-1500 CPU as an OPC UA client
Communication
330
Function Manual, 05/2021, A5E03735815-AJ
Reading and writing PLC tags of the client interface
Example: Reading the "ProductNumber" value
For example, you write in an SCL program:
#MyLocalVariable :=
"Productionline_Data".ReadListProduct.Variable.ProductNumber;
You use this, for example, to assign the number of the blank that was just produced in the
production line to the local tag "#MyLocalVariable".
Requirements:
•
A connection exists to the OPC UA server of the CPU, which controls the production line.
•
The OPC UA client has read the current values.
For this reason you check whether a read value is valid:
•
Check whether the value in "Productionline_Data".ReadListProduct.NodeStatusList[1] is
equal to 0.
•
Optional: Check when this value was sent from the OPC UA server. This value is in
"Productionline_Data".Product.TimeStamps[1]. If no time stamp is requested, the
communication load is reduced.
Example: Writing the "ProductEnabled" value
Transfer the new values for PLC tags, in the example for the "ProductionEnabled" tag, to the
OPC UA server using the data block.
With the following assignment, you enable the production line in the example plant:
"Productionline_Data".WriteListStatus.Variable.ProductionEnabled :=
TRUE;
This is only successful, however, if the following requirements are met:
•
A connection exists to the OPC UA server of the CPU, which controls the production line.
•
Current values are being written via the OPC UA client
Summary of Contents for SIMATIC ET 200AL
Page 2: ......
Page 143: ......
Page 218: ......
Page 250: ......
Page 296: ......
Page 337: ......
Page 365: ......
Page 392: ......
Page 419: ......
Page 451: ......
Page 483: ......
Page 597: ......
Page 648: ......
Page 702: ......
Page 739: ......
Page 781: ......
Page 804: ......
Page 828: ......
Page 853: ......
Page 880: ......
Page 906: ......
Page 996: ...Diagnostics ...
Page 1121: ......
Page 1565: ......