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/DB1Entity/ForAoaLogInFC3006Entity.cs

28 lines
842 B
C#

using HslCommunication;
namespace DataBlockHelper.Entity.DB1Entity
{
public class ForAoaLogInFC3006Entity
{
public ForAoaLogInFC3006Entity(ushort startSet)
{
OperateResult<byte[]> read = PlcConnect.Instance.Read("DB1." + startSet + ".0", 8);
var content = read.Content;
byte byt = content[6];
Min = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Max = PlcConnect.Instance.ByteTransform.TransInt16(content, 2);
SetValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 4);
Alarm = byt.GetBit(0);
}
public short Min { get; private set; }
public short Max { get; private set; }
public short SetValue { get; private set; }
public bool Alarm { get; private set; }
}
}