using System.Collections.Generic; using System.Linq; using HslCommunication; namespace Tool.Model { public class EsStop { public List GetDb() { bool[] bitArray = new bool[32]; var readUInt32 = PlcConnect.Instance.ReadUInt32("estop_temporary_storage"); var bo = readUInt32.IsSuccess; var context = readUInt32.Content; if (bo) { for (int i = 0; i < 31; i++) { bitArray[i] = context.GetBoolByIndex(i); } } return bitArray.ToList(); } } }