读取Db3000Help

dep_nodyang
nodyang 1 year ago
parent 87009dfd0b
commit a4cd1b8cf5

@ -0,0 +1,32 @@
using System.Collections.Generic;
using HslCommunication;
namespace DataBlockHelper.DBHelpers
{
public class Db3000Helper
{
public static List<bool> ReadDb()
{
List<bool> ls = new List<bool>();
var operateResult = PlcConnect.Instance.Read("DB3000.0.0",1);
if (operateResult.IsSuccess)
{
var context = operateResult.Content;
for (var i = 0; i < 6; i++)
{
var bo= context.GetBoolByIndex(i);
ls.Add(bo);
}
}
return ls;
}
}
}

@ -55,6 +55,7 @@
<Compile Include="DBHelpers\DB2105Helper.cs" /> <Compile Include="DBHelpers\DB2105Helper.cs" />
<Compile Include="DBHelpers\DB2106Helper.cs" /> <Compile Include="DBHelpers\DB2106Helper.cs" />
<Compile Include="DBHelpers\DB2119Helper.cs" /> <Compile Include="DBHelpers\DB2119Helper.cs" />
<Compile Include="DBHelpers\Db3000Helper.cs" />
<Compile Include="DBHelpers\DB90Helper.cs" /> <Compile Include="DBHelpers\DB90Helper.cs" />
<Compile Include="DBHelpers\DB91Helper.cs" /> <Compile Include="DBHelpers\DB91Helper.cs" />
<Compile Include="DBHelpers\DB2107Helper.cs" /> <Compile Include="DBHelpers\DB2107Helper.cs" />

Loading…
Cancel
Save