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> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
@ -59,10 +63,5 @@
<ItemGroup> <ItemGroup>
<Folder Include="Impl\" /> <Folder Include="Impl\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="HslCommunication">
<Version>12.1.3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

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

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

Loading…
Cancel
Save