0% found this document useful (0 votes)
232 views22 pages

OPC-UA - TIA Portal Step by Step Communication Guide

Uploaded by

Fabio Silva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
232 views22 pages

OPC-UA - TIA Portal Step by Step Communication Guide

Uploaded by

Fabio Silva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

2024

OPC UA Server Communication in


Siemens TIA Portal Guide

Sofiane KHELIFI
04/11/2024
‫الر ِح ِيم‬ َّ ‫ِبس ِْم اللَّـ ِه‬
َّ ‫الرحْ َم ٰـ ِن‬
Contents :
1. Introduction
2. Prerequisite
3. Important notes
4. Setting up a new project in TIA Portal
5. Configuring the server interface
6. Setting the IP address for a virtual adapter
7. Configuring PLCSIM Advanced
8. Configuring UA Expert
9. Adding a new UA server
10. Conclusion
11. References & Resources

1
1. Introduction
OPC Unified Architecture (UA) is an open-source communication protocol that
has stood out as a cross-platform protocol in recent years. This is because OPC
UA is now the go-to protocol for industrial control devices, embedded system
devices, and other industrial equipment. It is a reliable mechanism as it offers
better security of plant data and a complete information model than other
traditional protocols. OPC UA has a similar Client-Server structure as Modbus
TCP but it is more versatile and robust than it. This tutorial will teach you how to
configure an S7-1500 PLC as an OPC UA server in TIA Portal.

2. Prerequisite
In order to follow along with this tutorial, you will need:

• A basic understanding of OPC UA protocol. You can look up


our introductory course
• An installation of TIA Portal – Tia portal V16 is being used in
this tutorial
• An installation of PLCSIM Advanced- V4.0 is being used in this
tutorial
• UA Expert (a simulation software that serves as an OPC UA
client)

3. Important notes
OPC UA will not work for S7-1200 PLCs that have below version 4.4
firmware and version 2.5 for S7-1500 PLCs. This is why OPC UA
works best from TIA Portal V16. Also, from TIA V16, the certificate
license for OPC UA has already been included in the software, so
there is no need to purchase a separate license.

Simatic S7-1200 cannot act as an OPC UA client as the capability


isn’t supported. S71500 can act as both

2
4. Setting up a new project in TIA Portal
Let us start by creating a new project

Next, set the ethernet address of the PLC to be 192.168.0.10


by double-clicking on the ethernet port.

3
Activate the OPC UA server from the OPC UA navigation. The server
address should be noted because the OPC UA client device will
connect to the server through this address. The OPC server address
contains the IP address and the port number. In this example, the port
number is 4840.

4
In security navigation, TIA Portal automatically generates the server
certificate for you; this certificate is a basic one and is self-
signed. You can author new self-signed certificates if you wish; you
can do that by clicking on the harbinger icon and generating new
certificates.

There are security policies that help in enhancing data during transmission. To
limit client access to a server, companies can send you their license
information, and you would add them under trusted clients.

Next, create a new data block that will contain the OPC UA data.

5
5. Configuring the server interface
The server interface is used in configuring interfaces for the OPC UA
server. There can be more than one interface configured for a
particular server. This will help in orderly arrangement and simplicity.

6
After creating the interface, on the right-hand side, under OPC UA
elements, you can see the program blocks and plc tags created in your
program, same as technology objects. Navigating to program blocks,
highlight your data block and drag it over to the left-hand side – Under
OPC UA server interface.

6. Setting the IP address for a virtual adapter

On your workstation, assign an IP to the Siemens Ethernet Virtual


adapter in the same IP class as your PLC. This can be accessed from
Network and Internet settings on your Windows machine.

7
7. Configuring PLCSIM Advanced
Open the PLCSIM Advanced 4.0 software and under online access select
PLCSIM Virtual Adapter

8
Now select Start Virtual S7-1500 PLC and configure it as shown in the
image bellow. The IP address is the same as that of the PLC device we
created. Then click on start to begin the simulation.

9
Go over to TIA Portal and head over to the project name under the
project tree and select properties; then, under protection, tick the support
simulation during block compilation. Finally, compile and download the
program into the simulator.

In the extend to download screen, select Siemens PLCSIM Virtual


Adapter as the PG/PC interface then search. After the PLC device is
located load the program.

10
Go online with the PLC and select run in the PLCSIM advanced software.
Finally, Input some data in the OPC data block.

11
8. Configuring UA Expert
UA expert is a complete software package that can serve as an OPC UA
client device for testing for OPC UA. It is robust enough to handle
securities and certificate management. Launch UA expert.

UA Expert has different windows, and their description is given below.


• Project: You can manage multiple server connections and
documents in this window. You can load and save the server
projects.
• Data access View: In this window, the sheet displays values from
UA variables transmitted via the UA publish mechanisms. You can
drop multiple items from different servers onto this sheet.
• Attributes: This window shows the attributes of the selected node.
You can change the selection in the address space window.
• References: This window shows the references of the currently
selected node.
• Address space: This window shows the address space of the
currently selected server.

12
9. Adding a new UA server
Navigate to Server and click on add. A new window pops up that will take
specific parameters. Give a configuration name.

Under custom discovery, double click to add server address. This


address is the OPC UA server we created in TIA Portal. It looks like this
opc.tcp://192.168.0.10:4840. We are using anonymous because there
was no security configured for this certificate in TIA Portal. Select “OK”
when done.

13
If your communication is successful, you will see your device under the
custom delivery navigation.

14
The security is none because we are not currently using any security
feature for the certificate. Navigate to the address space window, and
your server parameters will be shown.

15
Highlight all the data registers and drag them onto the Data Access View
window.

You can see the OPC UA server's values, server name, timestamps, and
status. This is automatically updated as the register values changes.
Apart from just the registered data, other information can be pulled out
from the OPC UA server. Clicking on the PLC name in this example
(PLC_1), you can see the manufacturer name undervalue in the Attribute
window, same as the version of TIA Portal used in programming, the S7
CPU type, etc.

16
17
Other parameters of the UA server are available to the client by
navigating through the various attributes and values.

18
10. Conclusion
OPC UA is a protocol actively used in the industrial
internet of things (IIOT) and industry 4.0 trends due
to its versatility in communicating with different
devices. It is a protocol that manufacturers have
adopted for system integration and connectivity
purposes. More studies should be made in-depth
into the OPC UA protocol as it has come to stay.

19
11. References & Resources:

• © Unified Automation GmbH, OPC UA Servers


https://www.unified-automation.com/downloads/opc-ua-
servers.html

• Siemens Automation Cooperates with Education (SCE) | As of


Version V15.1 SP1 , OPC UA with SIMATIC S7-1500 as OPC
Server and OPC SCOUT and SIMIT as OPC Clients ,
https://www.automation.siemens.com/sce-static/learning-
training-documents/tia-portal/advanced-communication/sce-
092-300-opc-ua-s7-1500-r1807-en.pdf

• SolisPlc https://www.solisplc.com/tutorials/opc-ua-server-
communication-in-siemens-tia-portal

• usa.siemens.com/s7-1200 , S7-1200: Basic Controller with,


Advanced Functions, OPC UA Server
https://www.gothightech.com/resources/labs/S7-
1200%2007%20Integrated%20OPC%20UA%20Server.pdf

All rights not reserved

20
ACKNOWLEDGEMENT
First of all I hope that Allah will make this work a continuous charity for me and for everyone
who shares it, and I hope this article resonates with you and provides value in your own
journeys. May it serve as a source of inspiration, guidance, or perhaps a gentle nudge toward
your own aspirations. Together, we can continue to uplift and empower one another.

Thank you for being part of this incredible journey. I look forward to what lies ahead and to
supporting each of you in your endeavors.

Warm regards,

KHELIFI SOFIANE

Automation Control Engineer

https://www.linkedin.com/in/sofiane-khelifi-8501a01a4

21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy