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