Siemens SIMATIC S7-1500 Function Manual page 260

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

Advertisement

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
Communication
Function Manual, 11/2019, A5E03735815-AH
9.4 Using the S7-1500 CPU as an OPC UA client
OPC UA communication
259

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents