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.
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using HslCommunication;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Security.Cryptography.X509Certificates;
|
|
using System.Text;
|
|
|
|
|
|
namespace DataBlockHelper.Entity.DB2104Entity
|
|
{
|
|
public class RecipeCommEntity
|
|
{
|
|
public RecipeCommEntity()
|
|
{
|
|
OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2104.2.0", 50);
|
|
|
|
var content = read.Content;
|
|
|
|
var instanceByteTransform = PlcConnect.Instance.ByteTransform;
|
|
|
|
RecpieCode = instanceByteTransform.TransUInt16(content, 0);
|
|
PlanCode = instanceByteTransform.TransUInt16(content, 2);
|
|
RecipeName =instanceByteTransform.TransString(content, 4, 21, Encoding.ASCII);
|
|
PlanName = instanceByteTransform.TransString(content, 26, 21, Encoding.ASCII);
|
|
Batch = instanceByteTransform.TransInt16(content, 48);
|
|
|
|
}
|
|
|
|
public ushort RecpieCode { get; private set; }
|
|
public ushort PlanCode { get; private set; }
|
|
public string RecipeName { get; private set; }
|
|
public string PlanName { get; private set; }
|
|
public short Batch { get; private set; }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|