|
|
@ -644,5 +644,45 @@ namespace DataBlockHelper.DBHelpers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 0 冷水A 1 热水A 2 冷水B 3 热水B
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="no"></param>
|
|
|
|
|
|
|
|
public static void StopWater(int no)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
|
|
|
siemensS7Net.Write($"{DbName}.{53}.{no}",true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 0 冷水A 1 热水A 2 冷水B 3 热水B
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="no"></param>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void StartWater(int no)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
|
|
|
siemensS7Net.Write($"{DbName}.{53}.{no}", false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// true 状态是停止
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<bool> GetWaterStatus()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
|
|
|
List<bool> status = new List<bool>();
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var b= siemensS7Net.ReadBool($"{DbName}.{53}.{i}");
|
|
|
|
|
|
|
|
status.Add(b.Content);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return status;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|