You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
namespace WorkerSynReport.Plc;
|
|
|
|
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; }
|
|
} |