OPCUA integration with SIEMENS TIA Portal + PLCSIM Advanced


The content on this page is still under construction.

This chapter explains the steps to create PLC tags and enable OPCUA communication between the Simumatik Gateway and PLCSIM Advanced. This will allow you to run the code programed in TIA Portal against a Simumatik system.

Versions of the programs are: - TIA Portal V16.0 - PLCSIM Advanced V3.0


Make sure the choosen PLC is compatible with OPCUA

In this example the data that will be transfered is:

  • 'inputs': A PLC input byte addressed to %IB10.
  • 'outputs': A PLC output byte addressed to %QB6.

The PLC chosen for this example is:

  • Short designation: CPU 1512C-1 PN
  • Article number: 6ES7 512-1CK00-0AB0
  • Firmware version: V2.8

TIA Portal Project

Create a project in TIA Portal and configure the hardware.

Tag declaration

Open the tag table and declare the variables 'inputs' and 'outputs' in the corresponding addresses. Then, individual signals can be declared to be used in the program, each one properly mapped according to the connections in the model:

alt text

Hardware configuration

Some configuration needs to be done in TIA Portal in order to enable OPCUA features. In the project tree, right click on the title of the project, and select “properties”.

alt text

In the “Protection” tab of the pop-up window, enable the option “Support simulation during block compilation”

alt text

IO communication (optional)

In order to achieve a better response from the changes in the inputs and outputs you can change the following parameters:

PLC / Properties / OPC UA / Server / Options / Subscriptions

  • Minimum sampling interval: 100 ms.
  • Minimum publishing interval: 500 ms.

alt text

PLC / Properties / Profinet interface / Advanced options / Real time settings / IO communication

  • Send clock: 0.5 ms

alt text