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.
lj_plc/DataBlockHelper/Entity/DB2105Entity/FourBoolArrayEntity.cs

31 lines
678 B
C#


namespace DataBlockHelper.Entity.DB2105Entity
{
public class FourBoolArrayManager
{
private int StartSet;
public FourBoolArrayManager(int startSet)
{
StartSet = startSet;
}
public bool[] GetList()
{
bool[] ListE = new bool[4];
var getListE = PlcConnect.Instance.Read("DB2105." + StartSet + ".0", 1);
var content = getListE.Content;
byte byt = content[0];
ListE[0] = byt.GetBit(0);
ListE[1] = byt.GetBit(1);
ListE[2] = byt.GetBit(2);
ListE[3] = byt.GetBit(3);
return ListE;;
}
}
}