DB137Helper

dep_deliver
我叫锄头 1 year ago
parent 33efbf0661
commit 12c3e2c325

@ -82,6 +82,8 @@ namespace Mesnac.Action.ChemicalWeighing.Test
var list= MReadHelp.Read();
new DB137Helper();
DB120WriteHelp.AddABCDEF(new Uhd()
{
A = 60,

@ -0,0 +1,50 @@
using HslCommunication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataBlockHelper.DBHelpers
{
public class DB137Helper : DBHelper
{
public DB137Helper() {
OperateResult<byte[]> db = PlcConnect.Instance.Read("DB137.0.0", 14);
bytes = db.Content;
var trans = PlcConnect.Instance.ByteTransform;
var tyb = bytes.Skip(0).Take(1).First();
HighLevel01 = tyb.GetBit(0);
HighLevel02 = tyb.GetBit(1);
HighLevel03 = tyb.GetBit(2);
Excitation01 = tyb.GetBit(3);
Excitation02 = tyb.GetBit(4);
Excitation03= tyb.GetBit(5);
SideBlowing01=tyb.GetBit(6);
SideBlowing02=tyb.GetBit(7);
tyb = bytes.Skip(1).Take(1).First();
SideBlowing03 = tyb.GetBit(0);
}
public bool HighLevel01 { get; set; }
public bool HighLevel02 { get; set; }
public bool HighLevel03 { get; set; }
public bool Excitation01 { get; set; }
public bool Excitation02 { get; set; }
public bool Excitation03 { get; set; }
public bool SideBlowing01 { get; set; }
public bool SideBlowing02 { get; set; }
public bool SideBlowing03 { get; set; }
}
}

@ -52,6 +52,7 @@
<Compile Include="DBHelpers\DB112WriterHelper.cs" />
<Compile Include="DBHelpers\DB120Help.cs" />
<Compile Include="DBHelpers\DB120WriteHelp.cs" />
<Compile Include="DBHelpers\DB137Helper.cs" />
<Compile Include="DBHelpers\DB1Helper.cs" />
<Compile Include="DBHelpers\DB2102Helper.cs" />
<Compile Include="DBHelpers\DB2103Helper.cs" />

Loading…
Cancel
Save