From 3eb2e3a7f3f40f48c8a44bf32e7b0baeee065921 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 20 十二月 2023 13:34:34 +0800
Subject: [PATCH] 添加终止任务功能

---
 springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java b/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
index 896be4c..16fa085 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PLCManualJog.java
@@ -33,26 +33,18 @@
             } catch (InterruptedException e) {
                 e.printStackTrace();
             }
-            // this.readValue();
-            // String PlcAddress = this.name;
-            // Integer Plccount = this.count;
-
-            // System.out.println(stt);
 
 
-            List<String> addressList21 = Arrays.asList(config.getProperty("PLCManualJog.button").split(","));
 
+           List<String> addressList21 = Arrays.asList(config.getProperty("PLCManualJog.button").split(","));
+         List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
 
-            List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
+//             Boolean[] values1 = { false, true, true, true, false, false, true, false,
+//             false, true, true, true, false, false,
+//             true, false,false, true, true, true, false, false, true, false,
+//                     false, true, false, true };
+//             List<Boolean> arraylist = new ArrayList<>(Arrays.asList(values1));
 
-            // Boolean[] values1 = { false, true, true, true, false, false, true, false,
-            // false, true, true, true, false, false,
-            // true, false };
-            // List<Boolean> arraylist = new ArrayList<>(Arrays.asList(values1));
-            // Boolean[] values2 = { false, true, true, true, false, false, true, false };
-            // List<Boolean> arraylist2 = new ArrayList<>(Arrays.asList(values2));
-            // Boolean[] values3 = { false, false };
-            // List<Boolean> arraylist3 = new ArrayList<>(Arrays.asList(values3));
 
 
             JSONObject jsonObject = new JSONObject();
@@ -109,13 +101,13 @@
                             List<Boolean> bolList = new ArrayList<>();
 
 
-                            for (int i = 0; i < 26 && i < messageBooleans.size(); i++) {
+                            for (int i = 0; i < 28 && i < messageBooleans.size(); i++) {
                                 bolList.add(messageBooleans.get(i));
                             }
 
 
                             if (!bolList.isEmpty()) {
-                                S7control.getinstance().WriteBit(addressList21, bolList);
+                           S7control.getinstance().WriteBit(addressList21, bolList);
                                 System.out.println("messageValue锛�" + bolList + " written to PLC at address " + addressList21);
                             }
 

--
Gitblit v1.8.0