|
|
@ -1,4 +1,5 @@
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
using DataBlockHelper;
|
|
|
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
using Mesnac.Core.Service;
|
|
|
|
using Mesnac.Core.Service;
|
|
|
@ -179,6 +180,8 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始称量");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始称量");
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.20.0", Convert.ToUInt16(value));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.0", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -186,12 +189,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
MessageBox.Show("输入数值的格式有误!");
|
|
|
|
MessageBox.Show("输入数值的格式有误!");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (StopMetage1 == runtime.Sender)
|
|
|
|
if (StopMetage1 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.1", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A称量已手动停止");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A称量已手动停止");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -206,6 +208,8 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始称量");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始称量");
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.0.0", Convert.ToUInt16(value));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.0", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -217,6 +221,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
if (StopMetage2 == runtime.Sender)
|
|
|
|
if (StopMetage2 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.1", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A称量已手动停止");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A称量已手动停止");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -231,6 +236,8 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始称量");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始称量");
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.30.0", Convert.ToUInt16(value));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.0", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -242,6 +249,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
if (StopMetage3 == runtime.Sender)
|
|
|
|
if (StopMetage3 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.1", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B称量已手动停止");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B称量已手动停止");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -256,6 +264,8 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始称量");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始称量");
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.10.0", Convert.ToUInt16(value));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.0", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -267,6 +277,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
if (StopMetage4 == runtime.Sender)
|
|
|
|
if (StopMetage4 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.1", true);
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B称量已手动停止");
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B称量已手动停止");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
MessageBox.Show("称量已停止!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -283,16 +294,20 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(3));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(4));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -310,16 +325,20 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(3));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(4));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -337,16 +356,20 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(3));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(4));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -364,16 +387,20 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(3));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(4));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -471,32 +498,33 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOn4 == runtime.Sender)
|
|
|
|
if (SpiralOn4 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float value;
|
|
|
|
MessageBox.Show("二期工程,敬请期待!");
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue4.MCValue), out value))
|
|
|
|
//float value;
|
|
|
|
{
|
|
|
|
//if (float.TryParse(Convert.ToString(SetSpiralValue4.MCValue), out value))
|
|
|
|
if (MessageBox.Show("螺旋4确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
//{
|
|
|
|
{
|
|
|
|
// if (MessageBox.Show("螺旋4确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
return;
|
|
|
|
// {
|
|
|
|
}
|
|
|
|
// return;
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋4启动");
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// MesnacServiceManager.Instance.LoggingService.Info("螺旋4启动");
|
|
|
|
else
|
|
|
|
//}
|
|
|
|
{
|
|
|
|
//else
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋4输入数值的格式有误");
|
|
|
|
//{
|
|
|
|
MessageBox.Show("输入数值的格式有误!");
|
|
|
|
// MesnacServiceManager.Instance.LoggingService.Info("螺旋4输入数值的格式有误");
|
|
|
|
return;
|
|
|
|
// MessageBox.Show("输入数值的格式有误!");
|
|
|
|
}
|
|
|
|
// return;
|
|
|
|
|
|
|
|
//}
|
|
|
|
switch (WetChoose4)
|
|
|
|
|
|
|
|
{
|
|
|
|
//switch (WetChoose4)
|
|
|
|
case 7:
|
|
|
|
//{
|
|
|
|
|
|
|
|
// case 7:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8:
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 8:
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
// default: break;
|
|
|
|
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|