using HslCommunication; namespace DataBlockHelper.Entity.DB2107Entity { public class ControlSignEntity { public ControlSignEntity() { OperateResult read = PlcConnect.Instance.Read("DB2107.10.0", 2); var content = read.Content; 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; } } }