When working with digital panel meters and controllers, a lot of engineers have asked us for…
An Introduction to Modbus® Serial Communications
Digital panel meters are available with a wide range of features and options. One feature common on more advanced digital panel meters is Modbus serial communications, often with RS-485, RS-232, or USB connections available. Precision Digital's PROVU® Series is a good example of this.
This article will discuss what Modbus communications is, some popular ways to use it, and explain some of the terms often associated with using it.
What is Modbus?
Modbus.org defined Modbus as follows.
To understand what Modbus is, look at each statement in that definition.
Modbus is a way for two devices to communicate digitally. Modbus "provides client/server communication between devices." This means that Modbus allows two or more devices to communicate data to each other. One device is a client, which initiates a request to another device, the server. The server executes the required actions and responds to the client.2 The ability to communicate complicated requests and information mean much more can be done with this type of digital communication than with a single analog signal. For example, while a traditional level transmitter may communicate a single process variable to another device on a 4-20 mA output, a Modbus level transmitter might be able to communicate top level, interface level, temperature, and alarm data; all on a 3-wire RS-485 network (more on that later).
"MODBUS is an application-layer messaging protocol… between devices connected on different types of buses or networks." As an application-layer protocol, the Modbus specification defines how two devices communicate in terms of what an information request looks like, how a meter responds, where data is stored, etc. The physical-layer, the mechanical wiring and electrical specifications for communicating with Modbus, can vary. The standard does not define the physical layer; the wiring and electrical signals used between the Modbus devices. This is why Modbus can be used over common serial communications methods such as RS-232, RS-485, USB connections, etc. As long as all the devices communicate with Modbus on compatible connections, the Modbus system will work. Converters are readily available from one physical layer standard to another (ie: RS-485 to USB converters), to make wiring a Modbus network even easier.
In summary, Modbus is a means for two or more devices, such as transmitters, digital panel meters, PLCs, and more, to communicate digitally across various types of networks. This communication allows the devices to share more data, more accurately, than with traditional process industry methods, such as 4-20 mA or 0-10 V signals.
The Advantages of a Modbus Process Measurement System
Modbus communications can have a major impact on your industrial process. Assuming some (preferably all) the devices in your application are Modbus enabled; the advantages of using this serial communications are numerous. Two common advantages are the ability to easily use multivariable transmitters and the increased accuracy from a digital measurement and display system.
Multivariable level transmitters are becoming more commonly available and more popular. These devices are capable of measuring multiple process variables. One common application is tanks with oil and water. The transmitter can sense the top level, interface level of the two liquids, and the average temperature in the tank. The most accurate and most convenient way to read this information is with a serial communications option, such as a Modbus. A Modbus scanner can display one or more of these variables with just a few serial communication wires. Precision Digital's PD865 Snooper, for example, can poll (request information from) up to eight process variables, displaying one and allowing additional PD865 meters to display the other variables. (www.predig.com/PD865) This would require three wires for RS-485, wired in parallel to three PD865 Snoopers. In contrast, using traditional analog outputs and digital panel meters would require three isolated 4-20 mA signal loops with three isolated power supplies.
The reading of a digital value is also more accurate, as there is no analog signal inaccuracy or temperature drift in a Modbus system. The reading on the display is exactly what the transmitter is detecting.
This enhanced accuracy also benefits flow rate and total systems. From industrial batching to custody transfer, accurate flow rates and totals are critical in oil and gas transport. Every analog signal used in a system adds to the system inaccuracy. Several very accurate meters, transmitters, and displays can combine their error to make a measureable inaccuracy in the system as a whole. The more parts of this system that use exact flow and total values transmitted by serial communications, the more accurate the system as a whole.
These two applications; mixed oil and water tank gauging and precise oil and gas flow measurement, are just two general examples of how almost any system can benefit from the use of Modbus serial communications. Other advantages include the simplicity of adding more devices into the Modbus network vs. a traditional network of analog signals; the ability of a centralized SCADA system to communicate with all levels of data acquisition devices directly; and simplified device programming possible with computer software which is a part of most Modbus devices.
The Basics of Using Modbus Devices
If you are interested in using a Modbus network for your next application, there are some key terms and concepts that are good to know. The following is a short summary of these terms.
All Modbus devices on a network need to have the ability to connect to each other. To do this, they must have the same communications method (ie: RS-485), or the system must include serial communications adapters to connect the different networks. For example, RS-485 to RS-232 adapters are very common and inexpensive, and allow a RS-485 network of Modbus transmitters to connect to the RS-232 connection common on most desktop computers.
Each type of network has its own advantage.
Example of Half-Duplex (3-wire) RS-485 Wiring
Example of a Common RS-232 Connector
Example of Common USB Cables
Common Communications Settings
Other common specifications for Modbus devices have to do with the serial communication protocol parameters. These are common parameters that often need to be set by a user.
Many other possible serial communications parameters may be set by a user in a Modbus device. Byte-to-byte timeouts, transmit delays, and other settings are often available, but the default settings are often sufficient for simple networks. Networks that are slow, have many network adapters, or are particularly complex may require these parameters to be set for non-default values.
Modbus Registers and Tables
When configuring a Modbus network, the information in these tables is entered into the various devices that read information. For example, if using a Modbus scanner to read the values from a multivariable level transmitter, the scanner will be programmed with the transmitter Modbus address/Slave ID as well as the register number and data types for each piece of information to be read from the transmitter (ie: top level, interface level, and temperature).
While often confusing to read through on their own, these Modbus tables are a tool for programming the Modbus master device (the scanner in the above example). They are not intended as an instruction manual or application guide, and are only used when referencing the data a Modbus master will read from a Modbus slave device. Don't be intimidated by the complexity of a Modbus table!
Don't Be Intimidated
To someone unfamiliar with Modbus and serial communications, the terms and tables can be overwhelming. It is important to remember that modern Modbus industrial devices are easier to setup than ever, and are designed to be used by instrumentation technicians, not just computer programmers and electrical engineers.
Modbus® is a Registered Trademark of Schneider Automation Inc.