From 47f9d4a231a116f528f9d18d738420dba7f753bd Mon Sep 17 00:00:00 2001 From: 严智鑫 <test> Date: 星期三, 26 三月 2025 23:43:15 +0800 Subject: [PATCH] 成功使用ModbusTcp,S7连接设备并且存储到数据库 --- nglib/src/builder/ThreadHttpServer.java | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/nglib/src/builder/ThreadHttpServer.java b/nglib/src/builder/ThreadHttpServer.java index 5a3e1f1..dad79d5 100644 --- a/nglib/src/builder/ThreadHttpServer.java +++ b/nglib/src/builder/ThreadHttpServer.java @@ -5,8 +5,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import S7.S7control; -import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType; import com.sun.net.httpserver.*; public class ThreadHttpServer { @@ -16,9 +14,6 @@ private static final String Httpcontext="/demo"; private static final int nThreads=8; public static void mains() { - System.out.println("S7链接"); - S7control s7=new S7control(EPlcType.S1500, "192.168.30.14", 102, 0, 0); - System.out.println("S7:"+s7.readByte("DB34.0", 2)); HttpServer httpServer; try { httpServer=HttpServer.create(new InetSocketAddress(port),0); -- Gitblit v1.8.0