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/EsStop.cs

30 lines
648 B
C#

2 weeks ago
using System.Collections.Generic;
using System.Linq;
using HslCommunication;
namespace Tool.Model
{
public class EsStop
{
public List<bool> GetDb()
{
bool[] bitArray = new bool[32];
2 weeks ago
var readUInt32 = PlcConnect.Instance.ReadInt32("estop_temporary_storage");
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();
}
}
}