This commit is contained in:
@@ -654,32 +654,36 @@ namespace 全自动水压检测仪
|
|||||||
// if (percentage > 100) percentage = 100;
|
// if (percentage > 100) percentage = 100;
|
||||||
|
|
||||||
|
|
||||||
bool[] a = _modbusMaster?.ReadCoils(1, 10042, 1); // 常温低液位 0无水/1有水
|
bool[] a = _modbusMaster?.ReadCoils(1, 10042, 1); // 常温低液位 0无水/1有水
|
||||||
bool[] b = _modbusMaster?.ReadCoils(1, 10043, 1); // 常温高液位 0无水/1有水
|
bool[] b = _modbusMaster?.ReadCoils(1, 10043, 1); // 常温高液位 0无水/1有水
|
||||||
bool[] cc = _modbusMaster?.ReadCoils(1, 10040, 1); // 高温低液位 0无水/1有水
|
bool[] cc = _modbusMaster?.ReadCoils(1, 10040, 1); // 高温低液位 0无水/1有水
|
||||||
bool[] d = _modbusMaster?.ReadCoils(1, 10041, 1); // 高温高液位 0无水/1有水
|
bool[] d = _modbusMaster?.ReadCoils(1, 10041, 1); // 高温高液位 0无水/1有水
|
||||||
|
|
||||||
if (TryGetCoilValue(a, out bool normalSensorA) &&
|
if (TryGetCoilValue(a, out bool normalSensorA) &&
|
||||||
TryGetCoilValue(b, out bool normalSensorB))
|
TryGetCoilValue(b, out bool normalSensorB))
|
||||||
{
|
{
|
||||||
UpdateLiquidLevelStatusBar(_normalTempLevelBarSegments, normalSensorA, normalSensorB, "常温液位");
|
UpdateLiquidLevelStatusBar(_normalTempLevelBarSegments, normalSensorA, normalSensorB, "常温液位");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TryGetCoilValue(cc, out bool highSensorA) &&
|
if (TryGetCoilValue(cc, out bool highSensorA) &&
|
||||||
TryGetCoilValue(d, out bool highSensorB))
|
TryGetCoilValue(d, out bool highSensorB))
|
||||||
{
|
{
|
||||||
UpdateLiquidLevelStatusBar(_highTempLevelBarSegments, highSensorA, highSensorB, "高温液位");
|
UpdateLiquidLevelStatusBar(_highTempLevelBarSegments, highSensorA, highSensorB, "高温液位");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 调用停止
|
||||||
|
if (a[0] || cc[0])
|
||||||
|
|
||||||
|
{
|
||||||
|
ma?.BtnClickFunctionForNew(Function.ButtonType.复归型, 10082);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//// 更新进度条
|
||||||
|
//if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed)
|
||||||
|
// uiProcessBar1.Value = (int)percentage;
|
||||||
|
|
||||||
|
//uiLabel12.Text = value1.ToString("F2");
|
||||||
//// 更新进度条
|
|
||||||
//if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed)
|
|
||||||
// uiProcessBar1.Value = (int)percentage;
|
|
||||||
|
|
||||||
//uiLabel12.Text = value1.ToString("F2");
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// 初始压力
|
// 初始压力
|
||||||
|
|||||||
Reference in New Issue
Block a user