From fc6fd3ebd0592735ccc1192bc3f942f19eb26a88 Mon Sep 17 00:00:00 2001 From: wangsr Date: Sat, 14 Oct 2023 21:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs | 8 ++++---- DataBlockHelper/PlcConnect.cs | 4 ++-- Main/MCEdit/Data/MCProject/nodeDataSource.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs index e013964..a8f43db 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs @@ -2,11 +2,11 @@ { public class PlcAddressUtil { - //public static string IpAddress = "172.18.4.100"; - //public static int Port = 102; + public static string IpAddress = "172.18.4.100"; + public static int Port = 102; //测试的Plc - public static string IpAddress = "192.168.0.100"; - public static int Port = 7788; + //public static string IpAddress = "192.168.0.100"; + //public static int Port = 7788; } } \ No newline at end of file diff --git a/DataBlockHelper/PlcConnect.cs b/DataBlockHelper/PlcConnect.cs index 9e699e8..fefb566 100644 --- a/DataBlockHelper/PlcConnect.cs +++ b/DataBlockHelper/PlcConnect.cs @@ -31,8 +31,8 @@ namespace DataBlockHelper { SiemensPLCS siemensPLCS = SiemensPLCS.S1500; SiemensS7Net s7 = new SiemensS7Net(siemensPLCS); - s7.IpAddress = "192.168.0.100"; - s7.Port = 7788; + s7.IpAddress = "172.18.4.100"; + s7.Port = 102; s7.ConnectServer(); return s7; } diff --git a/Main/MCEdit/Data/MCProject/nodeDataSource.xml b/Main/MCEdit/Data/MCProject/nodeDataSource.xml index 3c73a6a..3600a0d 100644 --- a/Main/MCEdit/Data/MCProject/nodeDataSource.xml +++ b/Main/MCEdit/Data/MCProject/nodeDataSource.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file