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
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: PLC to PLC Communication using S7 Connection PUT & GET Instructions
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
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > PLC to PLC Communication using S7 Connection PUT & GET Instructions

PLC to PLC Communication using S7 Connection PUT & GET Instructions

In TIA Portal, we can establish communication between PLC to PLC using S7 Connection and PUT & GET instructions.

Last updated: May 19, 2021 8:02 pm
Editorial Staff
PLC Tutorials
1 Comment
Share
7 Min Read
SHARE

In the field of Industrial Automation, communication between active & passive devices is the most crucial task.

Contents
InstructionsPUTGET InstructionPLC to PLC Communication using S7 Connection Configuration StepsPros & ConsConclusion

The communication occurs through various mediums such as Profibus, Profinet / Ethernet, Modbus RTU, and Modbus TCP, etc. Along with these mediums, the device must have standard communication protocol support to establish the connection.

In TIA Portal, we can establish communication between two CPUs using S7 Connection via Profinet and Industrial Ethernet.

Instructions

The following instructions are used for S7 Communication.

  • GET
  • PUT

Using the above instructions we can establish communication between S7 1500 and S7 1200 CPUs.

PUT

The PUT instruction sends the data to the Partner CPU.

PUT Instruction

Input Pins

EN – The instruction shall be enabled only if this pin is healthy.

REQ – The instruction sends the data to Partner CPU on the Positive Pulse applied to this pin.

ID – This is the hardwired ID created automatically when we create PUT instruction.

ADDR_1 – The pin contains the address of Partner CPU, where data needs to be sent.

SD_1 – The pin contains the address of the Local CPU i.e. the data to be sent to Partner CPU.

GET Instruction

The GET instruction gets the data from the Partner CPU.

GET Instruction

Input Pins

EN – The instruction shall be enabled only if this pin is healthy.

REQ – The instruction sends the data to Partner CPU on the Positive Pulse applied to this pin.

ID – This is the hardwired ID created automatically when we create PUT instruction.

ADDR_1 – The pin contains the address of the Local CPU, where data needs to be sent.

RD_1 – The pin contains the address of the Local CPU i.e. the data to be sent to Partner CPU.

The output pins for both the instructions are same.

Output Pins

ENO – Enable Output Pin

DONE – This pin indicates data transfer is done.

ERROR – This pin indicates a data transfer error.

STATUS – This pin indicates data transfer success / failure status.

PLC to PLC Communication using S7 Connection Configuration Steps

The S7 connection is a single-sided connection i.e. we can write the instruction in any one PLC to get or put data to another PLC.

We will test the PUT instruction in this example. On a similar front GET instruction is executed.

Step 1:

TIA Portal Hardware Configuration.

  • Drag two PLC’s (PLC_A & PLC_B) into the hardware configuration window and select S7 Connection. Connect the PLCs using Profinet ports.
  • We can select any type of PLC in the S7-1200 & S7-1500 series.
S7 Connection Setup

Step 2:

Permit Access to PLCs for PUT / GET Communication.

  • Check the box as shown in the figure for permitting PLC PUT / GET Communication.
  • Select Core of PLC -> Properties -> General ->Protection & Security -> Connection mechanism
PLC Permit Access

Step 3:

Call the PUT Instruction into ‘OB1’ of Local PLC and Set the Properties.

  • We consider PLC_A as Source / Local PLC & PLC_B as Destination / Partner PLC. Hence, we have called PUT Instruction in OB1 of PLC_A.
  • We have called PUT Instruction in Main Program Cycle ‘OB1’ of PLC_A.
PUT Instruction to send the data to PLC

Connection Parameters:

Click on the Blue Icon on PUT Instruction.

The screen shall navigate to Configuration Parameters of PUT Instruction.

Select Partner CPU as PLC_B, other parameters shall be automatically selected.

Siemens S7 Connection Parameter Selection

Block Parameters:

The block parameters are the same explained in the pin diagram above.

Tag_2 (M0.0) is data send request input.

Q0.0 is the address of PLC_B over which data shall be sent.

I0.0 is the address of PLC_A from which data shall be sent to PLC_B.

Siemens S7 Block Parameter Selection
  • The output block parameter selection is shown in the figure.
  • Tag_4 shall indicate data transfer action done.
  • Tag_5 shall indicate if any error occurs in data transfer.
  • Tag_7 shall indicate data transfer status.
  • We can use a separate DB address for mapping these outputs.
PUT SFB

Step 4:

Start Simulation for both PLC_A & B and download the codes.

Start Simulation of PLC A
Start Simulation of PLC B

Step 5:

Testing using Watch Table for both PLC A & PLC B.

We have created separate watch tables for PLC_A & B. I0.0 is the source address in PLC_A and Q0.0 is the destination address in PLC_B.

  • In PLC_A watch table, force ‘FALSE’ value into I0.0 address.
Watch and Force Tables
  • In PLC_B watch table, the value of Q0.0 shall be ‘FALSE’.
PLC B Watch Table
  • In PLC_A watch table, force ‘TRUE’ value into I0.0 address.
PLC A Watch Table
  • In PLC_B watch table, the value of Q0.0 shall be ‘TRUE’.
S7 Watch Table

Pros & Cons

It is very easy to establish. However, once communication is established it has no control or watch over data exchange.

It is not a secure method of data exchange as the PLC is available to any devices present over the network.

We can share very less amount of data using this type of communication.

The data blocks (DB’s) with quantized / symbolic addressing type doesn’t support this method of data communication. 

Conclusion

We studied one of the methods to establish communication between PLCs using PUT & GET Instruction in S7 Connection. It is very easy to establish and should be used over secure networks. The medium used is Profinet / Industrial Ethernet. We exercised PUT instruction to send data from PLC_A to PLC_B.

Author: NMG

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

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

Read Next:

  • Proportional Controller in PLC
  • Basics of Motion Controllers
  • Siemens S7 1200 PLC configuration
  • Siemens S7 300 CPU Status and LED Errors
  • Instrumentation System Architecture
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 Batch System for 4 Tanks Mixing using CX-Programmer
Ladder Logic MCQ Questions and Answers
Interconnection between PLC, MCC, LCP & Pumps – Video
Use of Regions in SCL Language
Troubleshoot Allen Bradley PLC Logic
Normally-open and Normally-closed Switch Contacts
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
1 Comment
  • Subbu says:
    May 20, 2021 at 10:33 am

    This is very good PLC tutorial. Thnx

    Reply

Leave a Reply Cancel reply

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

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
208kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

#15 PLC Best Practices – Safe State when PLC Restarts
PLC Program for Two Way Switch Logic
Automatic Packing of Bottles Programming
PLC Input Output Modules
Procedure for Siemens S7-300 Download from PC to PLC
How to do Force in GE PLC Proficy Machine Edition?
PLC Memory Organization – Data Files and Program Files
How to Start Writing SCL Language in Siemens Tia Portal?

Keep Learning

0 to 10 mA Current Loop

What is Live Zero in 4-20 mA Current Loop ?

Database in Siemens PLC

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

Concept of DCS in Industrial Automation

Concept of DCS in Industrial Automation

Structured Text Selector Machine Logic

Write a PLC Program for Selector Machine using Structured Text

Top Free PLC Software

Top Free PLC Software

ICS System Design

ICS System Design Considerations

Single Phase Preventer Relay

Working Principle of Single Phase Preventer Relay

PLC Programming Course Online Free

PLC Programming Course Online Free

Learn More

Siemens TIA Portal program blocks

Tia Portal – Optimized and Standard Data Block Access

Programmable Logic Controller (PLC) Questions and Answers – 9

PLC Control for Baking Machines Logic

PLC Programming for Baking with Auto and Manual Modes

4-20mA Image

4-20mA Graphical Calculations

Industrial Automation Components

Industrial Automation Components Questions and Answers

Electrical Conduit

What is Electrical Conduit? Types, Advantages, Disadvantages

Things to Take Care of When Designing SCADA System

Things to Take Care of When Designing SCADA System

Chemical Dosing Control System

Introduction to Chemical Dosing System

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?