|
|
@ -11,31 +11,63 @@ namespace DataBlockHelper.Entity.DB2106Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class DryerReportEntity
|
|
|
|
public class DryerReportEntity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private int StartSet;
|
|
|
|
|
|
|
|
byte[] Bytes;
|
|
|
|
byte[] Bytes;
|
|
|
|
public DryerReportEntity(int startSet, byte[] bytes)
|
|
|
|
public DryerReportEntity( byte[] bytes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.StartSet = startSet;
|
|
|
|
|
|
|
|
this.Bytes = bytes;
|
|
|
|
this.Bytes = bytes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public Dryer_ Dryer_A => new Dryer_(StartSet, Bytes);
|
|
|
|
public Dryer_ Dryer_A => new Dryer_(0, Bytes);
|
|
|
|
public Dryer_ Dryer_B => new Dryer_(StartSet + 268, Bytes);
|
|
|
|
|
|
|
|
public Dryer_ Dryer_C => new Dryer_(StartSet + 536, Bytes);
|
|
|
|
public Dryer_ Dryer_B => new Dryer_(466, Bytes);
|
|
|
|
public Dryer_ Dryer_D => new Dryer_(StartSet + 804, Bytes);
|
|
|
|
public Dryer_ Dryer_C => new Dryer_(932, Bytes);
|
|
|
|
|
|
|
|
public Dryer_ Dryer_D => new Dryer_(1398, Bytes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Dryer_
|
|
|
|
public class Dryer_
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private int StartSet;
|
|
|
|
|
|
|
|
private byte[] Bytes;
|
|
|
|
private byte[] Bytes;
|
|
|
|
public Dryer_(int startSet, byte[] bytes)
|
|
|
|
int start;
|
|
|
|
|
|
|
|
public Dryer_(int start, byte[] bytes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.StartSet = startSet;
|
|
|
|
this.start = start;
|
|
|
|
this.Bytes = bytes;
|
|
|
|
this.Bytes = bytes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<Report_DosE> Dos => new ReportArrayManager(4, StartSet, 22, Bytes).GetReport_DosEList();
|
|
|
|
public List<Report_DosE> Dos
|
|
|
|
public List<Report_MixE> Mix => new ReportArrayManager(10, StartSet + 88, 18, Bytes).GetReport_MixEList();
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
List<Report_DosE> ListE = new List<Report_DosE>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var content = Bytes.Skip(start).Take(286).ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 13; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var singleBlock = content.Skip(i*22).Take(22).ToArray();
|
|
|
|
|
|
|
|
ListE.Add(new Report_DosE(singleBlock));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ListE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Report_MixE> Mix
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
List<Report_MixE> ListE = new List<Report_MixE>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var content = Bytes.Skip(start).Take(180).ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var singleBlock = content.Skip(i * 18).Take(18).ToArray();
|
|
|
|
|
|
|
|
ListE.Add(new Report_MixE(singleBlock));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ListE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Report_DosE
|
|
|
|
public class Report_DosE
|
|
|
@ -65,6 +97,8 @@ namespace DataBlockHelper.Entity.DB2106Entity
|
|
|
|
ActToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 18);
|
|
|
|
ActToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 18);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public short EqNo { get; private set; }
|
|
|
|
public short EqNo { get; private set; }
|
|
|
|
public short Batch { get; private set; }
|
|
|
|
public short Batch { get; private set; }
|
|
|
|
public short MatCode { get; private set; }
|
|
|
|
public short MatCode { get; private set; }
|
|
|
@ -114,7 +148,7 @@ namespace DataBlockHelper.Entity.DB2106Entity
|
|
|
|
|
|
|
|
|
|
|
|
public List<Report_MixE> GetReport_MixEList()
|
|
|
|
public List<Report_MixE> GetReport_MixEList()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<Report_MixE> ListE = new List<Report_MixE>(Length);
|
|
|
|
List<Report_MixE> ListE = new List<Report_MixE>();
|
|
|
|
//var getListE = PlcConnect.Instance.Read("DB2106." + StartSet + ".0", Convert.ToUInt16(Length * SLength));
|
|
|
|
//var getListE = PlcConnect.Instance.Read("DB2106." + StartSet + ".0", Convert.ToUInt16(Length * SLength));
|
|
|
|
var content = Bytes.Skip(StartSet).Take(Length * SLength).ToArray();
|
|
|
|
var content = Bytes.Skip(StartSet).Take(Length * SLength).ToArray();
|
|
|
|
|
|
|
|
|
|
|
|