From 09fe50d59e2f1e2261d376eb49ad6c40301f25b4 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期五, 10 五月 2024 16:08:59 +0800 Subject: [PATCH] 修改IP与数据库连接 --- 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