Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
Dec 23, 2017
Dec 23, 2017
Dec 11, 2017
Dec 23, 2017

QSlave: Modbus network emulator


This application is software emulator of Modbus network. It emulate several slave devices connected by virtual network. This network connected to the physical Modbus network.

Adapter USB RS485 required for connection QSlave with physical network.

1. Installation

1.1. Building from sources

  1. Get sources from repository
$ mkdir qslave
$ cd qslave
$ git clone qslave
  1. Make build directory
$ mkdir build
$ cd build
  1. Generate Makefile
$ qmake ../qslave
  1. Run make
$ make

1.2. Windows setup

Download last release from release page. Run qslave-vX.Y.Z-setup.exe and folow installation instructions.

2. Setup virtual network configuration

You need several configuration files in XML format for setup network configuration. You can see example configuration in directory cfg/example. The list of virtual slaves is in file

<?xml version="1.0" encoding="UTF-8" ?>
		<!-- Slave description -->
		<Description>Traffic light</Description>
		<!-- Slave ID -->
		<!-- Slave config file (without *.xml extension) -->

Earch slave has own config file. You can see file traffic-light.xml for example of slave configuration

<?xml version="1.0" encoding="UTF-8" ?>
	<!-- Coils list -->
		<description>Red signal</description>
		<description>Yellow signal</description>
		<description>Green signal</description>
	<!-- Discrete inputs list -->
	<!-- Holding registers list -->
		<description>Signal activity time</description>
	<!-- Input registers list -->
		<description>Signals count</description>

3. Load configuration and work with QSlave

  1. Run QSlave
  2. Load network configuration from *.net file (File -> Open config)

  1. Select device in device list. You can see all device data structures in application Windows

  1. Plugin USB RS485 adapter to you PC USB port. Adapter must connected to physical Modbus RTU network.
  2. Select connection parameters (port name, baudrate, etc.) and press connect button
  3. You can change all values in tables of device memory (Coils, Holding registers, Discrete inputs and Input registers). You also can see changes in coils and holding registers, when master device send data to virtual device.