Skip to content
English - United States
  • There are no suggestions because the search field is empty.

Setting up S7 Communication Protocol with TIA Portal

Why S7 Communication Protocol

The S7 Communication Protocol has been in use  This guide explains how to set it up through TIA Portal.

Below is a step-by-step guide for setting up S7 communication (sometimes called “S7 protocol” or “S7 native communication”) between Siemens PLCs or between a PLC and a compatible device (e.g., an HMI, SCADA, or a third-party system with S7 protocol support). This is not using OPC UA, but rather the classic S7 protocol for data exchange.


Prerequisites

  1. Siemens PLC (e.g., S7-1200 or S7-1500).
  2. TIA Portal installed (version appropriate for your hardware).
  3. A partner device (another Siemens PLC or a system that supports the S7 protocol).
  4. Network connections (Ethernet cables, correct IP settings, etc.).

Step 1: Create or Open Your TIA Portal Project

  1. Open TIA Portal and create a new project or open an existing one.
  2. Add or ensure you have your PLC (S7-1200 / S7-1500) in the project under Devices & Networks.

Step 2: Configure Network Settings for the PLC

  1. Go to Devices & Networks.
  2. Select your CPU in the network view.
  3. Under PropertiesEthernet Interfaces, set or verify the IP address, Subnet Mask, and Gateway (if needed).
  4. Compile to confirm no errors so far.

Step 3: Set Up the S7 Connection in TIA Portal

There are two main scenarios:

Scenario A: Two (or More) Siemens PLCs in the Same TIA Project

  1. In Devices & Networks (network view), ensure both PLCs are visible.
  2. Click on one PLC, then drag to the other PLC to create a connection, or
    • Right-click → Add new connectionS7 connection.
  3. TIA Portal automatically sets up an S7 connection with a unique name (e.g., Connection_1).
  4. Double-click the connection line (or open the connection in the inspector window) to check or edit details, such as:
    • Connection type: S7
    • Local/Partner IP addresses
    • Rack/Slot if relevant (on some older models)

Scenario B: PLC to a Third-Party S7 Device or SCADA

  1. In Devices & Networks, select your PLC.
  2. Right-click → Add new connectionS7 connection.
  3. In the connection parameters, define:
    • Partner IP address (the third-party device or SCADA).
    • TSAP (if required by the external device).
    • Any needed Rack/Slot settings if the partner is a classic S7-300/400 or an emulated environment.

(Note: If the third-party S7 device is not a TIA Portal device, you must manually enter these parameters.)


Step 4: Enable “Permit Access” (S7-1200 / S7-1500)

If you plan to read/write data directly from an external master using PUT/GET (or a third-party tool), you may need to enable the PLC setting:

  1. In the Project Tree, select your CPU.
  2. Under PropertiesProtection & Security, look for an option like:
    • “Permit access with PUT/GET communication from remote partner.”
  3. Check the box to allow external S7 access (be mindful of the security implications).

(This is specifically relevant if you’re using GET/PUT instructions or external S7 clients to read/write DB data.)


Step 5: Configure Data Blocks for S7 Access

  1. In your PLC ProgramProgram Blocks, locate the Data Block (DB) you want to share.
  2. If you’re using optimized access (the default for S7-1200/1500), ensure that the DB or the variables in it are set to be accessible externally.
    • In the DB’s Properties (usually under Attributes), enable “Accessible from HMI/OPC/GET/PUT” or a similar checkbox.
  3. If you’re using non-optimized (classic) DB access, you can reference the absolute addresses (e.g., DB10.DBW2). Just ensure the DB is configured properly.

(In many modern setups, you simply rely on symbolic access with TIA Portal for both ends. If you need absolute addressing, you must disable “Optimized block access” in the DB’s properties.)


Step 6: Use Communication Instructions (If Needed)

For PUT/GET in Ladder/FBD

  1. Insert the PUT or GET instruction from the Instructions library under Communications in your PLC code.
  2. Specify the Connection ID (matching the S7 connection name from Step 3).
  3. Configure the local data (e.g., the sending/receiving buffer) and the remote data address (e.g., DB number, start address).
  4. Compile and download.

Alternatively, If Using System Instructions or HMI Connections

  • Many HMIs or SCADAs can reference the PLC’s data blocks via S7 protocol automatically, without you explicitly coding PUT/GET.
  • The key is that the connection is established (Step 3), and the data block is accessible (Step 5).

Step 7: Download and Test

  1. Compile your TIA Portal project.
  2. Download the configuration (and program, if you changed it) to the PLC.
  3. Switch the PLC back to RUN mode if needed.
  4. If it’s two PLCs, ensure both are in RUN with the updated configuration.
  5. If it’s a third-party device, configure that device to use the same S7 connection parameters (IP, TSAP, rack/slot, etc.).

Quick Test

  • Two PLCs: Use a watch table or monitor tags to see if data written from PLC 1 is received by PLC 2 (or vice versa).
  • Third-Party: The external device’s logs or diagnostic views should indicate whether it can read/write the specified addresses.

Step 8: Export the Tag Data

First download our S7 data Template

If you want to share the final tag list (e.g., the symbolic names or addresses) with a colleague or a SCADA integrator:

  1. In the Project Tree, locate PLC Tags or Data Blocks.
  2. Right-click the relevant item (tag table, data block, etc.) → Export (as CSV or Excel, depending on TIA Portal version).
  3. Choose the export location on your PC.
  4. (Optional) If you want to share the entire code, you could export the block source or the entire project, but typically a CSV/Excel of the tags is enough for integrators.

Step 9: Send the Exported Tag Data via Email

  1. Open your email client.
  2. Compose a new email to the relevant recipients (e.g., SCADA engineer, PLC programmer colleague).
  3. Attach the exported CSV/Excel file containing the tag list.
  4. (Optional) Include a note about:
    • The S7 connection name or ID.
    • IP addresses used by each device.
    • Any credentials if you’ve secured your PLC.
  5. Send the email.

Quick Reference

  1. Define S7 connection in Devices & Networks.
  2. Enable “Permit PUT/GET” in CPU properties if you’re doing direct reads/writes from external masters.
  3. Ensure DBs are set for external access (if using optimized blocks).
  4. (Optional) Use PUT/GET instructions or rely on HMI/SCADA’s native S7 access.
  5. Compile & Download.
  6. Test the communication with watch tables or third-party client.
  7. Export tags (CSV/Excel) and email them for documentation.

With these steps, you’ll have a fully functional S7 protocol setup in TIA Portal, allowing your PLC to communicate with other Siemens controllers or any compatible S7-protocol device or software.