Standardization of TCP Server Communication for Mainstream PLC Sockets

1. Overview of TCP Server Communication for PLC Sockets:

In socket TCP server communication, the server first creates a socket, binds it to a specified IP address and port, and then listens for incoming connections. When a client initiates a connection request, the server establishes a reliable connection through a three-way handshake. The communication protocol can be customized by the user, allowing developers to design data formats and interaction rules based on business needs, such as identifying data types and lengths through specific packet headers for efficient parsing. Once the connection is established, data transmission and reception between the server and client are carried out according to the custom protocol. When communication ends, the server closes the corresponding connection or continues to listen for new connection requests. This model allows for flexible adjustments to protocol details based on technical requirements, but developers must handle data parsing and error handling logic themselves.

2. Implementing Socket TCP Server Communication in PLCs:

Different brands of PLCs have varying names for implementing socket TCP server communication, as well as different commands for connection, sending data, and receiving data, as detailed in the table below.

Standardization of TCP Server Communication for Mainstream PLC Sockets

As can be seen, different brands of PLCs implement socket TCP server communication with different commands and programming styles. Therefore, it is necessary to standardize the programming of PLC socket TCP server communication, encapsulating the communication into function blocks, instruction libraries, or user libraries with the same input and output parameters for ease of use.

3. Standardization of PLC Socket TCP Server Communication:

Based on the actual situation of sending and receiving data in socket TCP server communication, we have agreed on the encapsulated function blocks, instruction libraries, or user libraries for various brands of PLCs as shown in the figure below.

Standardization of TCP Server Communication for Mainstream PLC Sockets

The meanings of the parameters in the function blocks, instruction libraries, or user libraries are shown in the table below.

Standardization of TCP Server Communication for Mainstream PLC Sockets

4. Video Tutorial on Standardized Function Blocks for TCP Client Communication in Mainstream PLCs:

1. Rockwell Micro850:

Standardization of TCP Server Communication for Mainstream PLC Sockets

2. Siemens S7-1200:

Standardization of TCP Server Communication for Mainstream PLC Sockets

3. Schneider M241:

Standardization of TCP Server Communication for Mainstream PLC Sockets

4. Mitsubishi FX5U:

Standardization of TCP Server Communication for Mainstream PLC Sockets

5. Omron NX1P2:

Standardization of TCP Server Communication for Mainstream PLC Sockets

6. Panasonic FPXH:

Standardization of TCP Server Communication for Mainstream PLC Sockets

7. Delta DVP-ES3:

Standardization of TCP Server Communication for Mainstream PLC Sockets

8. Inovance Easy521:

Standardization of TCP Server Communication for Mainstream PLC Sockets

Leave a Comment