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.
|
|
|
|
using HslCommunication;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace DataBlockHelper.Entity.DB2107Entity
|
|
|
|
|
{
|
|
|
|
|
public class ControlSignEntity
|
|
|
|
|
{
|
|
|
|
|
public ControlSignEntity(byte[] bytes)
|
|
|
|
|
{
|
|
|
|
|
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2107.10.0", 2);
|
|
|
|
|
|
|
|
|
|
var content = bytes.Skip(10).Take(2).ToArray();
|
|
|
|
|
|
|
|
|
|
byte byt = content[0];
|
|
|
|
|
|
|
|
|
|
AutoMode = byt.GetBit(0);
|
|
|
|
|
LocMode = byt.GetBit(1);
|
|
|
|
|
TestMode = byt.GetBit(2);
|
|
|
|
|
Start = byt.GetBit(3);
|
|
|
|
|
Pause = byt.GetBit(4);
|
|
|
|
|
Stop = byt.GetBit(5);
|
|
|
|
|
Reset = byt.GetBit(6);
|
|
|
|
|
AlarmAck = byt.GetBit(7);
|
|
|
|
|
|
|
|
|
|
byt = content[1];
|
|
|
|
|
|
|
|
|
|
LampTest = byt.GetBit(0);
|
|
|
|
|
}
|
|
|
|
|
public bool AutoMode { get; private set; }
|
|
|
|
|
public bool LocMode { get; private set; }
|
|
|
|
|
public bool TestMode { get; private set; }
|
|
|
|
|
public bool Start { get; private set; }
|
|
|
|
|
public bool Pause { get; private set; }
|
|
|
|
|
public bool Stop { get; private set; }
|
|
|
|
|
public bool Reset { get; private set; }
|
|
|
|
|
public bool AlarmAck { get; private set; }
|
|
|
|
|
public bool LampTest { get; private set; }
|
|
|
|
|
}
|
|
|
|
|
}
|