What is Modbus Protocol?
Modbus or Modbus protocol is a communication protocol, originally published/developed by Modicon Systems (modern-day Schneider Electric) particularly for application with PLCs.
It’s a protocol/method/network used to transmit information through a series of lines between electronic components. The electronic device where the information is channeled (requested) is referred to as a Modbus Master while the device that supplies this information is called a Modbus slave.
A typical Modbus protocol consists of a single master and up to two-forty seven (247) slaves where each of the slaves come with a unique slave address. Information can be as well be written by the master to the slaves. Modbus protocol is open implying that manufacturers are allowed to make Modbus items without constraints of paying royalties.
Today, this method of communication is extensively applied in many industrial environments. For example, it is used in supervisory control and data acquisition (SCADA) systems to link the supervisory monitor with remote terminal units (RTUs). Typically, this communication protocol is used to transport (transmit) signals from instruments and control panels to controllers or information collecting systems. Modbus allows transmission of signals/communication among multiple devices that are linked in the same network, for instance, as a system measuring temperature and humidity and all the results are communicated to a single computer.
Modbus comes in several variants/versions depending on the type of serial port or even Ethernet: Modbus RTU, Modbus TCP/IP, Modbus RS485, Modbus ASCII, and Modbus UDP/IP among others. Also, there is a Modbus Poll which is a simulator used by developers to ascertain the efficiency of a Modbus protocol.
Modbus RTU
It’s nicknamed as the grandfather of industrial networking. Modbus RTU is regarded as the most pervasive means of communication in industrial automation and the most commonly used method of linking industrial electronic components/devices/networks/systems.
Modbus RTU is an open-serial protocol broadly applied in modern industrial supervisory and control systems. The protocol uses the RS-232/RS-485 serial interfaces for transmission of data and is supported by commercial systems like SCADA, HMI, and data acquisition programs available in the market.
This RTU protocol applies the master/slave method to communicate between connected devices implying that any system/network that uses this protocol must a master and at least a slave. This protocol applies formatted messages in order to make communications between the master and the slave(s). Here, the Modbus master initiates the messages and they are sent to Modbus slave.
Depending on the command of the message, the slave thereby responds or performs an acknowledgment as requested by the message function. Message leaving and entering Modbus master have two-byte (16-bit) cylindrical redundancy check (CRC) for checking errors. Should an invalid request by transmitted to the salve, a single byte (8-bit) error code is thereby returned to the master explaining why the request appears faulty. The 16-bit messages of Modbus RTU are simple to enable reliability.
Due to their simplicity, typical 16-bit Modbus RTU registers are used in queues, floating points, tables ASCII texts, and other data.
Modbus TCP/IP or Modbus TCP
TCP stands for transmission control protocol whereas IP stands for internet protocol. The two protocols can be used simultaneously as transmission protocols for the internet. Sending Modbus information uses the protocols requires the information to be passed over the TCP to attach additional data which is then channeled to IP. It’s in the IP where the data is placed in packers (datagram) and then transmitted. Before information is transmitted, a connection must be established because TCP is a connection-depended protocol. The master, which is regarded as the client in Modbus TCP, first creates a connection with the slave, also the server. The client sends a connection request to the slave which waits for the incoming connection. Once the connection is created, the slave responds to queries sent by the master until the master closes this connection.
Data carried in Modbus TCP is stateless, implying that they are immune to interference from noise and require minimal recovery information for maintenance at either end. Applying its connection-oriented principle, the protocol enables are a great number of concurrent connections, so often it’s the initiator’s choice whether to connect as needed or make use – re-use actually – an existing connection. The objective of connection-oriented rather than a datagram-oriented protocol in Modbus TCP is to contr9l the individual “transactions” by encapsulating it in a connection that is easy to identify, monitor, or cancel without the need of a specified action on the sides of the client and server.
Modbus RS485
RS485 is a standard protocol for serial data transportation that resembles RS232 but uses different electric signals. One benefit of RS485 protocol is the property/characteristic/ability of multiple devices to share a single bus implying that there is no need for using several RS485 interfaces on several devices.
Modbus RS485 protocol defines the connection between a master (host) and slaves (devices) that enables the querying of device supervision and configuration. Devices (slaves) connected in Modbus RS485 and in parallel configuration require a peculiar slave ID for each device and properly configured. Modbus RS485 is widely used in industrial environments and with the current trend of industry 4.0, there is increasing manufacture of devices that support this Modbus protocol. The protocol is characterized by high acquisition speed, high reliability, simple programming, support mathematical processing, efficient error tracking mechanism, and reduced engineering costs among others.
Modbus Poll
It’s a Modbus master simulator (software) purposely designed to assist Modbus slave and other devices developers in testing and simulating the Modbus protocol. The simulator comes with several document interfaces allowing the developer to monitor multiple slaves simultaneously. For every window, they are required to specify the salve ID, the function, the address, and the poll rate. On the simulator, also, it is possible to read and write registers. To modify the register, the developer needs to only double click its value. The simulator supports numerous Modbus variants such as Modbus RTU, Modbus TCP/IP, Modbus RS485, Modbus ASCII, Modbus UDP/IP, et al.