A Modbus TCP browser application as a command-line client.
Current version: 1.0.0
If you would like to use this tool as a global command-line client on your computer, run the below command.
npm install modbus-browser --global
- Includes a Modbus TCP compliant browser as a command-line client.
- The CLI includes an interactive terminal browser allowing to browse different dimensions of a Modbus server.
- Interactive dashboard that allows you to interactively discover the register values on the Modbus server.
- Useful for testing and prototyping with Modbus TCP clients against industrial devices.
The Modbus command-line client can be globally installed on your computer and allows you to query different types of registers on a remote Modbus TCP server. You can specify the host, port and unit identifier to use as part of the connection as well as the type of register (e.g coils, discrete inputs, etc.) and the mode (read or write).
Below is a description of the different commands you can use with the Modbus browser command-line client.
After installing this package, you can run the modbus-browser
command to list all of the commands it implements along with their description.
-h, --help
- Displays the help menu for this command.
The read-coils
command can output a hexadecimal dump of the given amount of coils located at a given address on the remote server.
modbus-browser read-coils \
--server <hostname> \
--port 502
--start-address 1
--count 64
-s, --server <hostname>
- The hostname or IP address of the Modbus server to initiate a connection to.-p, --port <port>
- The port of the Modbus server to initiate a connection to (set to502
by default).-u, --unit-id <unitId>
- The unit identifier to perform the action on (set to1
by default).-a, --start-address <address>
- The start address of the coil(s) to be read.-c, --count <count>
- The amount of bits to be read.-m, --monitor
- Causes themobus-browser
to continuously monitor the coils at the given address.-i, --interval <interval>
- Specifies the interval in milliseconds at whichmobus-browser
is continuously dumping the coils values when monitoring is enabled.-h, --help
- Displays the help menu for this command.
The read-holding-registers
command can output a hexadecimal dump of the given amount of holding registers located at a given address on the remote server.
modbus-browser read-holding-registers \
--server <hostname> \
--port 502
--start-address 40001
--count 64
-s, --server <hostname>
- The hostname or IP address of the Modbus server to initiate a connection to.-p, --port <port>
- The port of the Modbus server to initiate a connection to (set to502
by default).-u, --unit-id <unitId>
- The unit identifier to perform the action on (set to1
by default).-a, --start-address <address>
- The start address of the holding register(s) to be read.-c, --count <count>
- The amount of bytes to be read.-m, --monitor
- Causes themobus-browser
to continuously monitor the holding registers values at the given address.-i, --interval <interval>
- Specifies the interval in milliseconds at whichmobus-browser
is continuously dumping the holding registers values when monitoring is enabled.-h, --help
- Displays the help menu for this command.
The read-discrete-inputs
command can output a hexadecimal dump of the given amount of inputs located at a given address on the remote server.
modbus-browser read-discrete-inputs \
--server <hostname> \
--port 502
--start-address 40001
--count 64
-s, --server <hostname>
- The hostname or IP address of the Modbus server to initiate a connection to.-p, --port <port>
- The port of the Modbus server to initiate a connection to (set to502
by default).-u, --unit-id <unitId>
- The unit identifier to perform the action on (set to1
by default).-a, --start-address <address>
- The start address of the discrete input(s) to be read.-c, --count <count>
- The amount of bits to be read.-m, --monitor
- Causes themobus-browser
to continuously monitor the discrete input values at the given address.-i, --interval <interval>
- Specifies the interval in milliseconds at whichmobus-browser
is continuously dumping the discrete input values when monitoring is enabled.-h, --help
- Displays the help menu for this command.
The read-input-registers
command can output a hexadecimal dump of the given amount of inputs located at a given address on the remote server.
modbus-browser read-input-registers \
--server <hostname> \
--port 502
--start-address 40001
--count 64
-s, --server <hostname>
- The hostname or IP address of the Modbus server to initiate a connection to.-p, --port <port>
- The port of the Modbus server to initiate a connection to (set to502
by default).-u, --unit-id <unitId>
- The unit identifier to perform the action on (set to1
by default).-a, --start-address <address>
- The start address of the input register(s) to be read.-c, --count <count>
- The amount of bytes to be read.-m, --monitor
- Causes themobus-browser
to continuously monitor the input register values at the given address.-i, --interval <interval>
- Specifies the interval in milliseconds at whichmobus-browser
is continuously dumping the input register values when monitoring is enabled.-h, --help
- Displays the help menu for this command.
The dashboard
command opens an interactive browser in your terminal allowing you to browse values associated with different Modbus registers.
modbus-browser dashboard \
--server <hostname> \
--port 502
-s, --server <hostname>
- The hostname or IP address of the Modbus server to initiate a connection to.-p, --port <port>
- The port of the Modbus server to initiate a connection to (set to502
by default).-u, --unit-id <unitId>
- The unit identifier to perform the action on (set to1
by default).-h, --help
- Displays the help menu for this command.
- The node-modbus library documentation used by the
modbus-browser
command-line client.