What is Modbus TCP/IP?

What is Modbus TCP/IP?

Modbus TCP/IP is a client/server-based application protocol that utilizes Ethernet as its physical layer. Here TCP means transmission Control Protocol. It is a deterministic protocol as it Accommodates to TCP standards. TCP confirms whether each request message is accurately received at the server end. IP stands for Internet Protocol. It ensures the accurate addressing and appropriate routing to be followed.

In Modbus TCP/IP, the client initiates communication by sending a request message to the server. The server processes the request and sends a response.

Modbus TCP/IP Client Example?       

Products such as PLCs, HMIs, SCADA systems, and ModScan Software primarily fulfill client functions.

Modbus TCP/IP Server Example?

Server functions are predominantly supported by field devices such as VFDs, servos, energy meters, encoders, sensors, and ModSim Software.

Modbus TCP/IP Architecture :

Above diagram shows how we can use devices in client server Architecture for Modbus TCP/IP .

Modbus TCP/IP Frame Structure:

A Modbus TCP/IP frame consists of the Modbus Application Protocol (MBAP) and the Protocol Data Unit (PDU).

In Modbus TCP/IP MBAP header is 7 Byte Length:

1.Transaction ID 2 Byte:

It is used for identification purposes to track request and response frames.

2.Protocol ID 2 Byte:

This protocol has an identification code. Keep its value set to 0 for this protocol.

3.Length 2 Byte:

The ‘Length’ field represents the byte count for the remaining fields: Unit ID, Function code, and Data.

4.Unit ID:

The ‘Unit ID’ is an identification number for the remote server. In standard Modbus TCP/IP devices, the Unit ID is often kept as 0. However, in some cases where devices are converted from serial Modbus to Modbus TCP/IP, a Unit ID may still be required.

The Modbus TCP/IP frame is encapsulated within standard TCP/IP frames and transmitted using TCP port number 502.

Leave a comment