diff --git a/Aucma.Core.BoxFoam/appsettings.json b/Aucma.Core.BoxFoam/appsettings.json index 9e3294d3..eb78b1cd 100644 --- a/Aucma.Core.BoxFoam/appsettings.json +++ b/Aucma.Core.BoxFoam/appsettings.json @@ -214,11 +214,11 @@ "Port": 102 }, { - "Id": 2, + "Id": 3, "EquipName": "foamMachinePlc", "PlcType": "Siemens", "Enabled": true, - "IP": "127.0.0.1", + "IP": "10.10.93.180", "Port": 102 } ], diff --git a/Aucma.Core.HwPLc/Impl/SiemensPlc.cs b/Aucma.Core.HwPLc/Impl/SiemensPlc.cs index 2dfc82cd..279b9957 100644 --- a/Aucma.Core.HwPLc/Impl/SiemensPlc.cs +++ b/Aucma.Core.HwPLc/Impl/SiemensPlc.cs @@ -15,7 +15,7 @@ namespace Aucma.Core.HwPLc { private readonly log4net.ILog log = LogManager.GetLogger(typeof(MelsecPlc)); private SiemensS7Net siemensS7Net; - private SiemensPLCS siemensPLCS = SiemensPLCS.S1200; + private SiemensPLCS siemensPLCS = SiemensPLCS.S1500; #region 构造函数 //public MelsecPlc() @@ -37,6 +37,7 @@ namespace Aucma.Core.HwPLc // return; //} Console.WriteLine("HwCommunication激活成功!"); + siemensS7Net = new SiemensS7Net(siemensPLCS); siemensS7Net.ConnectTimeOut = 2000; Connect(iP, port);//建立连接 @@ -75,7 +76,7 @@ namespace Aucma.Core.HwPLc /// public bool Connect(string iP, int port) { - //siemensS7Net.IpAddress = iP;//正式环境开启 + siemensS7Net.IpAddress = iP;//正式环境开启 siemensS7Net.Port = port; try {