Understanding the Modbus Protocol
Advertisement
This article provides an introduction to the Modbus protocol, including its basic principles and the role of a Hart to Modbus converter. Modbus is a widely used communication protocol, especially within industrial automation and control systems.
The Modbus protocol typically operates on a master-slave architecture. The master device initiates communication by sending a request message to a slave device, and then waits for a response message.
This master-slave arrangement grants the master device complete control over the information flow. This represents a significant improvement over earlier multidrop networks that relied on RS422/RS485. Modbus finds common application in SCADA (Supervisory Control and Data Acquisition) systems for network communication between various devices.
As stated earlier, Modbus is fundamentally a request-response protocol.
Figure 1: Modbus Protocol Message Structure
As illustrated in Figure 1, a Modbus request message is structured as a layered set of data.
Modbus Transmission Modes: ASCII vs. RTU
Controllers can be configured to communicate on standard Modbus networks using either ASCII or RTU (Remote Terminal Unit) transmission modes. The selection of the desired mode, along with serial port communication parameters (such as baud rate and parity mode), is typically done during the configuration of each controller. It’s crucial that the mode and serial parameters are consistent across all devices on the Modbus network.
The choice between ASCII and RTU modes is specific to standard Modbus networks and dictates how the bits of data are transmitted serially across the network. It determines how information is packed into the message fields and subsequently decoded.
ASCII Mode
When controllers are configured to use ASCII mode on a Modbus network, each eight-bit byte in a message is transmitted as two ASCII characters. A key advantage of ASCII mode is its tolerance for time intervals of up to one second between characters without triggering an error.
RTU Mode
In RTU mode, each eight-bit byte in a message contains two four-bit hexadecimal characters. The primary benefit of RTU mode is its higher character density, leading to improved data throughput compared to ASCII mode for the same baud rate. In RTU mode, messages must be transmitted as a continuous stream.
Modbus Message Framing
Regardless of whether ASCII or RTU serial transmission mode is used, the transmitting device encapsulates the Modbus message within a frame that has clearly defined beginning and ending points. This allows receiving devices to recognize the start of the message, read the address portion to identify the intended recipient, and determine when the message is complete. Incomplete messages can be detected, leading to the setting of error flags. For more information, refer to Modbus message frame format.
Hart to Modbus Converter
A Hart to Modbus converter is a device that translates the Hart protocol into the Modbus protocol, enabling communication between devices using these different standards.
Some manufacturers of Hart to Modbus converters include:
- Emerson Process Management
- SCAN ELECTRONIC SYSTEMS
- ICP DAS USA
- Moore Industries-International, Inc.