Setting up S7-1200/1500

Requirements

  • Siemens Edition or Ultimate Edition
  • S7-1200/1500 PLC
  • TIA Portal

This tutorial gives you step-by-step instructions on how to use a Siemens S7-1200/1500 PLC to control FACTORY I/O. Although the following instructions refer to an S7-1200 model, the same steps apply to the 1500.

Setting up communication between PC and PLC

  1. Connect the PLC to the network.

  2. Create a new project in TIA Portal.

    new project

  3. Select Configure a device.

    configure device

  4. Click on Add new device. From the controllers tree expand SIMATIC S7-1200 > CPU > Unspecified CPU 1200, select the CPU under it and click on Add.

    add device

  5. You are now on TIA Portal's Project View. Click on detect to automatically detect the PLC from a list of available devices on the network.

    detect device

  6. Choose PN/IE as the type of PG/PC interface and on PG/PC interface select the network adapter that you are using to connect to the PLC.

    set interface

  7. When scanning completes, select the PLC from the list of compatible devices. Next, click on Detect.

    select device

    If you are adding a PLC that is not in the same subnet as your computer, you will be prompted about assigning a new IP address to the network interface; click on Yes.

    Later you may have to change the PLC's IP address to one in the same subnet as your computer, otherwise FACTORY I/O might not be able to connect to it.

  8. The detected PLC is now on the Device view. Some of its properties need to be tweaked to allow communication with FACTORY I/O. Double Left-click on the controller to open the Properties panel.

    click to open properties

  9. Start by assigning the PLC an IP address. On the General tab of the Properties page expand PROFINET interface and select Ethernet addresses.

    assign ip address

    If you were prompted about assigning a new IP address to the network interface, you should now assign an IP address to the PLC that is in the same subnet as your computer.

  10. PLC physical inputs use by default the first memory addresses of %I. For FACTORY I/O to be able to write sensors values to %I you must offset the input addresses, we recommend an offset of 10. Click on I/O addresses and change the Input addresses > Start address to 10.

    offset input addresses

    FACTORY I/O should not use input addresses that are assigned to physical inputs

    Otherwise, the values written by FACTORY I/O will be overwritten as the state of physical inputs is copied to I memory.

  11. Finally, you must give full access to the PLC memory. Click on Protection and select Full access (no protection). Also, under Connection mechanisms check Permit access with PUT/GET communication from remote partner.

    disable protection

    For PLCs with firmware lower than V4.0, the correct protection settings are:

    disable protection

  12. Right-click on the device and select Download to device > Hardware configuration. Next, Start the CPU.

    download to device

    start device

Connecting FACTORY I/O to the PLC

  1. In FACTORY I/O click on FILE > Driver Configuration to open the Driver Window.

    open driver window

  2. Select Siemens S7-1200/1500 on the driver drop-down list.

    select s7-1200/1500 driver

  3. Open the driver Configuration Panel by clicking on CONFIGURATION.

  4. Make sure S7-1200 is selected on the Model drop-down list and insert the PLC's IP address into the Host field.

    driver config

  5. Press Esc to return to the main driver window. Now click on CONNECT to connect to the PLC. 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.

    driver connected