You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Change settings of your Arduino-based Modbus RTU to Modbus TCP/UDP gateway via w
30
30
- send Modbus request and recieve Modbus response
31
31
- scan Modbus slaves on RS485 interface
32
32
- queue (buffer) status
33
-
- error counts
33
+
- error counters (stored in EEPROM)
34
34
- content of the Modbus Status page is updated in the background (fetch API), javascript alert is shown if connection is lost
35
35
* optimized TCP socket management (web interface and Modbus TCP):
36
36
- gateway always listens for new web and Modbus TCP connections
@@ -73,7 +73,7 @@ Change settings of your Arduino-based Modbus RTU to Modbus TCP/UDP gateway via w
73
73
74
74
**Requests Queue**. Monitors internal request queue (buffer). The limits for bytes and for the number of requests stored in the queue can be configured in advanced settings.
75
75
76
-
**Modbus Statistics**. Counters for various errors. Insigned longs are used, rollover of counters is synchronized:
76
+
**Modbus Statistics**. Counters for various errors. Counters are periodically saved to EEPROM. Insigned longs are used, rollover of counters is synchronized:
77
77
***Slave Responded**. Slave responded with a valid Modbus RTU response within response timeout.
78
78
***Slave Responded with Error (Codes 1~8)**. Slave responded, but with an error. For the list of error codes see https://en.wikipedia.org/wiki/Modbus#Exception_responses.
79
79
***Gateway Overloaded (Code 10)**. Request queue is full (either the number of bytes stored or the number of requests stored). Request was dropped and the gateway responded with an error code 10.
unsignedlong lastSocketUse[MAX_SOCK_NUM] = { 0, 0, 0, 0, 0, 0, 0, 0 };// +rs 03Feb2019 - records last interaction involving each socket to enable detecting sockets unused for longest time period
unsignedlong lastSocketUse[MAX_SOCK_NUM] = { 0, 0, 0, 0 };// +rs 03Feb2019 - records last interaction involving each socket to enable detecting sockets unused for longest time period
byte addressPos = 6 * !localConfig.enableRtuOverTcp; // position of slave address in the incoming TCP/UDP message (0 for Modbus RTU over TCP/UDP and 6 for Modbus RTU over TCP/UDP)
153
153
if (localConfig.enableRtuOverTcp) { // check CRC for Modbus RTU over TCP/UDP
154
154
if (checkCRC(inBuffer, msgLength) == false) {
155
-
errorTcpCount++;
155
+
errorCount[ERROR_TCP]++;
156
156
return0; // drop request and do not return any error code
if (status != SLAVE_ERROR_0B_QUEUE && isScan == false) errorCount[status]++; // there is no counter for SLAVE_ERROR_0B_QUEUE, ignor scans in statistics
0 commit comments