using HslCommunication; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tool.Model { public class PromptAlarm { public List GetDb() { bool[] bitArray = new bool[32]; var readUInt32 = PlcConnect.Instance.ReadUInt32("Prompt_alarm"); 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(); } } }