(updated January 2024)
Modbus is a communication protocol for industrial devices developed in 1979 by Modicon, now Schneider Electric. It was designed for Modican programmable logic controllers (PLCs) to communicate, but was made freely available and has become a de facto standard for communication between industrial electronic devices across various buses and networks. Modbus is popular in industrial environments because it is openly published and royalty-free. Recently there has been an upsurge of interest in Modbus for its use in the Industrial Internet of Things (IIoT).
The original protocol described a (typically) single Modbus Master (toady called a Client) with multiple Modbus Slaves (today called Servers), connected using a single RS-485 bus. The Master would send a message to a particular Slave, either requesting data from the Server (coil states or register values in Modbus vernacular), or is sending data to the Server to affect its operation. The Slave then responds, either with the requested data or confirming that sent data had been received.
There are essentially three types of Modbus:
- Modbus RTU uses RS-485 differential signaling over up to 1km of twisted-pair wire
- Modbus TCP/IP enables exchanging data over a network, leveraging the advantages of Ethernet for increased speed, reliability, and long-distance connectivity, and popular with wireless IIoT end devices using the IwIP network stack.
- Modbus ASCII, which is essentially Modbus RTU for a serial terminal, and is slower because characters are transmitted instead of bytes.
In industry, a Modbus Server is typically a dedicated device, and although it may support the same coils or registers as another Modbus Server, the meaning of those coils or registers will be unique to that device. A Modbus Client is typically a Programmable Logic Controller (PLC), or gateway device in a SCADA network.
For testing and evaluation, general purpose Modbus software running on a desktop or laptop computer is often more convenient than using a purpose-designed Modbus device. A Modbus Client (Master) simulator can be used to query data from devices, and can be a valuable test tool when developing a Modbus Server (Slave) device. A Server (Slave) simulator can be useful as a digital twin for verification testing when developing a physical slave device, or as a device to interact with when developing a Modbus Client.
The following is a non-comprehensive list of available Modbus Server and Client software. If one of these doesn’t quite suite your needs, you consider adapting an existing open-source project or create your from-scratch solution using an open-source Modbus library. Please let me know if you use any of these, or software that is not listed.
Free Client (Master) Simulators
CAS Modbus Scanner
CAS Modbus Scanner is a free proprietary application from Chipkin Automation Systems that was recommended by Steven. It can retrieve coils, inputs, holding registers, and input registers (displaying values in a variety of formats), and also discover Modbus devices on a network (testing every address, function, length, and offset to check for exceptions or responses). I used CAS Modbus Scanner to assist in verification testing for the Modbus interface of a new industrial controller.
ModbusScope is a free open-source cross-platform app for capturing and graphing Modbus data. In the past, I would capture Modbus data using Modpoll and hammer the output into CSV with sed, or use ModScan to capture CSV directly, and plot using using either DatPlot or spreadsheet software. However, thanks to Ben’s comment, ModbusScope is now a go-to app for data logging and capture when I’m looking at three or fewer registers from up to three devices. ModbusScope is a Qt app and coded in C++, and uses muparser (“fast math parser library”) and QCustomplot (“easy to use plotting widget for Qt”), with icons from Lucide.
Modbus Tester from Schneider Electric is a free proprietary Windows GUI program for reading Modbus registers. It supports Modbus RTU and TCP.
modpoll from proconX is a free proprietary Windows command-line program supporting Modbus ASCII, RTU and TCP. proconX provides modpoll to demonstrate their commercial driver libraries, and it could be considered a defacto standard based on the number of references on the web.
mbpoll is an open source (GPL-3) cross-platform command-line utility based on libmodbus (see Libraries). It supports Modbus RTU and TCP and is available in many (most?) Linux distributions. mbpoll conveniently uses similar output syntax and command options as proconX modpoll, I use mbpoll on a Linux Mint test computer and the two are essentially interchangeable. Unfortunately, although mbpoll claims to be multiplatform, I haven’t found a pre-built Windows binary and building from source for Windows seems problematic (please comment if you disagree).
QModMaster is a free open-source Qt-based Modbus master based on libmodbus (see Libraries below). QModMaster is licensed using the LGPL and includes a bus monitor for examining traffic on the bus. The project provides a binary for Windows, but must be compiled from source on Linux and requires Qt Creator.
Radzio! Modbus Master Simulator (RMMS) is a free proprietary Windows utility (GUI) and claims to replace commercial ModScan and Modbus Poll utilities. It supports Modbus RTU and TCP, and multiple Modbus slave devices.
Scanbus-BR is is a free Modbus RTU and TCP GUI client that is multi-lingual (Portuguese, Spanish and English) and cross-platform (Windows and Linux). Rodrigo Hernandes created Scanbus to scratch his own itch and released it publicly to help others and as a demo to support his project development work (he is also a Brazilian, which presumably is the reason for the “- BR” suffix). I found the charting capability very handy (plotting up to six registers vs time), and having register values shown in integer, hex and binary simultaneously saved time by not having to convert or switch display formats.
Commercial Client (Master) Simulators
Modbus Poll from modbus tools was designed to help developers of Modbus slave devices and others to test and simulate the Modbus protocol. Using a multiple document interface, several Modbus slaves and/or data areas can be monitored at the same time. US$129 per developer. The modbus tools website also has a good intro to Modbus.
ModScan from WinTECH Software was developed to verify correct protocol operation in new or existing systems. ModScan supports an arbitrary number of queries, each with its own document window, and you can create your own custom windows and add content using the provided widgets (for example, using the trendline display shown below, which can plot up to four difference sources in one display). The data from each document window can be logged to its own data file.
Extensions provide third-party data acquisition using Control Automation routines or the MS Jet Database engine. A debug mode displays raw serial data to and from a connected device, and ModScan32 can execute test scripts with stimulus messages and expected responses for production testing. A single-user license cost US$65 when I last checked.
Simply Modbus Master
Simply Modbus Master (RTU and ASCII ). The Free mode allows six request messages before the application must be re-started. C$60. A slave simulator and TCP client are also available. The website has a nice intro to Modbus and Modbus Enron.
Free Server (Slave) Simulators
ModRSsim2 was forked from MOD_RSSIM and includes compiling on Visual Studio 2010. ModRSsim2 supports RS-232 and TCP/IP connections, the full range of Modbus addresses for all four Modbus types (0xxxxx, 1xxxx, 3xxxx, & 4xxxx addresses), as well as diagnostics with complete traffic byte capture and logging capability. ModRSsim2 supports CSV loading and a scripting environment for testing as well as HTML custom displays. It is free and open-source, and licensed under the GPL.
MOD_RSSIM is a Windows-based Modbus PLC Simulator (and basis of ModRSsim2 above). It is free and open-source, and started as a test program for a SCADA/HMI with Modbus RTU and TCP/IP. Typical uses are to verify device configuration, support development of Modbus master and slave drivers for embedded and desktop platforms, and as an educational tool to learn Modbus protocols.
pyModSlave is a free and open-source Qt-based Python-code ModBus RTU and TCP slave from the developer of QModMaster. A Windows executable is provided and pyModSlave includes a bus monitor for examining all traffic on the bus. pyModSlave is licensed under the LGPL
UnSlave Modbus Slave Simulator
UnSlave Modbus Slave Simulator . UnSlave simulates any number of Modbus slaves. UnSlave is provided free from Unserver, possibly as a source of test data for Unserver’s Modbus REST API Server, which provides data from Modbus networks and devices to higher-level clients – and is monetized. The Unserver website includes a nice Complete Modbus Guide.
Commercial Server (Slave) Simulators
SimServe by SCADAmatic can simulate Modbus ASCII, RTU, or TCP/IP. It provides a user interface for setting up a network topology of multiple devices simultaneously. The developer James brought it to my attention, and was kind enough to provide a guest key for evaluation. SimServe could be a valuable development aid if you are developing SCADA software and need simulated devices for testing, or if you are developing a device and could benefit from having a digital twin for comparison (assuming SimServe is capable of simulating your device).
WinModbus is a Modbus Slave Simulator for Windows. It costs GBP62.50 and comes with lifetime support. A 14-day functional demo is available for evaluation. Polished website.
A number of Modbus libraries are available to leverage application development.
FreeMODBUS is a free open-source implementation of the Modbus protocol with separate ASCII/RTU and TCP ports for a variety of embedded systems. I can recommend FreeMODBUS based on first-hand experience replacing a DIY protocol stack in an embedded industrial controller with an 8-bit MPU. FreeMODBUS is licensed using the BSD 3-clause license.
libmodbus is a free open-source library for Linux, Mac OS X, FreeBSD, QNX and Win32. The library is written in C, supports RTU (serial) and TCP (Ethernet) communications, and is licensed using the BSD 3-clause license. QModMaster, pyModSlave and mbpoll (reviewed above) use libmodbus.
Peter Chipkin has a nice list of various Modbus-related tools.
com0com is a free open-source kernel-mode virtual serial port driver for Windows. An unlimited number of virtual COM port pairs can be created, and any pair can be used to connect one COM port based application to another. The module is signed with a test certificate, and requires configuring Windows to load test-signed boot modules.