Skip to content

Setting up S7-PLCSIM Advanced

Requirements

  • Siemens Edition or Ultimate Edition
  • TIA Portal V14-V16
  • S7-PLCSIM Advanced V3.0

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 plataform. 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 to control Factory I/O.

Setting up S7-PLCSIM Advanced with TIA Portal

  1. Start by opening the PLCSIM Advanced control panel.

    plcsim advanced control panel

  2. 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.

    plcsim advanced instance name

  3. 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.

    plcsim advanced instance name

Starting TIA Portal and configuring the active instance

  1. Open TIA Portal and create a new project.

    tia portal create project

  2. Select Configure a device.

    tia portal configure device

  3. 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. PLCSIM Advanced compatibility to TIA Portal and to CPU firmware versions can be found in its Function Manual.

    tia portal choose device

  4. 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.

    tia portal i/o modules

  5. In the Project tree right-click on the project's name and choose Properties.

    tia portal project properties

  6. Select the Protection tab in the new window. Check Support simulation during block compilation and click Ok.

    tia portal simulation

  7. Now, right-click on the device's name and select Compile > Hardware and Software (only changes). Next, download changes to the device.

    tia portal compile tia portal download

  8. In the Load Preview window click on Load.

    tia portal load

  9. In the Load results window select Start module in the drop-down list.

    tia portal load2

Connecting Factory I/O to S7-PLCSIM

  1. Open Factory I/O and select File > Drivers.

    factoryio file

  2. Select Siemens S7-PLCSIM in the driver drop-down list.

    factoryio drivers

  3. Click on CONFIGURATION to open the driver's Configuration Panel. Select S7-1500 (S7-PLCSIM Advanced) in the Model drop-down list.

    factoryio plcsim

  4. 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 name displayed on the status bar.

    factoryio connect