|
|
|
@ -0,0 +1,36 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Web.UI;
|
|
|
|
|
|
|
|
|
|
namespace DataBlockHelper.Entity.DB2111Entity
|
|
|
|
|
{
|
|
|
|
|
public class ReportDosEntity
|
|
|
|
|
{
|
|
|
|
|
public ReportDosEntity(byte[] bytes, int StartSet)
|
|
|
|
|
{
|
|
|
|
|
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2107.10.0", 2);
|
|
|
|
|
|
|
|
|
|
var content = bytes.Skip(StartSet).Take(22).ToArray();
|
|
|
|
|
|
|
|
|
|
eqNo = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
|
|
|
|
|
batch = PlcConnect.Instance.ByteTransform.TransInt16(content, 2);
|
|
|
|
|
matCode = PlcConnect.Instance.ByteTransform.TransInt16(content, 4);
|
|
|
|
|
setValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 6);
|
|
|
|
|
setToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 10);
|
|
|
|
|
actValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 14);
|
|
|
|
|
actToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 18);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public short eqNo { get; private set; }
|
|
|
|
|
public short batch { get; private set; }
|
|
|
|
|
public short matCode { get; private set; }
|
|
|
|
|
public float setValue { get; private set; }
|
|
|
|
|
public float setToler { get; private set; }
|
|
|
|
|
public float actValue { get; private set; }
|
|
|
|
|
public float actToler { get; private set; }
|
|
|
|
|
}
|
|
|
|
|
}
|