|
|
|
|
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; }
|
|
|
|
|
}
|
|
|
|
|
}
|