|
|
|
@ -13,7 +13,7 @@ namespace DataBlockHelper.DBHelpers
|
|
|
|
|
|
|
|
|
|
public DB120Help() {
|
|
|
|
|
|
|
|
|
|
OperateResult<byte[]> db120 = PlcConnect.Instance.Read("DB120.0.0", 66);
|
|
|
|
|
OperateResult<byte[]> db120 = PlcConnect.Instance.Read("DB120.0.0", 154);
|
|
|
|
|
bytes = db120.Content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -21,6 +21,152 @@ namespace DataBlockHelper.DBHelpers
|
|
|
|
|
public Uhd GetUhd => new Uhd(bytes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DustfanEntity Dustfan => new DustfanEntity(78, bytes);
|
|
|
|
|
|
|
|
|
|
public DustfanEntity DustfanLineA => new DustfanEntity(80, bytes);
|
|
|
|
|
|
|
|
|
|
public DustfanEntity DustfanLineB => new DustfanEntity(82, bytes);
|
|
|
|
|
|
|
|
|
|
public DustfanEntity DustfanLineC => new DustfanEntity(84, bytes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public float SiloA
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 94);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloB
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 98);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloC
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 102);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloD
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 106);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloE
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 110);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloF
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 114);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloG
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 118);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public float SiloH
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 122);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloI
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 126);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloJ
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 130);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloK
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 134);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public float SiloL
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 138);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloM
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 142);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloN
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 146);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float SiloO
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
return trans.TransSingle(bytes, 150);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Uhd
|
|
|
|
@ -84,4 +230,28 @@ namespace DataBlockHelper.DBHelpers
|
|
|
|
|
|
|
|
|
|
public ushort Delay3 { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class DustfanEntity
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public DustfanEntity(ushort startSet, byte[] bytes) {
|
|
|
|
|
byte[] content = bytes.Skip(startSet).Take(2).ToArray();
|
|
|
|
|
|
|
|
|
|
byte byt = content[0];
|
|
|
|
|
|
|
|
|
|
SilogroupA = byt.GetBit(0);
|
|
|
|
|
SilogroupB = byt.GetBit(1);
|
|
|
|
|
SilogroupC = byt.GetBit(2);
|
|
|
|
|
SilogroupD = byt.GetBit(3);
|
|
|
|
|
SilogroupE = byt.GetBit(4);
|
|
|
|
|
}
|
|
|
|
|
public bool SilogroupA { get; set; }
|
|
|
|
|
public bool SilogroupB { get; set; }
|
|
|
|
|
public bool SilogroupC { get; set; }
|
|
|
|
|
public bool SilogroupD { get; set; }
|
|
|
|
|
public bool SilogroupE { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|