Skip to content
Tech blog

PLC-PC data exchange without an OPC server: S7 direct or OPC UA?

Does there always have to be an OPC server between the PLC and the PC? No. Here we show when a direct S7 connection is enough and when OPC UA is the better fit.

Content overview

Two ways from the PC to the S7

Today there are two common ways to exchange data between a Siemens S7 and a Windows PC:

Direct S7 connection

The PC addresses the controller over Ethernet using the S7 protocol (ISO-on-TCP according to RFC 1006). There is no server in between that has to be set up or licensed. On the S7-1200 and S7-1500, PUT/GET access must be permitted in the TIA Portal, and the data blocks being read must not be optimised.

OPC UA

The controller provides its data via an OPC UA server, and the PC accesses it as an OPC UA client. The S7-1500 and newer S7-1200 CPUs include this server; it is activated in the TIA Portal and requires a runtime licence from Siemens. The older OPC DA, with a separate OPC server on the PC, hardly plays a role in new projects any more.

How fast a direct connection is

We measured the speed of a direct connection with an S7-1212C. DataSuite read 39 data sets each of 10, 30 and 50 bytes from a data block and wrote each of them to an Excel file.

Chart: time per data set between about 60 and 135 ms for 10, 30 and 50 bytes
Measurement series with an S7-1212C: time per data set including writing to the Excel file

All values are below 150 ms per data set. Most of that time is needed for writing the Excel file. The pure transfer between the S7-1200 and the PC took around 10 to 12 ms; with an S7-1500 under almost ideal conditions we reached transfer times of around 1 ms.

How fast it is in your plant depends mainly on these factors:

  • CPU of the controller
  • Load of the PLC program
  • Network between PC and PLC
  • Performance of the PC
  • Size of the data sets

You can measure the response times of your own controllers with the free PLC Scanner from PLC DataTools.

Get free consulting now

Your questions will be answered in a video call or a telephone conversation with one of our experts. Concrete requirements and projects can be discussed directly.

The appointment booking is done with Microsoft Bookings; Microsoft's privacy policy applies.

Eberhard Hoffmann, Customer service
Eberhard HoffmannCustomer service

Direct S7 connection and OPC UA compared

Direct S7 connectionOPC UA
Speedvery fast, no server in betweenusually somewhat slower
Costsno additional licenceOPC UA runtime licence for the controller
Set-up in the PLCpermit PUT/GET, non-optimised data blocksactivate the OPC UA server; optimised blocks possible
Securityunencryptedencrypted, login with user name and password or certificate
ControllersSiemens S7, including older S7-300 and S7-400international standard, other manufacturers too

You can find out more about OPC UA and how to set it up in the TIA Portal in the article How to use OPC-UA with a Windows client.

Which option suits your project?

A direct S7 connection is a good choice if …

  • data needs to be transferred quickly and at short intervals
  • older controllers without an OPC UA server are to be connected
  • no additional licence costs should arise in the controller

OPC UA is the better choice if …

  • the connection has to be encrypted and require a login
  • optimised data blocks are to be read
  • controllers from other manufacturers are added

Both options in one software

You do not have to make the same decision for every controller. DataSuite works as a Windows client and connects to each controller either directly via “S7 - Put/Get” or via “S7 - OPC UA”; with the “OPC UA” type it reaches any OPC UA server. Once the connection is set up, you work with the data in the same way in both cases: DataSuite writes it to Excel and PDF files, HTML pages or SQL databases.

“Create new PLC” dialogue in DataSuite with the connection types S7 - Put/Get, S7 - OPC UA and OPC UA
Choosing the connection type for a new controller in DataSuite

You can test DataSuite free of charge. The manual with detailed instructions is included in the download.

Further information and help free of charge from our support team:

Phone: +49 2742 72927 80
Email: support@mb-datasuite.com

Conclusion

An OPC server is not a must for PLC-PC data exchange. A direct S7 connection is fast, needs no additional licence and also connects older controllers. OPC UA is the standard when encryption, optimised data blocks or controllers from other manufacturers are required. With DataSuite you can use both options side by side.

Download trial software

Test all functions free of charge for 30 days. You will receive an email with a download link for instant use.

Monitor showing “Download DataSuite 3”