|
|
|
@ -64,4 +64,69 @@ namespace DataBlockHelper.DBHelpers
|
|
|
|
|
|
|
|
|
|
public float LowerPressure { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Db92DengHelp : DBHelper
|
|
|
|
|
{
|
|
|
|
|
public Db92DengHelp()
|
|
|
|
|
{
|
|
|
|
|
OperateResult<byte[]> db = PlcConnect.Instance.Read("DB92.0.0", 46);
|
|
|
|
|
bytes = db.Content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BoolDeg DegA=>new BoolDeg(40,bytes);
|
|
|
|
|
public BoolDeg DegB => new BoolDeg(42, bytes);
|
|
|
|
|
public BoolDeg DegC => new BoolDeg(44, bytes);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class BoolDeg
|
|
|
|
|
{
|
|
|
|
|
public BoolDeg(ushort startSet, byte[] bytes)
|
|
|
|
|
{
|
|
|
|
|
var trans = PlcConnect.Instance.ByteTransform;
|
|
|
|
|
byte[] content = bytes.Skip(startSet).Take(2).ToArray();
|
|
|
|
|
|
|
|
|
|
byte bte=content[0];
|
|
|
|
|
A = bte.GetBit(0);
|
|
|
|
|
B = bte.GetBit(1);
|
|
|
|
|
C = bte.GetBit(2);
|
|
|
|
|
D = bte.GetBit(3);
|
|
|
|
|
E = bte.GetBit(4);
|
|
|
|
|
F = bte.GetBit(5);
|
|
|
|
|
G = bte.GetBit(6);
|
|
|
|
|
H = bte.GetBit(7);
|
|
|
|
|
bte=content[1];
|
|
|
|
|
I = bte.GetBit(0);
|
|
|
|
|
J = bte.GetBit(1);
|
|
|
|
|
K = bte.GetBit(2);
|
|
|
|
|
L = bte.GetBit(3);
|
|
|
|
|
M = bte.GetBit(4);
|
|
|
|
|
N = bte.GetBit(5);
|
|
|
|
|
O = bte.GetBit(6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool A { get; set; }
|
|
|
|
|
public bool B { get; set; }
|
|
|
|
|
public bool C { get; set; }
|
|
|
|
|
public bool D { get; set; }
|
|
|
|
|
public bool E { get; set; }
|
|
|
|
|
public bool F { get; set; }
|
|
|
|
|
public bool G { get; set; }
|
|
|
|
|
public bool H { get; set; }
|
|
|
|
|
public bool I { get; set; }
|
|
|
|
|
public bool J { get; set; }
|
|
|
|
|
public bool K { get; set; }
|
|
|
|
|
public bool L { get; set; }
|
|
|
|
|
public bool M { get; set; }
|
|
|
|
|
public bool N { get; set; }
|
|
|
|
|
public bool O { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|