修复水秤的bug 变异量不对

wangsr
nodyang 1 year ago
parent 3cc7023fb5
commit 5a2b9e5c2b

@ -29,60 +29,39 @@ namespace DataBlockHelper.DBHelpers
return new EnableStatusEntity(bytes);
}
public DryerEntity Dryer_D1 => new DryerEntity(58, bytes);
public DryerEntity Dryer_D2 => new DryerEntity(218, bytes);
public DryerEntity Dryer_D3 => new DryerEntity(378, bytes);
public DryerEntity Dryer_D4 => new DryerEntity(538, bytes);
public GelatEntity Gelat_G1 => new GelatEntity(698, bytes);
public GelatEntity Gelat_G2 => new GelatEntity(858, bytes);
public GelatEntity Gelat_G3 => new GelatEntity(1018, bytes);
public GelatEntity Gelat_G4 => new GelatEntity(1178, bytes);
public GelatEntity Gelat_G5 => new GelatEntity(1338, bytes);
public GelatEntity Gelat_G6 => new GelatEntity(1498, bytes);
public GelatEntity Gelat_G7 => new GelatEntity(1658, bytes);
public GelatEntity Gelat_G8 => new GelatEntity(1818, bytes);
public WeterEntity Weter_M1 => new WeterEntity(1978, bytes);
public WeterEntity Weter_M2 => new WeterEntity(2178, bytes);
public WeterEntity Weter_M3 => new WeterEntity(2378, bytes);
public WeterEntity Weter_M4 => new WeterEntity(2578, bytes);
public WeterEntity Weter_M5 => new WeterEntity(2778, bytes);
public WeterEntity Weter_M6 => new WeterEntity(2978, bytes);
public WeterEntity Weter_M7 => new WeterEntity(3178, bytes);
public WeterEntity Weter_M8 => new WeterEntity(3378, bytes);
/// <summary>
/// 热水秤A
/// </summary>
public WaterEntity GetAHotWater => GetWater(3578);
public WaterEntity GetAHotWater => GetWater(3738);
/// <summary>
/// 热水秤B
/// </summary>
public WaterEntity GetBHotWater => GetWater(3588);
public WaterEntity GetBHotWater => GetWater(3748);
/// <summary>
/// 冷水秤A
/// </summary>
public WaterEntity GetAColWater => GetWater(3598);
public WaterEntity GetAColWater => GetWater(3758);
/// <summary>
/// 冷水秤B
/// </summary>
public WaterEntity GetBColWater => GetWater(3608);
public WaterEntity GetBColWater => GetWater(3768);
private WaterEntity GetWater(int start)
{
var instanceByteTransform = PlcConnect.Instance.ByteTransform;
var ls = bytes.Skip(start).Take(10).ToArray();
var ls = this.bytes = PlcConnect.Instance.Read($"DB2104.{start}.0", 10).Content;
WaterEntity entity = new WaterEntity
{
Bin = instanceByteTransform.TransInt16(ls, 0),

@ -29,7 +29,7 @@ namespace DataBlockHelper.DBHelpers
public static void WriteAHostWater(WaterEntity entity)
{
Write(3578, entity);
Write(3738, entity);
}
/// <summary>
/// B热水
@ -37,7 +37,7 @@ namespace DataBlockHelper.DBHelpers
/// <param name="entity"></param>
public static void WriteBHostWater(WaterEntity entity)
{
Write(3588, entity);
Write(3748, entity);
}
/// <summary>
/// 冷水A
@ -45,7 +45,7 @@ namespace DataBlockHelper.DBHelpers
/// <param name="entity"></param>
public static void WriteAColWater(WaterEntity entity)
{
Write(3598, entity);
Write(3758, entity);
}
/// <summary>
/// 冷水B
@ -53,7 +53,7 @@ namespace DataBlockHelper.DBHelpers
/// <param name="entity"></param>
public static void WriteBColWater(WaterEntity entity)
{
Write(3608, entity);
Write(3768, entity);
}

Loading…
Cancel
Save