Hi,
Trying to create a simple Modbus program on a Linux system.
var modbus = require("modbus-stream");
modbus.serial.connect("/dev/ttyUSB0", { baudRate: 19200, parity: "even", dataBits: 8, stopBits: 1, debug: "automaton-123" }, (err, connection) => {
if (err) throw err;
connection.readHoldingRegisters({ address: 0x5b00, quantity: 8, extra: { unitId: 1 } }, (err, res) => {
if (err) throw err;
console.log(res); // response
})
});
And get the error in de title. Any ideas?