From 892b13a55e27a950993f3d0fafb997be5360177d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 11 八月 2020 14:25:38 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/DevpThread.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/DevpThread.java b/src/main/java/com/zy/core/thread/DevpThread.java
index 1e57bfc..03f028f 100644
--- a/src/main/java/com/zy/core/thread/DevpThread.java
+++ b/src/main/java/com/zy/core/thread/DevpThread.java
@@ -1,9 +1,9 @@
package com.zy.core.thread;
-import com.zy.common.HslCommunication.Core.Types.OperateResult;
-import com.zy.common.HslCommunication.Core.Types.OperateResultExOne;
-import com.zy.common.HslCommunication.Profinet.Siemens.SiemensPLCS;
-import com.zy.common.HslCommunication.Profinet.Siemens.SiemensS7Net;
+import HslCommunication.Core.Types.OperateResult;
+import HslCommunication.Core.Types.OperateResultExOne;
+import HslCommunication.Profinet.Siemens.SiemensPLCS;
+import HslCommunication.Profinet.Siemens.SiemensS7Net;
import com.zy.core.Slave;
import com.zy.core.ThreadHandler;
import com.zy.core.cache.MessageQueue;
@@ -72,6 +72,8 @@
public boolean connect() {
boolean result = false;
siemensS7Net = new SiemensS7Net(SiemensPLCS.S1200, slave.getIp());
+ siemensS7Net.setRack((byte) 0);
+ siemensS7Net.setSlot((byte) 1);
OperateResult connect = siemensS7Net.ConnectServer();
if(connect.IsSuccess){
result = true;
--
Gitblit v1.9.1