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.
34 lines
706 B
C#
34 lines
706 B
C#
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];
|
|
var readUInt32 = PlcConnect.Instance.ReadInt32("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();
|
|
|
|
}
|
|
}
|
|
}
|