node-modbus-serial
node-modbus-serial copied to clipboard
A pure JavaScript implemetation of MODBUS-RTU (and TCP) for NodeJS
```javascript servers\serverserial.js class ServerSerial extends EventEmitter { ... modbus._server.on("data", function(data) { let recvBuffer = Buffer.from([]); modbusSerialDebug({ action: "socket data", data: data }); recvBuffer = Buffer.concat([recvBuffer, data], recvBuffer.length + data.length); while...
This attempts to reduce the likelihood of the problem described in #540, but unfortunately doesn't completely fix it. * For every data we sent via the Modbus TCP socket we...
Hi maintainers :wave:, I'm suggesting an upgrade to the `serialport` package dependency in this project. The current version used is outdated, and upgrading to `serialport@13` would bring several benefits: ###...
According the TypeScript definitions, `IServiceVector::getMultipleHoldingRegisters()` support returning `Promise`. However, when this is used, the return length check in `servertcp_handler.js::300` will always fail. The corresponding code part is: const values =...
We currently hook into the ```client.on('close', () =>``` events for our reconnect logic, and after version v8.0.19 the event is not being emitted due to #578 . I've been able...
I'm trying to use latest `8.0.20-no-serial-port` version in an ESM project It does indeed require `serialport` in multiple occasions, making the whole package less portable (I'm bundling a Node app...
I looked through various examples and documentation and found that a slave cannot actively send a frame of data to the master, but this can be useful in certain scenarios,...

Hi, first of all thanks for the project. I would like to report an issue that I now traced back to the 8.0.18 version update. In particular to [this commit](https://github.com/yaacov/node-modbus-serial/commit/664980634c6a1c1906eff177e3c2a5f0b2b460d8)....
When I try to run the following code the process exits (note the `while (true)` loop around the connection code): ```python const modbus = require('modbus-serial'); const ip = '127.0.0.1'; const...