-
-
Notifications
You must be signed in to change notification settings - Fork 239
Home
A pure JavaScript implementation of MODBUS-RTU (Serial and TCP) for NodeJS.
Modbus is a serial communications protocol, first used in 1979. Modbus is simple and robust, openly published, royalty-free and easy to deploy and maintain.
This package makes Modbus calls and serve fun and easy.
npm install modbus-serial
try these options on npm install to build, if you have problems to install
--unsafe-perm --build-from-source
For use over serial port (ModbusRTU), also install node-serialport:
npm install [email protected]
This class makes it fun and easy to communicate with electronic devices such as irrigation controllers, protocol droids and robots. It talks to devices that use a serial line (e.g. RS485, RS232). Many industrial electronic devices implement modbus. Arduino can also talk modbus and you can control your projects and robots using modbus.
Arduino libraries for modbus slave:
- https://github.com/yaacov/arduino-modbus-slave
- https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino
Arduino sketch for irrigation timer with modbus support:
Node Modbus-WebSocket bridge:
- FC1 "Read Coil Status"
- FC2 "Read Input Status"
- FC3 "Read Holding Registers"
- FC4 "Read Input Registers"
- FC5 "Force Single Coil"
- FC6 "Preset Single Register"
- FC15 "Force Multiple Coil"
- FC16 "Preset Multiple Registers"
- modbus-RTU (SerialPort): Over serial line [require node serialport].
- modbus-RTU (RTUBufferedPort): Over buffered serial line [require node serialport].
- modbus-ASCII (AsciiPort): Over serial line [require node serialport].
- modbus-TCP (TcpPort): Over TCP/IP line.
- modbus-RTU (UdpPort): Over C701 server, commercial UDP to serial bridge.
- modbus-RTU (TcpRTUBufferedPort): Over TCP/IP line, TCP/IP serial RTU buffered device.
- modbus-RTU (TelnetPort): Over Telnet server, TCP/IP serial bridge.
- modbus-TCP (ServerTCP): Over TCP/IP line.