npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

modbus-browser

v1.0.0

Published

🔦 A Modbus TCP browser application as a command-line client.

Downloads

19

Readme

modbus-browser

A Modbus TCP browser application as a command-line client.

DeepSource

Current version: 1.0.0

📋 Table of content

🚀 Install

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

🔖 Features

  • 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.

🛠 Usage

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.

Describing commands and options

After installing this package, you can run the modbus-browser command to list all of the commands it implements along with their description.

Options

  • -h, --help - Displays the help menu for this command.

read-coils

The read-coils command can output a hexadecimal dump of the given amount of coils located at a given address on the remote server.

Example

modbus-browser read-coils \
  --server <hostname> \
  --port 502
  --start-address 1
  --count 64

Options

  • -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 to 502 by default).
  • -u, --unit-id <unitId> - The unit identifier to perform the action on (set to 1 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 the mobus-browser to continuously monitor the coils at the given address.
  • -i, --interval <interval> - Specifies the interval in milliseconds at which mobus-browser is continuously dumping the coils values when monitoring is enabled.
  • -h, --help - Displays the help menu for this command.

read-holding-registers

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.

Example

modbus-browser read-holding-registers \
  --server <hostname> \
  --port 502
  --start-address 40001
  --count 64

Options

  • -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 to 502 by default).
  • -u, --unit-id <unitId> - The unit identifier to perform the action on (set to 1 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 the mobus-browser to continuously monitor the holding registers values at the given address.
  • -i, --interval <interval> - Specifies the interval in milliseconds at which mobus-browser is continuously dumping the holding registers values when monitoring is enabled.
  • -h, --help - Displays the help menu for this command.

read-discrete-inputs

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.

Example

modbus-browser read-discrete-inputs \
  --server <hostname> \
  --port 502
  --start-address 40001
  --count 64

Options

  • -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 to 502 by default).
  • -u, --unit-id <unitId> - The unit identifier to perform the action on (set to 1 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 the mobus-browser to continuously monitor the discrete input values at the given address.
  • -i, --interval <interval> - Specifies the interval in milliseconds at which mobus-browser is continuously dumping the discrete input values when monitoring is enabled.
  • -h, --help - Displays the help menu for this command.

read-input-registers

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.

Example

modbus-browser read-input-registers \
  --server <hostname> \
  --port 502
  --start-address 40001
  --count 64

Options

  • -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 to 502 by default).
  • -u, --unit-id <unitId> - The unit identifier to perform the action on (set to 1 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 the mobus-browser to continuously monitor the input register values at the given address.
  • -i, --interval <interval> - Specifies the interval in milliseconds at which mobus-browser is continuously dumping the input register values when monitoring is enabled.
  • -h, --help - Displays the help menu for this command.

dashboard

The dashboard command opens an interactive browser in your terminal allowing you to browse values associated with different Modbus registers.

Example

modbus-browser dashboard \
  --server <hostname> \
  --port 502

Options

  • -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 to 502 by default).
  • -u, --unit-id <unitId> - The unit identifier to perform the action on (set to 1 by default).
  • -h, --help - Displays the help menu for this command.

👀 See also

  • The node-modbus library documentation used by the modbus-browser command-line client.