Serial communication in Modbus environments
Integrating serial devices with the W&T Com-Server

Modbus is a communication protocol introduced by Modicon towards the end of the 1970s for the exchange of data between controllers, SCADA systems, data loggers, etc. To this day, it is a widely accepted standard in the industry and is also widely used in the networking of PV and wind power components (inverters, data loggers, storage, energy meters etc.).
A large number of detailed descriptions and articles on Modbus and the specification itself are freely available on the Internet. At this point we will provide only a brief overview of the most important features to show the possible uses of the Com-Server in different environments. You will find various application options for the Com-Server in Modbus environments further below on the page.
Modbus in general
Modbus is a strict Master/slave procedure. This means: Modbus slaves may only respond to requests addressed to them, the so-called Requests. Communication is based on the reading or writing of registers by the master. Each request contains:
Length | Name | Description |
---|---|---|
1 byte | Address | Slave address |
1 Byte | Function Code | Type or width of the register and read or write access |
2 bytes | Start address | Access start address (High Byte first) |
2 bytes | Register Count | Number of registers to be read/written |
An addressed slave may reply with a so-called Response. A successful response contains:
Length | Name | Description |
---|---|---|
1 byte | Address | Slave address |
1 byte | Function Code | Identical to the request |
1 byte | Length | Number of following bytes with the content of the requested registers |
Two possible error cases are possible:
- The slave understands the request syntactically, but does not recognize the requested registers and responds with an exception (Function Code Response = Function Code Request + 0x80)
- The slave does not respond at all.
Modbus/RTU
Modbus/RTU is the common standard for Modbus communication via serial interfaces (RS232/422/485). The Modbus requests and responses have appended a checksum 2 bytes in length. The end of the datagram is recognized by the master and slave by means of a transmission pause of at least 3.5 character lengths.
Modbus/TCP
Modbus/TCP is used for communication in TCP/IP networks. The requests and responses are preceded by a Modbus/TCP header. Thanks to the checksums already contained in the network protocols, the additional checksums of the Modbus datagram can be dispensed with.
Length | Name | Description |
---|---|---|
2 bytes | Transaction-ID | Consecutive number |
1 byte | Function Code | Identical to the request |
1 byte | Length | Number of following bytes with the content of the requested registers |
On the wire: Modbus/RTU vs. Modbus/TCP
Modbus/ASCII and Modbus/TCP Secure Protocol
Both are further Modbus protocol variants that are not widely used in practice. Neither Modbus/ASCII nor Modbus/TCP Secure Protocol are supported by W&T devices.