|
|
|
@ -785,122 +785,130 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
if (WaterStop1 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
switch (GelChooseA)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
PlcControl("DB2119.26.0", 1);
|
|
|
|
|
PlcControl("DB2119.28.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
PlcControl("DB2119.26.0", 2);
|
|
|
|
|
PlcControl("DB2119.28.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
PlcControl("DB2119.26.0", 3);
|
|
|
|
|
PlcControl("DB2119.28.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
PlcControl("DB2119.26.0", 4);
|
|
|
|
|
PlcControl("DB2119.28.5", true);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//switch (GelChooseA)
|
|
|
|
|
//{
|
|
|
|
|
// case 1:
|
|
|
|
|
// // PlcControl("DB2119.26.0", 1);
|
|
|
|
|
// //PlcControl("DB2119.28.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 2:
|
|
|
|
|
// // PlcControl("DB2119.26.0", 2);
|
|
|
|
|
// // PlcControl("DB2119.28.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 3:
|
|
|
|
|
// // PlcControl("DB2119.26.0", 3);
|
|
|
|
|
// // PlcControl("DB2119.28.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 4:
|
|
|
|
|
// //PlcControl("DB2119.26.0", 4);
|
|
|
|
|
// // PlcControl("DB2119.28.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("冷水称A已停止排水");
|
|
|
|
|
ManualLogControl("冷水称A停止排水");
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A停止排水");
|
|
|
|
|
WaterStopAction("DB2119.28.5", WaterStop1, "冷", "A");
|
|
|
|
|
//MessageBox.Show("冷水称A已停止排水");
|
|
|
|
|
//ManualLogControl("冷水称A停止排水");
|
|
|
|
|
//MesnacServiceManager.Instance.LoggingService.Info("冷水称A停止排水");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (WaterStop2 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
switch (GelChooseA)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
PlcControl("DB2119.6.0", 1);
|
|
|
|
|
PlcControl("DB2119.8.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
PlcControl("DB2119.6.0", 2);
|
|
|
|
|
PlcControl("DB2119.8.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
PlcControl("DB2119.6.0", 3);
|
|
|
|
|
PlcControl("DB2119.8.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
PlcControl("DB2119.6.0", 4);
|
|
|
|
|
PlcControl("DB2119.8.5", true);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//switch (GelChooseA)
|
|
|
|
|
//{
|
|
|
|
|
// case 1:
|
|
|
|
|
// //PlcControl("DB2119.6.0", 1);
|
|
|
|
|
// // PlcControl("DB2119.8.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 2:
|
|
|
|
|
// // PlcControl("DB2119.6.0", 2);
|
|
|
|
|
// // PlcControl("DB2119.8.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 3:
|
|
|
|
|
// // PlcControl("DB2119.6.0", 3);
|
|
|
|
|
// //PlcControl("DB2119.8.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 4:
|
|
|
|
|
// // PlcControl("DB2119.6.0", 4);
|
|
|
|
|
// // PlcControl("DB2119.8.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("热水称A已停止排水");
|
|
|
|
|
ManualLogControl("热水称A停止排水");
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A停止排水");
|
|
|
|
|
WaterStopAction("DB2119.8.5", WaterStop2, "热", "A");
|
|
|
|
|
|
|
|
|
|
//MessageBox.Show("热水称A已停止排水");
|
|
|
|
|
//ManualLogControl("热水称A停止排水");
|
|
|
|
|
//MesnacServiceManager.Instance.LoggingService.Info("热水称A停止排水");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (WaterStop3 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
switch (GelChooseB)
|
|
|
|
|
{
|
|
|
|
|
case 5:
|
|
|
|
|
PlcControl("DB2119.36.0", 1);
|
|
|
|
|
PlcControl("DB2119.38.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
PlcControl("DB2119.36.0", 2);
|
|
|
|
|
PlcControl("DB2119.38.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
PlcControl("DB2119.36.0", 3);
|
|
|
|
|
PlcControl("DB2119.38.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
PlcControl("DB2119.36.0", 4);
|
|
|
|
|
PlcControl("DB2119.38.5", true);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//switch (GelChooseB)
|
|
|
|
|
//{
|
|
|
|
|
// case 5:
|
|
|
|
|
// // PlcControl("DB2119.36.0", 1);
|
|
|
|
|
// // PlcControl("DB2119.38.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 6:
|
|
|
|
|
// // PlcControl("DB2119.36.0", 2);
|
|
|
|
|
// // PlcControl("DB2119.38.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 7:
|
|
|
|
|
// //PlcControl("DB2119.36.0", 3);
|
|
|
|
|
// // PlcControl("DB2119.38.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 8:
|
|
|
|
|
// // PlcControl("DB2119.36.0", 4);
|
|
|
|
|
// //PlcControl("DB2119.38.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
WaterStopAction("DB2119.38.5", WaterStop3, "冷", "B");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("冷水称B已停止排水");
|
|
|
|
|
ManualLogControl("冷水称B停止排水");
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B停止排水");
|
|
|
|
|
//MessageBox.Show("冷水称B已停止排水");
|
|
|
|
|
//ManualLogControl("冷水称B停止排水");
|
|
|
|
|
//MesnacServiceManager.Instance.LoggingService.Info("冷水称B停止排水");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (WaterStop4 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
switch (GelChooseB)
|
|
|
|
|
{
|
|
|
|
|
case 5:
|
|
|
|
|
PlcControl("DB2119.16.0", 1);
|
|
|
|
|
PlcControl("DB2119.18.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
PlcControl("DB2119.16.0", 2);
|
|
|
|
|
PlcControl("DB2119.18.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
PlcControl("DB2119.16.0", 3);
|
|
|
|
|
PlcControl("DB2119.18.5", true);
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
PlcControl("DB2119.16.0", 4);
|
|
|
|
|
PlcControl("DB2119.18.5", true);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//switch (GelChooseB)
|
|
|
|
|
//{
|
|
|
|
|
// case 5:
|
|
|
|
|
// // PlcControl("DB2119.16.0", 1);
|
|
|
|
|
// // PlcControl("DB2119.18.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 6:
|
|
|
|
|
// // PlcControl("DB2119.16.0", 2);
|
|
|
|
|
// // PlcControl("DB2119.18.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 7:
|
|
|
|
|
// // PlcControl("DB2119.16.0", 3);
|
|
|
|
|
// // PlcControl("DB2119.18.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// case 8:
|
|
|
|
|
// // PlcControl("DB2119.16.0", 4);
|
|
|
|
|
// //PlcControl("DB2119.18.5", true);
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
WaterStopAction("DB2119.18.5", WaterStop4, "热", "B");
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("热水称B已停止排水");
|
|
|
|
|
ManualLogControl("热水称B停止排水");
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B停止排水");
|
|
|
|
|
//MessageBox.Show("热水称B已停止排水");
|
|
|
|
|
//ManualLogControl("热水称B停止排水");
|
|
|
|
|
//MesnacServiceManager.Instance.LoggingService.Info("热水称B停止排水");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -1569,6 +1577,45 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void WaterStopAction(string plcAddress,MCButton button,string h,string a)
|
|
|
|
|
{
|
|
|
|
|
//先读取plc地址
|
|
|
|
|
bool stopMe1 = PlcConnect.Instance.ReadBool(plcAddress).Content;
|
|
|
|
|
bool me1 = !stopMe1;
|
|
|
|
|
PlcControl(plcAddress, me1);
|
|
|
|
|
string txt = $"{h}水称{a}";
|
|
|
|
|
//如果Plc是1 就证明是点了停止称量
|
|
|
|
|
if (me1)
|
|
|
|
|
{
|
|
|
|
|
txt += "恢复";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
txt += "停止";
|
|
|
|
|
}
|
|
|
|
|
button.Text = txt;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
txt = $"{h}水称{a}";
|
|
|
|
|
//如果Plc是1 就证明是点了停止称量
|
|
|
|
|
if (!me1)
|
|
|
|
|
{
|
|
|
|
|
txt += "恢复";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
txt += "停止";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MessageBox.Show(txt);
|
|
|
|
|
ManualLogControl(txt);
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info(txt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|