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.
CaiQie/Tool/Model/PromptAlarm.cs

34 lines
706 B
C#

2 weeks ago
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<bool> GetDb()
{
bool[] bitArray = new bool[32];
1 week ago
var readUInt32 = PlcConnect.Instance.ReadInt32("Prompt_alarm");
2 weeks ago
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();
}
}
}