Skip to content
Yaacov Zamir edited this page Mar 4, 2017 · 5 revisions

modbus-serial master

A pure JavaScript implemetation of MODBUS-RTU (and TCP) master for NodeJS

npm Build Status

This class makes ModbusRTU (and TCP) calls fun and easy.

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.



Install

npm install modbus-serial

For use over serial port (ModbusRTU), also install node-serialport:

npm install serialport

What can I do with this module ?

This class makes it fun and easy to communicate with electronic devices such as irrigation controllers, protocol droids and robots. It talks with 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:

Arduino sketch for irrigation timer with modbus support:

Node Modbus-WebSocket bridge:

Compatibility

This class implements:
  • 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"
Connects types:
  • modbus-RTU (modbus-rtu): Over serial line [require node serialport].
  • modbus-ASCII (modbus-ascii): Over serial line [require node serialport].
  • modbus-TCP (modbus-tcp): Over TCP/IP line.
  • modbus-RTU (telnet): Over Telnet server, TCP/IP serial bridge.
  • modbus-RTU (buffered): Over buffered serial line [require node serialport].
  • modbus-RTU (C701): Over C701 server, commercial UDP to serial bridge.
Clone this wiki locally