Browse Source

提示修改

jwk 2 years ago
parent
commit
e7549ceee3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/java/com/jwk/spring/boot/modbus4j/ModbusTcpMaster.java

+ 2 - 1
src/main/java/com/jwk/spring/boot/modbus4j/ModbusTcpMaster.java

@@ -69,9 +69,10 @@ public class ModbusTcpMaster {
                 master = modbusFactory.createTcpMaster(params, true);
                 master.init();
                 modbusMasterUtil = new ModbusMasterUtil(master);
+                log.error("ModbusTcp:{}:{},连接成功!", getHost(), getPort());
                 break;
             } catch (Exception e) {
-                log.error("当前串口:{},打开失败!", getPort(), e);
+                log.error("当前地址:{}:{},连接失败!", getHost(), getPort(), e);
                 try {
                     Thread.sleep(3000);
                 } catch (InterruptedException ee) {