Modbus Software, Driver and Libraries
Member of Modbus Organization

Have a Question?

We accept VISA, MasterCard, PayPal

30-day Money-Back Guarantee

Diagslave Modbus Slave Simulator

diagslave is a simple command line based Modbus slave simulator and test utility. It is free software. diagslave is using the FieldTalk Modbus driver. Diagslave binaries are available for the following operating system platforms and architectures:
  • Windows
  • Linux (x86 32-bit)
  • QNX Neutrino 6 (x86)
Modbus Slave simulator


Usage: diagslave [options] [serialport]
serialport    Serial port when using Modbus ASCII or Modbus RTU protocol
              COM1, COM2 ...                on Windows
              /dev/ttyS0, /dev/ttyS1 ...    on Linux
              /dev/ser1, /dev/ser2 ...      on QNX
General options:
-m ascii      Modbus ASCII protocol
-m rtu        Modbus RTU protocol (default)
-m tcp        MODBUS/TCP protocol
-t #          Master poll time-out in ms (0-100000, 3000 is default)
-a #          Slave address (1-255 for RTU/ASCII, 0-255 for TCP)
Options for MODBUS/TCP:
-p #          TCP port number (502 is default)
Options for Modbus ASCII and Modbus RTU:
-b #          Baudrate (e.g. 9600, 19200, ...) (9600 is default)
-d #          Databits (7 or 8 for ASCII protocol, 8 for RTU)
-s #          Stopbits (1 or 2, 1 is default)
-p none       No parity
-p even       Even parity (default)
-p odd        Odd parity
-4 #          RS-485 mode, RTS on while transmitting and another # ms after

Usage Examples

To get help on usage run the following command:
diagslave -h
To run a Modbus server on COM1 run:
diagslave -b 19200 -p none -m rtu
To run a Modbus/TCP server on Ethernet run:
diagslave -m tcp


System Requirements diagslave runs on Windows XP, 2000, NT, 98, Linux kernel 2.6 or 2.4, QNX Neutrino 6 (x86).
License This program is freeware; you can use it and redistribute it under the terms of the accompanying License document LICENSE-FREE.