From 58d7b0e12ccd92cf3934f6582b51b5fbcecaa39a Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 09 五月 2024 09:42:41 +0800
Subject: [PATCH] 修改注入方式
---
springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java b/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
index da7aa1c..544ba9d 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/InitUtil.java
@@ -14,6 +14,7 @@
import java.util.List;
public class InitUtil {
+ //鍒濆鍖杦ord
public static PlcParameterObject initword(String jsonFilePath) {
try {
FileReader fileReader = new FileReader(jsonFilePath);
@@ -47,8 +48,8 @@
plcParameterObject.addPlcParameter(plcParameterInfo);
}
// byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02};
- byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
- plcParameterObject.setPlcParameterList(getplcvlues);
+ // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
+ // plcParameterObject.setPlcParameterList(getplcvlues);
return plcParameterObject;
} catch (IOException e) {
@@ -57,7 +58,7 @@
return null;
}
-
+ //鍒濆鍖朾it
public static PlcBitObject initbit(String jsonFilePath) {
PlcBitObject plcBitObject = new PlcBitObject();
@@ -103,7 +104,7 @@
return plcBitObject;
}
-
+//
public static void readAndUpdateBitValues(PlcBitObject plcBitObject) {
// Boolean[] values1 = { false, true, true, true, false, false, true, false,
--
Gitblit v1.8.0