node-modbus-serial icon indicating copy to clipboard operation
node-modbus-serial copied to clipboard

on disconnecting rs485, no error message

Open mitch85 opened this issue 4 years ago • 0 comments

when i try to readHoldingRegisters I get the data. But when I disconnect the rs485, nothing happens, no a bit of message .. it seems like the promise do not fire the catch() block.. also not the then() block.

getAkytecFW = () => {
  return client
    .readHoldingRegisters(2, 4)
    .then((data) => {
      console.log(data);
      return data.buffer.readUIntBE(0, 2);
    })
    .catch((e) => {
      console.log(e);
    });
};

the same when I try to writeRegister... also no Errors

mitch85 avatar Nov 12 '20 09:11 mitch85