Skip to content

Commit

Permalink
WC-4057: Added more modbus error codes to the table.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelToh authored and sjlongland committed Feb 8, 2024
1 parent 6be368c commit 56847df
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ const TRANSACTION_TIMED_OUT_MESSAGE = "Timed out";
const TRANSACTION_TIMED_OUT_ERRNO = "ETIMEDOUT";

const modbusErrorMessages = [
"Unknown error",
"Illegal function (device does not support this read/write function)",
"Illegal data address (register not supported by device)",
"Illegal data value (value cannot be written to this register)",
"Slave device failure (device reports internal error)",
"Acknowledge (requested data will be available later)",
"Slave device busy (retry request again later)"
/*code 0=*/"Unknown error",
/*code 1=*/"Illegal function (device does not support this read/write function)",
/*code 2=*/"Illegal data address (register not supported by device)",
/*code 3=*/"Illegal data value (value cannot be written to this register)",
/*code 4=*/"Slave device failure (device reports internal error)",
/*code 5=*/"Acknowledge (requested data will be available later)",
/*code 6=*/"Slave device busy (retry request again later)",
/*code 7=*/"Negative acknowledge (slave device cannot perform programming functions)",
/*code 8=*/"Memory parity error (slave device detected a parity error in memory)",
/*code 9=*/undefined,
/*code10=*/"Gateway path unavailable (misconfigured gateway)",
/*code11=*/"Gateway target device failed to respond (retry request again later)"
];

const PortNotOpenError = function() {
Expand Down

0 comments on commit 56847df

Please sign in to comment.