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.
lj_plc/DataBlockHelper/Entity/DB2111Entity/ReportDosEntity.cs

37 lines
1.4 KiB
C#

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