Skip to content

Diagslave

Free Modbus Slave Simulator and Test Tool

Usage

./diagslave --help 명령으로 확인:

diagslave 3.5 - FieldTalk(tm) Modbus(R) Diagnostic Slave Simulator
Copyright (c) 2002-2024 proconX Pty Ltd
Visit https://www.modbusdriver.com for Modbus libraries and tools.

Usage: diagslave [OPTIONS] [SERIALPORT]
Arguments: 
SERIALPORT    Serial port when using Modbus ASCII or Modbus RTU protocol 
              COM1, COM2 ...                on Windows 
              /dev/ttyS0, /dev/ttyS1 ...    on Linux 
General options:
-m ascii      Modbus ASCII protocol
-m rtu        Modbus RTU protocol (default if SERIALPORT set)
-m tcp        MODBUS/TCP protocol (default otherwise)
-m udp        MODBUS UDP
-m enc        Encapsulated Modbus RTU over TCP
-o #          Master activity time-out in seconds (1.0 - 100, 3 s is default)
-a #          Slave address (1-255 for RTU/ASCII, 0-255 for TCP)
Options for MODBUS/TCP, UDP and RTU over TCP:
-p #          TCP port number (502 is default)
-c #          Connection time-out in seconds (1.0 - 3600, 60 s is default)
Options for Modbus ASCII and Modbus RTU:
-b #          Baudrate (e.g. 9600, 19200, ...) (19200 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
Options for Modbus RTU:
-f #          Tolerance for inter-frame gap detection in ms (0-20)

TCP 모드 실행

./diagslave -m tcp -p 8080

See also

Favorite site