My previous Modbus article focused on Modbus protocol questions. The blog focuses on questions related to performance, Modbus certification and other miscellaneous Modbus topics.
How many Slave devices can I have on a network?
A Modbus RTU Master device can address up to 32 Modbus RTU Slaves. This is a hardware limitation in the RS485 driver chips. The Modbus RTU Master protocol can address any number of Slave devices except for this hardware limitation. Modbus TCP, the Ethernet version of Modbus, can address an unlimited number of devices.
How much data can I transfer over Modbus?
The Modbus protocol limits most commands to 240 data bytes. That’s about 120 16-bit unsigned registers or 960 coils. The data message area size varies slightly as a few of the commands contain additional control bytes.
What’s the difference between Modbus TCP and Modbus RTU?
Modbus TCP is the Ethernet version of Modbus. Modbus RTU is a serial version of the Modbus protocol. The base command set is identical. The protocol used by both is identical except for a two-byte CRC (Cyclic Redundancy Check). The CRC is used in Modbus RTU serial communications to do error checking. It is not needed and not included in a Modbus TCP packet because error-checking is performed by TCP (Transmission Control Protocol).
What is the main disadvantage of the Modbus protocol?
Modbus is mainly limited by the simplicity of its address space. Modbus offers a data space with only two types of data: 16-bit unsigned integers called registers and single binary values called coils. There is no provision for floating point data, signed integers, string data or other advanced data types. It also has no provision for metadata, like the last time a value was updated, the location of the sensor generating the value or the maximum value recorded.
What is the main advantage of the Modbus protocol?
Modbus is pure simplicity. It is a very small, fast, efficient protocol that consumes little in the way of bandwidth or resources. It can be implemented by a competent programmer in as little as a few hours. This is why it continues to be the default protocol for many small devices.
What kind of performance can I get over Modbus?
Modbus is a messaging protocol. Messages are transmitted from a Master device to a Slave device. On a serial Modbus RTU network, it uses half duplex messaging. The Master transmits, all Slaves listen, and the one Slave that is the target of the message responds. Only one Slave can be addressed at a time. Generally, it’s hundreds of milliseconds per transaction.
In Modbus TCP, the Master/Slave communication is done over Ethernet. Modbus TCP takes advantage of the superior speed and bandwidth of an Ethernet network to vastly improve the Master/Slave communication. Messages can be sent and responses received in tens of milliseconds instead of hundreds of milliseconds.
How does Modbus TCP compare to EtherNet/IP and PROFINET IO?
EtherNet/IP and PROFINET IO are connection type protocols that rely on cyclic communications. Modbus is a connection-less protocol. A message comes in, it is processed, and a response is transmitted. In a connected protocol, a set of messages opens and configures a connection between a Client and a Server device. The Server device is configured to transmit its inputs at some cyclic rate and the Client is configured to transmit outputs to the Server at some other cyclic rate. That’s vastly different than the single message transaction of Modbus RTU.
That concludes this edition of the Modbus question and answer list. If you have additional questions, visit the Contact Us page and let us know how we can help.