Case Program | MODBUS TCP Communication in Open Communication

Click the blue text above to follow us for more content

Control Requirements: Use MODBUS TCP communication for data exchange between two PLCs

1. Read data from the server addresses 40001~40005 and store it in VW200~VW208;

2. Write data from VW210~VW218 into the server’s 40006~40010;

3. Write data from VB220 into 00001~00008.

1. Open the software to write the client program

Case Program | MODBUS TCP Communication in Open Communication

Case Program | MODBUS TCP Communication in Open Communication

2. Write the server program

Case Program | MODBUS TCP Communication in Open Communication

3. If you do not have two PLCs, you can use the MODBUS Debug Assistant. The specific operations are as follows:

Open the Modsim debugging software, establish a connection, fill in the client number consistent with the program, the debugging assistant acts as a server to communicate with the PLC client. However, one point to note is thatwhen using the debugging assistant, the server’s IP address must be set to the computer’s IP address;

Case Program | MODBUS TCP Communication in Open Communication

Create a new data monitoring screen, you need to fill in Device ld, which can be found in the symbol table of the client program as mModbusUnitID;

Case Program | MODBUS TCP Communication in Open Communication

1. Read data from the server addresses 40001~40005 and store it in VW200~VW208

Modify the values of 40001~40005 in the debugging assistant, at this time, you can see that the values of the client VW200~VW208 will also change.

2. Write data from VW210~VW218 into the server’s 40006~40010

Change the values of VW210-VW218 on the client, at this time, the values in the server’s 40006~40010 will also change.

Case Program | MODBUS TCP Communication in Open Communication

3. Write data from VB220 into 00001~00008

Change the value of VB20 on the client, and the values in 00001~00008 in the debugging assistant will also change.

Case Program | MODBUS TCP Communication in Open Communication

Source: Jicheng Training Network, Author: Jicheng – Sui Xiangjian, unauthorized reproduction is prohibited!

Scan the QR code below↓↓↓
Get the 【Siemens Complete Electronic Data Package】 for Free

Case Program | MODBUS TCP Communication in Open Communication

Previous Recommendations

Case of Product Aggregation Station Based on Inovance H5U and Factory IO

Quick Start for TIA Portal, These Knowledge Must Be Understood

What Are the Advantages of Siemens PLC + Domestic Remote IO?

If You Want to Play with Inverters, Looking at These Things Will Help You Excel in Your Company!

PLC Module No Power Failure, Took More Than an Hour to Realize I Was Careless!

How to Create Macro Files for Multiple Variable States in EPLAN?

64 Essential Siemens E-books for Learning Automation | Get Them for Free

How to Specify Page Jumps in Siemens Touch Screen SMART Line via Dropdown?

Test Your Skills: Are You a Real Electrician or a Fake Electrician: How to Calculate Current with 5 Turns in a Transformer?

Leave a Comment