From a5a49ece3191bf8210c42b522503687cedb420c2 Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期二, 26 十二月 2023 16:55:40 +0800 Subject: [PATCH] 修改input通过光标焦点是否在input内控制是否更新数据,回车下发参数让input失去焦点更新数据 --- springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java index 92ed72d..e48d3c0 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java +++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java @@ -49,7 +49,7 @@ List<String> addressList1 = Arrays.asList(config.getProperty("Parameter2.id").split(",")); List<String> paramlist = S7control.getinstance().readStrings(addressList1); - + // System.out.println("addressList锛�" + paramlist); //鎵嬪姩鐘舵�� List<String> addresses = Arrays.asList(config.getProperty("Parameter2.state").split(",")); @@ -215,7 +215,7 @@ } } } - } + } // 妫�鏌ュ竷灏斿�煎垪琛ㄦ槸鍚︿负绌� if (!sValue.isEmpty()) { @@ -224,6 +224,7 @@ S7control.getinstance().WriteBit(addressList0, sValue); System.out.println("Values " + sValue + " written to PLC at address " + addressList0); } + } } } catch (Exception e) { System.err.println("An error occurred while writing bit to PLC: " + e.getMessage()); -- Gitblit v1.8.0