Communication requires some mutual standard – a shared language – and this is as true of electronic devices as it is of us humans. Among the most enduring and universally accepted standards or languages by which electronic systems communicate is the Modbus serial protocol, formulated in 1979 by Modicon (which organization was eventually acquired by Schneider Electric) in connection with its programmable logic controllers, or PLCs. The Modbus protocol eventually earned general acceptance simply because it was straight forward to deploy. It just worked.
The essential elements of Modbus are “transactions” based upon a master/slave, or more politically-correct, client/server arrangement. The protocol is described as “stateless,” meaning that, unlike us stateful humans, neither the client or server retains any memory or record of the transaction. Other stateless protocols include the Internet Protocol (IP) and the Hypertext Transfer Protocol (HTTP).
Unlike the intricate processes they facilitate, these transactions or packets are remarkably simple. The client sends a request to the server consisting a single-byte function code packaged with function-specific data made up of a varying numbers of bytes. The server likewise responds with a single-byte function code and response-specific data, again made up of varying numbers of bytes. A single-byte error-code response results, packaged with a single-byte code that specifies the exception. Each message package consists of just four parts:
- The address of the receiving device;
- A function code that defines the message type;
- A block of data that transmits additional information; and
- A numeric value that tests for errors in communication.
When transmitted through simple RS232, RS422 or RS 485 serial interfaces, the entire network is devoted to Modbus communications, transmitting in either in ASCII or RTU mode. When transmitted using TCP/IP via Ethernet, Modbus messages are embedded in format-compliant packets that coexist with other protocols, allowing Modbus to function on either point-to-point or multi-drop networks.
As noted, this deceptively-simple device-communication format supports surprisingly sophisticated processes thanks to the highly-refined modern devices that now implement the longstanding Modbus protocol. Modbus gateways are designed specifically to provide an interface between Modbus serial devices and host computers that run Modbus/TCP, in essence integrating Modbus RTU/ASCII devices and controllers into Ethernet networks. Advantech offers 1-, 2- and 4-port industrial-grade Modbus Gateways, with or without cascading. Its Modbus Gateways not only allow Ethernet clients to control serial servers, but also permit serial clients to control Ethernet servers, providing a simple, cost-effective bridge to delivering remote management and data access to and from a myriad of devices that cannot connect directly to a network.