改地址

dep_nodyang
wangsr 1 year ago
parent a2ab66c4cc
commit fc6fd3ebd0

@ -2,11 +2,11 @@
{ {
public class PlcAddressUtil public class PlcAddressUtil
{ {
//public static string IpAddress = "172.18.4.100"; public static string IpAddress = "172.18.4.100";
//public static int Port = 102; public static int Port = 102;
//测试的Plc //测试的Plc
public static string IpAddress = "192.168.0.100"; //public static string IpAddress = "192.168.0.100";
public static int Port = 7788; //public static int Port = 7788;
} }
} }

@ -31,8 +31,8 @@ namespace DataBlockHelper
{ {
SiemensPLCS siemensPLCS = SiemensPLCS.S1500; SiemensPLCS siemensPLCS = SiemensPLCS.S1500;
SiemensS7Net s7 = new SiemensS7Net(siemensPLCS); SiemensS7Net s7 = new SiemensS7Net(siemensPLCS);
s7.IpAddress = "192.168.0.100"; s7.IpAddress = "172.18.4.100";
s7.Port = 7788; s7.Port = 102;
s7.ConnectServer(); s7.ConnectServer();
return s7; return s7;
} }

@ -1,3 +1,3 @@
<DataSources> <DataSources>
<DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="192.168.0.100" UserName="sa" Password="123456" DataBase="CWSSHG" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" /> <DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="127.0.0.1" UserName="sa" Password="123456" DataBase="CWSSHG" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
</DataSources> </DataSources>
Loading…
Cancel
Save