Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Steps to Configure TCP/IP Communication in Siemens S7-1200 PLC
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Steps to Configure TCP/IP Communication in Siemens S7-1200 PLC

Steps to Configure TCP/IP Communication in Siemens S7-1200 PLC

Learn the steps to configure the TCP/IP communication in Siemens S7-1200 PLC using TCON, TSEND, and TRCV instructions.

Last updated: September 28, 2022 2:18 pm
Greesh Maheshwari
PLC Tutorials
No Comments
Share
5 Min Read
SHARE

In terms of the famous OSI Model (Open Systems Interconnection Model). TCP/IP is a transport-layer protocol.

Contents
TCP/IP CommunicationSteps to configure TCP/IP Communication in Siemens S7-1200 PLC.TCP Server ConfigurationTCP Client ConfigurationNetwork 1: Start ConnectionNetwork 2: Send String DataNetwork 3: Receive String DataAdvantagesDisadvantagesApplication Examples

TCP/IP stands for Transmission Control Protocol/ Internet Protocol

TCP/IP protocol is one of the Layer using which data can be transmitted between 2 Physical devices in an Industrial Network.

TCP/IP Communication

It is the most basic layer in TCP communication which works in the backend of any famous communication protocol namely Profinet, Modbus TCP/IP, etc.

TCP IP Model
TCP/IP Model

Sometimes it is really a headache when different third-party devices need to communicate with each other and they don’t support any common protocols in between them then this protocol holds to be very helpful.

It can be configured in the following method.

One device acts as a TCP Client and the other device acts as TCP Server.

AT First TCP server opens a single socket port and behaves as a passive device and now this device is ready to share data once the communication handshake is done.

TCP Client requires the following data of the TCP server IP address and Port Number to initiate the connection request. Hence, the client acts as an Active device.

Steps to configure TCP/IP Communication in Siemens S7-1200 PLC.

I have used Hercules software as TCP server and PLC as TCP Client

TCP Server Configuration

I have opened port 4660 for communication and my Laptop’s IP address is 192.168.0.53. With this server-side configuration is finished.

TCP Server Configuration

TCP Client Configuration

Make a new DB with the following settings. A DB is a database of Siemens PLC. You can store any sort of data and use it in your program if it is required.

  • Interface id: Hardware ID is of Siemens PLC Ethernet port can be found in the hardware setting.
  • ID: Connection ID
  • Connection Type: 11 = TCP/IP
  • Active Established = True [As PLC is TCP Client]
  • Remote Address = IP address on Server in my case laptop’s IP address.
  • Remote Port = Port of Server

I have taken 2 string data types.

Send_Data String is to send the data to Hercules.

Rcv_Data String is to receive the data from Hercules.

Database in Siemens PLC

Network 1: Start Connection

To initiate the connection TCON Block is used which will establish the connection.

This block does the necessary handshaking with another device, which is required as per transport layer architecture.

TCON instruction in Siemens PLC
Transport layer connection mechanism
Figure: Transport layer connection mechanism

Network 2: Send String Data

To send data to the server. TSEND Block is used.

Write values on the DB address “TCP”.SEND_DATA and then Set the value of bit address M2.1 [Send_Data] = True to trigger the message.

Use Same ID as TCON.

TSEND instruction in Siemens PLC

Network 3: Receive String Data

To Receive data TRCV block is used. Enable bit address M2.2 [Recv_Data].

It will be in listening mode whenever new data arrives it will be displayed on the DB address “TCP”.RCV_DATA.

Use Same ID as TCON.

TRCV instruction in Siemens PLC

Advantages

It is an open protocol, unlike profinet which is proprietary.

Many IT professionals don’t have knowledge about industrial software so it is easy if we want to develop a general application that uses PLCs data.

Disadvantages

It is sometimes complex to learn for beginners. As it requires a proper understanding of the fundamentals of the OSI layer.

Application Examples

This protocol can be used to send data from PLC to IT Software such as

  • Recipe Management
  • Reporting Apps
  • Data Logging to SQL

EndNote

Understanding this protocol clears your fundamentals about Modern Communication protocols. Good Luck!

If you liked this article, then please subscribe to our YouTube Channel for Electrical, Electronics, Instrumentation, PLC, and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • Types of Schneider PLC
  • Site Acceptance Test of PLC
  • FIFO Block in Siemens TIA Portal
  • Configure PID in Siemens PLC
  • How to Create DFB in Schneider PLC
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

PLC Program for Star Delta Starter using Functional Block Diagram
How to Use ModScan Software for Testing Modbus Communication?
Overview of Industrial Control Systems
Timer in Studio 5000 – TON, TOF, RTO
Difference Between Industrial Computer (IPC) and Normal Computer (PC)
Configuration of Siemens VFD Using TIA Portal Start drive
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

STAR DELTA Programming using PLC Controller
FC Function in Siemens PLC
PLC Program – Controls Conveyors ON and OFF Sequence
How to choose between PLC and DCS Systems ?
PLC Program to Control Gas Pressure using Closed-Loop
How to Convert Current to Voltage using Resistor ?
What is Multi-touch Technology? – Industrial Automation
How Modbus is used in Industrial Networks?

Keep Learning

Organization block Siemens

Tia Portal – OB30 Cyclic Interrupt Organization Block

Functional block diagram for analog alarms

PLC Logic for Analog Alarms using Functional Block Diagram

In this article, we will learn the difference between Machine Expert Basic and Machine Expert software in Schneider PLC.

Difference between Machine Expert Basic and Machine Expert – Schneider PLC

How to Select the Right Encoder for Your Machine

How to Select the Right Encoder for Your Machine?

PLC Motor Control Circuit-3

Basics of PLC Programming

Thin Client in SCADA

What is Thin Client in SCADA? – Purpose, Advantages

Best PLC for Your Project

Finding the Best PLC for Your Project – Tips and Tricks

Automatic Car Door Simulation

Automatic Door Operation PLC Programming and Simulation

Learn More

proximitor module

Bently Nevada Vibration System Verification Procedure

Measurement of Impedance Objective Questions

Measurement of Impedance Objective Questions

Power Electronics objective questions and answers

30 Important Power Electronics MCQ

Electrical Conductivity Meter

What is the Application of Electrical Conductivity Meter?

Top 200 Electrical Engineers Objective Questions and Answers

Top 200 Electrical Engineers Objective Questions and Answers

Emerson ASCO Solenoid valve references

SIS Solenoid Valves – Safety PLC

Upgrading and Migration of PLC Systems

Upgrading and Migration of PLC Systems

Steam flow to the heat exchanger

Analytical Process Control Question

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?