From 627d77af3fcc77d012160c916349adc2340a846f Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 06 五月 2024 08:21:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
index 2d0c98d..ddfdf88 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -78,16 +78,12 @@
while (this != null) {
try {
Thread.sleep(1000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
-// this.readValue();
-// String PlcAddress = this.name;
-// Integer Plccount = this.count;
+ this.readValue();
+ String PlcAddress = this.name;
+ Integer Plccount = this.count;
// 鏍规嵁鍦板潃璇诲彇PCL鏁版嵁
- List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", 71);
+ List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", Plccount);
// List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
// System.out.println(plclist);
// Boolean[] values = { false, false, true, false, true, false, true, false,
@@ -117,7 +113,8 @@
}
// 灏咺ntlist杞崲涓烘暟缁�
- // System.out.println(Intlist);
+// System.out.println(Intlist);
+// System.out.println(Intlist.toArray().length);
Integer[] shuzu1 = Intlist.toArray(new Integer[0]);
// 瀹氫箟鐨勬姤璀﹀唴瀹规暟缁�,鑾峰彇json杩斿洖鐨勯泦鍚�
@@ -140,7 +137,10 @@
}
}
}
- }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
- }
+ }
+ }
+}
--
Gitblit v1.8.0