Siemens TIA and PLCSIM Advanced - User Manual
Siemens TIA and PLCSIM Advanced - User Manual
Siemens TIA and PLCSIM Advanced - User Manual
PLCSIM Advanced
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.
Warning
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”.
In the “Protection” tab of the pop-up window, enable the option “Support simulation during block compilation”
PLC Properties
In the project tree, right click on the PLC, and select “Properties”
In the structure on the left, you can find the I/O modules added previously, click on I/O addresses for each module and set
the process image of inputs and outputs to none in both modules. Thus, you have to set “none” in 4 different squares.
Remember to do this in every I/O module you have in the PLC.
In the “General” tab of the pop-up window, choose “OPC UA” in the structure on the left and enable the option “Activate OPC
UA server”.
In the structure on the left, scroll down until the end where you will find the “Runtime licenses” tab, click on “OPC UA” and
select the type of purchased license as “Medium”.
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 Hardware
The PLC built in Simumatik OEP has an I/O module of 1 byte (0-7) for the inputs called “inputs” and an I/O module of 1 byte
(0-7) for the outputs called “outputs”. In the “port” tab is shown the addresses of the inputs and outputs. For example in
this system, the sensor 2 is in the bit 1 of the inputs module.
Thus, in the “device configuration” tab, 2 I/O modules should be added to the PLC, one for the inputs and the other for the
outputs as it is shown in the pictures below.
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:
The addresses of I/O list must be equal in the hardware (I/O modules)
Create an instance
First, you have to know the IP of your PLC in TIA Portal, go to the PLC properties panel and click on “Ethernet addresses”
and there you have all the data needed. In our case the IP address is 192.168.0.1 and the subnet mask 255.255.255.0
Note
The IP Address can be different from this, the important thing is that this IP Address is the same in the PLC in TIA Portal and
the IP Address in PLCSIM Advanced.
PLCSIM Virtual Eth. Adapter. If you can´t do it, NPF may have to be started on the command line. Open Command
Prompt as administrator and write “net start npf”.
IP Address: the same IP you have in the PLC in TIA Portal, in our case is 192.168.0.1
PLC type: The type of your PLC, in our case is CPU 1500
CLICK START
An appropriate IP address must be assigned to that virtual Ethernet adapter. To do som, click on the Windows symbol and
go to “settings” and click on “Network & Internet”
Next, click on “Network and Sharing Center”
Select the PLC and compile its program, as shown below in the icon “1”.
Now, the project will be transferred (not simulated) to the PLC (using the “2” icon, next to the previous). In the pop-up
window shown below, select “Siemens PLCSIM Virtual Ethernet Adapter” and start search. Select the PLC and load the
program.
After this, a green light will be activated in PLCSIM Advanced.
Once the simulation is finished, PLCSIM Advanced will be closed by following these steps:
1. “Turn off” the instance, acting on the button “1” shown below, then the light will switch to grey.
Otherwise, the IP address of the instance will remain registered and can give problems in future simulations with other
addresses.
Once the server is created and started, enter to the workspace by clicking on the right button.
Click on the button “1” shown below to show the panels, and now you can add either a public system created by other
users or create your own systems by clicking in button “2”. For this guide, the “turning conveyor” will be used.
Wait until the system is loaded, a pop-up window will be displayed in the right corner.
In order to see the different assemblies and group of the system you have to click over the system name in the workspace,
see the arrow “1”.
Now you have access to the PLC by clicking over the name. Next step is to write the IP address of the PLC in TIA Portal and
PLCSIM Advanced instead of “localhost” in the PLC of Simumatik.
A window on the right will appear and click on the gateway button and the slide at the right to activate the gateway.
Now everything is properly connected, and you just have to click on the “play” button and enjoy Simumatik OEP.