1
0
Fork 0
# Conflicts:
#	HighWayIot.Plc/PlcConnect.cs
master
SoulStar 4 weeks ago
commit 3f6ff46246

File diff suppressed because it is too large Load Diff

@ -32,6 +32,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="HslCommunication, Version=12.1.3.0, Culture=neutral, PublicKeyToken=3d72ad3b6b5ec0e3, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\HighWayIot.Library\HslCommunication.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -59,10 +63,5 @@
<ItemGroup>
<Folder Include="Impl\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HslCommunication">
<Version>12.1.3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -38,6 +38,10 @@ namespace HighWayIot.Plc
};
var a = plc.ConnectServer();
logHelper.Info($"Plc连接 信息:[{a.Message}] 是否成功:[{a.IsSuccess.ToString()}] 错误代码:[{a.ErrorCode}]");
if (!reslt.IsSuccess)
{
logHelper.Info("链接失败:"+reslt.Message);
}
}
catch (Exception ex)
{

@ -31,7 +31,7 @@ namespace HighWayIot.Winform
//Console.OutputEncoding = System.Text.Encoding.UTF8;
//Console.InputEncoding = System.Text.Encoding.UTF8;
var b= PlcConnect.IsConnect;
AllocConsole();//调用系统API调用控制台窗口
// 设置控制台编码为系统默认编码(解决乱码问题)

Loading…
Cancel
Save