Setting up S7-PLCSIM Advanced V3.0¶
Requirements
- Siemens Edition or Ultimate Edition
- TIA Portal V14-V18
- S7-PLCSIM Advanced V3.0
Sample Project
Info
Communication between PLCSIM Advanced and TIA Portal can be performed via the Softbus protocol (local communication) or TCP/IP (local or distributed communication). For local communication, the PLCSIM Advanced instance must be on the same PC or on the same virtualization platform. This is the connection used in this tutorial. If TIA Portal is on a PC and PLCSIM Advanced instances are running on a different PC or virtual machine, communication is made via PLCSIM Virtual Ethernet Adapter.
This tutorial gives you step-by-step instructions on how to use Siemens S7-PLCSIM Advanced V3.0 to control Factory I/O.
Setting up S7-PLCSIM Advanced with TIA Portal¶
-
Start by opening the PLCSIM Advanced control panel.
-
Specify the name of the instance. S7-PLCSIM Advanced must be configured with an instance name set to factoryio. In Factory I/O the instance name can be modified by writing drivers.siemens_s7plcsim.instance_name = 'newname' on the console.
-
Click on Start. After a few seconds the active instance can be viewed below. This instance is not yet configured so it cannot be switched to Run mode. This will be done in the next section.
Starting TIA Portal and configuring the active instance¶
-
Open TIA Portal and create a new project.
-
Select Configure a device.
-
Click on Add new device. Within Controllers > SIMATIC S7-1500, select a CPU from this PLC family, for example, S7-1513-1 PN, and click on Add.
Info
The chosen CPU must be on V1.8 or higher, up to V2.8. PLCSIM Advanced compatibility to TIA Portal and to CPU firmware versions can be found in its Function Manual.
-
Add IO modules from the Hardware catalog to the Rail by dragging them. In this tutorial, DI 16x24VDC BA and DQ 16x24VDC/0.5A BA modules were chosen.
-
In the Project tree right-click on the project's name and choose Properties.
-
Select the Protection tab in the new window. Check Support simulation during block compilation and click Ok.
-
Now, right-click on the device's name and select Compile > Hardware and Software (only changes). Next, download changes to the device.
-
In the Load Preview window click on Load.
-
In the Load results window select Start module in the drop-down list.
Connecting Factory I/O to S7-PLCSIM¶
-
Open Factory I/O and select File > Drivers.
-
Select Siemens S7-PLCSIM in the driver drop-down list.
-
Click on CONFIGURATION to open the driver's Configuration Panel. Select S7-1500 (S7-PLCSIM Advanced) in the Model drop-down list.
-
Press Esc to return to the main driver window. Now click on CONNECT to connect to the simulator. A successful connection is indicated by a green icon next to the selected driver, as well as next to the driver's name displayed on the status bar.