WaterSystem_MonitorServer/src/com/modbus/data/MyModbusUtils.java
@@ -147,10 +147,18 @@ public static BatchResults<Integer> readMutilRegisters(BatchRead<Integer> batch,MyModbusMaster master){ batch.setContiguousRequests(false); boolean isSuccess = true; try { return master.getMaster().send(batch); } catch (ModbusTransportException | ErrorResponseException e) { e.printStackTrace(); isSuccess = false; } finally { if(isSuccess) { master.clearError(); }else { master.addErrorCount(); } } return null; }