https://github.com/yaacov/node-modbus-cli
A Modbus client writen in JavaScrip
https://github.com/yaacov/node-modbus-cli
Last synced: 2 months ago
JSON representation
A Modbus client writen in JavaScrip
- Host: GitHub
- URL: https://github.com/yaacov/node-modbus-cli
- Owner: yaacov
- License: mit
- Created: 2017-01-30T12:51:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T10:56:09.000Z (over 8 years ago)
- Last Synced: 2025-06-28T13:45:00.785Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-modbus-cli
A Modbus client writen in JavaScript## Introduction
Utility script for accessing Modbus devices. Many hobby devices and PLC controllers speak Modbus.
## Installation
To install, run ``npm install`` if you install from source code, or ``npm install modbus-cli``.
## Usage
The `-h` flag will print out a help text, that list the command line arguments.
```bash
modbus-cli -hUsage: modbus-cli [options]
Commands:
read Read holding registers
readi Read input registers
force force single coilOptions:
--config Path to JSON config file
-h, --help Show help [boolean]Examples:
modbus-cli read -u 192.168.1.11 -a 5```
### Querying Holding Registers
Read Holding registers.```bash
modbus-cli read -u 192.168.1.11 -a 5
modbus-cli read -u /dev/ttyUSB0 -a 0 -l 4
```### Querying Input Registers
Read Holding registers.```bash
modbus-cli readi -u 192.168.1.11 -a 5
modbus-cli readi -u /dev/ttyUSB0 -a 0 -l 4
```### Force one Coil
Force one Coil.```bash
modbus-cli force -u 192.168.1.11 -a 5 -v 0
modbus-cli force -u /dev/ttyUSB0 -a 0 -v 1
```