By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: Transferring Data Across PLC Systems – TSEND_C and TRCV_C
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Ask
  • Courses
  • Videos
  • Q & A
  • EE
  • Measure
  • Control
  • More
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Transferring Data Across PLC Systems – TSEND_C and TRCV_C
PLC Tutorials

Transferring Data Across PLC Systems – TSEND_C and TRCV_C

Mahmoud Salama
Last updated: February 2, 2024 11:43 am
Mahmoud Salama
Share
10 Min Read
SHARE

In the last articles, we discussed how to establish a connection between two PLCs using the TCON and TDISCON blocks and how to move data between them using the TSEND and TRCV blocks.

Contents
Transferring Data Across PLC SystemsTSEND_CTRCV_CUsing TSEND_C and TRCV_C in our PLC projectPLC Project Simulation

Transferring Data Across PLC Systems

In this article, we will learn a new instruction that can be used to communicate and transferring data across PLC systems using TSEND_C and TRCV_C blocks.

TSEND_C

The TSEND_C instruction is a TIA Portal instruction that is used to set up and establish a connection between two PLCs. Once the connection has been set up and established, it will be automatically maintained and monitored by the PLC.

The TSEND_C instruction is executed asynchronously and has the following functions:

  • Setting up and establishing a communication connection similar to TCON block.
  • Sending data via an existing communication connection similar to TSEND block.
  • Terminating or resetting the communication connection similar to TDISCON.

Hence, the name compact is giving to the TSEND_C as it acts as more than 3 blocks in the same time.

TRCV_C

The TRCV_C instruction is also a TIA Portal instruction that is used to set up and establish a connection between two PLCs. Once the connection has been set up and established, it will be automatically maintained and monitored by the PLC.

The “TRCV_C” instruction is executed asynchronously and implements the following functions in sequence:

  • Setting up and establishing a communication connection similar to TCON.
  • Receiving data via an existing communication connection similar to TRCV.
  • Terminating or resetting the communication connection similar to TDISCON.

Hence, the name compact is given to the TRCV_C as it acts as more than 3 blocks at the same time.

Using TSEND_C and TRCV_C in our PLC project

In the last article, when we needed to establish and move to send data from PLC_1 into PLC_2 we had to use three different blocks in each PLC. See picture 1.

Transferring Data Across PLC Systems

picture 1. Logic inside PLC_1

As you can see, we used the TCON and TDISCON blocks to establish and reset the connection and we used TSEND to send the data from PLC_1. And the same was done for the PLC_2. See picture 2.

TSEND_C and TRCV_C Blocks

picture 2. Logic of PLC_2

Again, we used the TCON and TDISCON blocks to establish and reset the connection and we used TRCV to receive the data from PLC_1. 

Now, we want to replace all these blocks and try to use the TSEND_C and TRCV_C instead to achieve the same functionality.

First, in PLC_1 where we need to send data, we will use the TSEND_C block, just drag and drop the block inside the main OB1. See picture 3.

S7-1200 data transfer

picture 3. Add TSEND_C block.

As the TSEND_C is essentially a function block, you will be asked to create a data instance. See picture 4.

Open User Communication in Siemens TIA Portal PLC

picture 4. Create an instance for the TSEND_C

The TSEND_C looks similar to the TSEND block in the sense that you need to make some configurations and add some signals. See picture 5.

PLC to PLC Communication(Handshaking) in Siemens

picture 5. TSEND_C block

Now, we need a signal for the REQ and Data to send and also to configure the connection. For the REQ signal, we created a SendData tag.

Also, we can just drag and drop the data block that we created last article which we need to send it to PLC_2, we can just drag it and drop at the DATA input of the block. See picture 6.

Tia portal question sending data between 2 plc

picture 6. Configuration of TSEND_C block.

To configure the connection parameter for the block, we can press the small configuration icon on top of the block to open the configuration view.

The configuration view will look something very similar to that of the TCON block. See picture 7.

how to Send and receive data between PLC S7-1500 PLC S7-1200

picture 7. Connection parameter of TSEND_C

We already showed how to configure the connection parameter in previous articles, so we can just do the same as we did with the TCON block, see picture 8.

How to transfer the data from one PLC to another PLC

picture 8. Configuration of connection parameter

With this connection configuration, we finished all configurations of the TSEND_C.  Notice how much faster it was compared to configuring TCON, TDISCON, and TSEND blocks.

Now, we need to add the TRCV_C to the PLC_2 so it can receive the data sent from PLC_1.  In the main OB1 of PLC_1 just drag and drop the TRCV_C into your logic. see picture 9. Remember to create a data instance for the TRCV_C block.

sharing the data between two Siemens PLCs

picture 9. Add the TRCV_C

Once the TRCV_C is added to your logic, we need to configure it. As we did with the TSEND_C we need to add a signal to enable the data receive and also we need to add the data block we will save the data inside. See picture 10.

Siemens S7 TCP Connection TSEND_C Tia Portal

picture 10.TRCV_C

We defined a RecieveData tag as the EN_R signal. See picture 11.

Siemens S7 send data to PC Communication S7 with PC

picture 11. Define EN_R tag

Remember to uncheck the “optimized block access” option of the data block or the block won’t work as we showed last articles.

Next, we need to configure the connection parameters of the TRCV_C block, as we did with the TSEND_C just keep in mind that the unspecified Partner PLC is now the PLC_1 see picture 12.

Open User Communication with TSEND_C and TRCV_C

picture 12. Connection parameter of TRCV_C

PLC Project Simulation

Now that we have configured the TSEND_C and TRCV_ C block, we want to simulate our project and see how they will work but first, we will create a simple logic to automatically update the data of PLC_1 which will be sent to PLC_2. See picture 13.

S7-1200 Programmable controller Communication

picture 13. Simple logic to update data automatically.

Now let’s compile and start a simulation for our project.  The first thing you will notice is that PLC_1 and PLC_2 will try to establish a connection right away because we set up the TSEND_C and TRCV_C they automatically try to establish a connection. That is why there will be a connection between the two PLCs. See picture 14.

PLC establishing connection and receiving data

Picture 14. Connection is established directly.

As you can see the connection between the PLCs is directly established, because the CONT parameter in the TSEND_C and TRCV_C is set to TRUE, which means the block will automatically try to establish a connection with the partner PLC. We can put any controlling signal in here to control the connection establishment.

The other thing you can see is that the REQ of the TSEND_C and the EN_R of the TRCV_C are set to FALSE, and that is why there will not be any data moving between the PLCs. See picture 15.

Automating with SIMATIC S7-1200

picture 15. No data transfer between PLCs.

If the REQ signal of the TSEND_C is set to true, the PLC_1 will try to send the data but it will wait for the other PLC to enable the data to be received, see picture 16.

Automating with SIMATIC S7-1500

picture 16. REQ is true.

As you can see the SendData is TRUE, but no data was sent because the RecieveData is still false.

The PLC_2 will only receive data from PLC_1 only when the ReceiveData is set to true. See picture 17.

two-way communication between PLC systems

picture 17. Data is sent to PLC_2

As you can see when the RecieveData is true. Data will be sent from PLC_1 into PLC_2, However, you can see that the data inside the two PLCs are different because the data of PLC_1 changes automatically as per the simple logic we made before. That means the EN_R signal allows the transfer of data one time, when I need to transfer data again this signal has to become false and then true again.

Check out the attached TIA Portal project and see the data transfer between PLCs.

Downloads:

Logic Document

Logic Source Code

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:

  • SCADA Engineer Job Responsibilities
  • How to use PLC with SQL Database?
  • What is a PLC Retrofitting Project?
  • Siemens Communication with I-Device
  • PLC Programming Projects for Beginners
  • Open User Communication in Siemens 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 !
PLC Output Types
What is the Firmware Version of a PLC? – Siemens PLC Hardware
PLC Pneumatic Circuit Control
Tia Portal – OB121 Programming Errors Interrupt Organization Block
#18 PLC Best Practices – Store PLC Hard Stop Events from Faults
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment 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
206kSubscribersSubscribe
38kFollowersFollow

Latest

Top Non-PLC Certification Courses for Automation Professionals
Top Non-PLC Certification Courses for Automation Professionals
Common
Things You Need to Know About DeviceNet
Things You Need to Know About DeviceNet
Communication
Why is IEC 60269 Important
Why is IEC 60269 Important? – Electrical Applications
Standards
NAMUR OPEN ARCHITECTURE
What is NAMUR OPEN ARCHITECTURE?
Control Systems

You Might also Like

Ladder Logic Example with Timers
PLC Tutorials

Ladder Logic Example with Timers

Editorial Staff
Editorial Staff
July 13, 2019
Free Download SCADA Softwares
PLC TutorialsSoftware

Free SCADA Software Download

Editorial Staff
Editorial Staff
June 22, 2017
Automation Engineer Troubleshooting Tips
Control SystemsPLC Tutorials

Best Way to Build Troubleshooting Mindset for Automation Engineer

Hussien Ghareb
Hussien Ghareb
February 22, 2022
Sinking and Sourcing Devices Operation
AnimationPLC Tutorials

PLC Sinking and Sourcing Explanation

Editorial Staff
Editorial Staff
July 25, 2016
Classification of Fuses
PLC Tutorials

Step-by-Step Guide to Choose Right Fuse for a Panel

R Jagan Mohan Rao
R Jagan Mohan Rao
March 31, 2020
Principle of Operation of PLC
PLC Tutorials

Principle of Operation of PLC

Editorial Staff
Editorial Staff
September 11, 2021
//

Inst Tools

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

[mc4wp_form id=”847″]

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?