Submit your email address to get a link for quick download on your desktop and get started!
In this article, I will tell you how to read and record Modbus data using the most advanced Modbus reader program - Serial Port Monitor. If you are considering integrating the Modbus standard within your local device network or are an active user of Modbus, this tutorial will be helpful for you.
Contents
Serial Port Monitor is a professional RS485 Modbus reader and data logger utility designed to decode Modbus RTU and ASCII protocol data, read it, and record it for further analysis.
With this software, you will know how to read Modbus data and the traffic coming in and going out of serial devices communicating within a Modbus network. This app supports all serial ports, including RS232, RS422, and RS485.
The program is aimed at developers and testers of serial applications and hardware as well as any other specialists working with Modbus-based equipment and software. It helps to interpret or parse the messages received from or sent by your devices via serial interfaces.
One of the biggest advantages of Serial Port Monitor is its ability to show captured data in a convenient and readable format. There are four data visualizers that the app offers: Table view, Dump view, Line view, and Terminal view. It’s up to you to decide in which mode the data will be shown. You can enable one, two, or all of the visualizers at a time.
What’s also important is that the Serial Port Monitor comes with advanced built-in search and filtering options as well as the Terminal mode that allows executing text commands.
Modbus is a serial communication protocol used for transporting data over serial channels between electronic equipment. The standard Modbus communication is set in such a way that one device, Modbus Master, writes data to or requests data from other devices, Modbus Slaves, across a serial network. As a rule, there’s one Master and up to 247 Slaves in a Modbus network. The protocol uses RS-485, RS-422, and RS-232 interfaces, as well as Ethernet TCP/IP networks (Modbus TCP protocol) for data transfer.
As mentioned before, Modbus data can be transmitted via a serial channel connecting two COM-based devices. They communicate information as a series of ones and zeros (data bits) via a standard serial cable. Each bit is sent as a voltage. Modbus connection is rather fast and the normal transmission speed is 9600 baud. The data is sent in blocks of 8 bits called bytes, each of which is represented by one of the 256-character pairs from 00 to FF.
Traditionally, Modbus is applied in industry for transmitting data from control devices to the central data gathering system. This can be a system that measures humidity or temperature and forwards the results to a supervisory computer. The protocol can also serve for connecting the control computer with a remote terminal unit (RTU) in SCADA (Supervisory Control and Data Acquisition) systems. There are Modbus protocol versions for serial communications (Modbus RTU and Modbus ASCII) and Ethernet connections (Modbus TCP).
In industrial automation and instrumentation, maintaining data integrity is crucial. Sensor measurements must reach the controller unaltered, and configurations sent from a controller to a Modbus device must arrive intact.
Data corruption during transmission can lead to critical errors. For instance, if a temperature sensor measures 24°C but the transmitted value changes to 18°C due to flipped bits, the system’s response could be compromised.
To prevent such issues, the Modbus frame includes a checksum, essential for ensuring data integrity. This 2-byte checksum is calculated from each byte of the Device ID and PDU and then appended to the Modbus message. When a Modbus frame is received, the device recalculates the checksum and compares it with the transmitted one. If there’s a discrepancy, the device discards the corrupted data packet.
Modbus can operate over RS232, RS485, or Ethernet cables, each supporting different distances and speed limits. For instance, RS232 typically handles up to 50 feet at a 9600 baud rate.
Most installations use RS485, which can support distances up to 4,000 feet at speeds up to 115,200 baud. Ethernet, in contrast, generally supports up to 100 meters, limited by the network switch speeds.
Though Modbus RS-485 theoretically supports speeds up to 115,200 baud, practical applications rarely exceed 19,200 baud. Higher transfer rates are often unnecessary, and many slave devices aren’t equipped to handle extreme baud rates.