Update nymea-modbus-cli documentation
parent
25671f284b
commit
1ba1c72dc9
|
|
@ -1,33 +1,79 @@
|
||||||
# nymea-modbus-cli
|
# nymea-modbus-cli
|
||||||
|
|
||||||
The nymea-modbus-cli tools is a command line tool for tsting modbus TCP communication in the local network.
|
The nymea-modbus-cli tools is a command line tool for testing modbus TCP/RTU communication.
|
||||||
|
|
||||||
As of now, the tool allows to establish a modbus TCP connection to a server and read any type of register from the server.
|
The tool allows to read or write registers in a generic way.
|
||||||
|
|
||||||
Following options are available:
|
Following options are available:
|
||||||
|
|
||||||
Usage: nymea-modbus-cli [options]
|
```
|
||||||
|
Usage: nymea-modbus-cli [options]
|
||||||
Tool for testing and reading Modbus TCP registers.
|
|
||||||
|
Tool for testing and reading Modbus TCP or RTU registers.
|
||||||
Copyright © 2016 - 2022 nymea GmbH <contact@nymea.io>
|
|
||||||
|
Copyright © 2016 - 2023 nymea GmbH <contact@nymea.io>
|
||||||
|
|
||||||
Options:
|
TCP
|
||||||
-h, --help Displays this help.
|
-----------------------------------------
|
||||||
-v, --version Displays version information.
|
Example reading 2 holding registers from address 1000:
|
||||||
-a, --address <address> The IP address of the modbus
|
nymea-modbus-cli -a 192.168.0.10 -p 502 -r 1000 -l 2
|
||||||
TCP server.
|
|
||||||
-p, --port <port> The port of the modbus TCP
|
RTU
|
||||||
server. Default is 502.
|
-----------------------------------------
|
||||||
-m, --modbus-address <id> The modbus server address on
|
|
||||||
the bus (slave ID). Default is
|
Typical baudrates:
|
||||||
1.
|
- 1200
|
||||||
-t, --type <input, holding, discrete, coils> The type of the modbus
|
- 2400
|
||||||
register. Default is holding.
|
- 4800
|
||||||
-r, --register <register> The number of the modbus
|
- 9600
|
||||||
register.
|
- 19200
|
||||||
-l, --length <length> The number of registers to
|
- 38400
|
||||||
read. Default is 1.
|
- 57600
|
||||||
-d, --debug Print more information.
|
- 115200
|
||||||
|
|
||||||
|
Example reading 2 holding registers from address 1000:
|
||||||
|
nymea-modbus-cli --serial /dev/ttyUSB0 --baudrate 9600 -r 1000 -l 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Displays help on commandline
|
||||||
|
options.
|
||||||
|
--help-all Displays help including Qt
|
||||||
|
specific options.
|
||||||
|
-v, --version Displays version information.
|
||||||
|
-a, --address <address> TCP: The IP address of the
|
||||||
|
modbus TCP server.
|
||||||
|
-p, --port <port> TCP: The port of the modbus TCP
|
||||||
|
server. Default is 502.
|
||||||
|
--serial <port> RTU: The serial port to use for
|
||||||
|
the RTU communication.
|
||||||
|
--baudrate <baudrate> RTU: The baudrate for the RTU
|
||||||
|
communication. Default is 19200.
|
||||||
|
--parity <parity> RTU: The parity for the RTU
|
||||||
|
communication. Allowed values
|
||||||
|
are [none, even, odd, space,
|
||||||
|
mark]. Default is none.
|
||||||
|
--databits <databits> RTU: The amount of data bits
|
||||||
|
for the RTU communication.
|
||||||
|
Allowed values are [5, 6, 7, 8].
|
||||||
|
Default is 8.
|
||||||
|
--stopbits <stopbits> RTU: The amount of stop bits
|
||||||
|
for the RTU communication.
|
||||||
|
Allowed values are [1, 1.5, 2].
|
||||||
|
Default is 1.
|
||||||
|
--list-serials List the available serial ports
|
||||||
|
on this host.
|
||||||
|
-m, --modbus-address <id> The modbus server address on
|
||||||
|
the bus (slave ID). Default is
|
||||||
|
1.
|
||||||
|
-t, --type <input, holding, discrete, coils> The type of the modbus
|
||||||
|
register. Default is holding.
|
||||||
|
-r, --register <register> The number of the modbus
|
||||||
|
register.
|
||||||
|
-l, --length <length> The number of registers to
|
||||||
|
read. Default is 1.
|
||||||
|
-w, --write <data> The data to be written to the
|
||||||
|
given register.
|
||||||
|
-d, --debug Print more information.
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue