From be5351fe3cc2714756ae43ab272cf8813cb0fe98 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 13 九月 2023 14:47:40 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
index d416822..96ac83d 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
@@ -15,11 +15,12 @@
e.printStackTrace();
}
- List<Short> paramlist = S7control.getinstance().ReadWord("DB100.DBW", 12);
+ List<Short> arraylist = S7control.getinstance().ReadWord("DB100.DBW0", 12);
List<Short> state = S7control.getinstance().ReadWord("DB103.DBW0", 10);
JSONObject jsonObject = new JSONObject();
- jsonObject.append("params", new short[]{1111,121, 3232, 0, 1, 0, 1, 0, 1, 0, 1, 0});
- jsonObject.append("state", new short[]{0, 1, 0, 0, 0, 0, 0,0, 0, 0});
+// new short[]{1111,121, 3232, 0, 1, 0, 1, 0, 1, 0, 1, 0}
+ jsonObject.append("params", arraylist );
+ jsonObject.append("state", state);
WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
if (sendwServer != null) {
sendwServer.sendMessage(jsonObject.toString());
--
Gitblit v1.8.0