|
|
@ -52,6 +52,10 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
IBaseControl SpiralOn2 = GetBaseControl("SpiralOn2");
|
|
|
|
IBaseControl SpiralOn2 = GetBaseControl("SpiralOn2");
|
|
|
|
IBaseControl SpiralOn3 = GetBaseControl("SpiralOn3");
|
|
|
|
IBaseControl SpiralOn3 = GetBaseControl("SpiralOn3");
|
|
|
|
IBaseControl SpiralOn4 = GetBaseControl("SpiralOn4");
|
|
|
|
IBaseControl SpiralOn4 = GetBaseControl("SpiralOn4");
|
|
|
|
|
|
|
|
IBaseControl SpiralOff1 = GetBaseControl("SpiralOff1");
|
|
|
|
|
|
|
|
IBaseControl SpiralOff2 = GetBaseControl("SpiralOff2");
|
|
|
|
|
|
|
|
IBaseControl SpiralOff3 = GetBaseControl("SpiralOff3");
|
|
|
|
|
|
|
|
IBaseControl SpiralOff4 = GetBaseControl("SpiralOff4");
|
|
|
|
|
|
|
|
|
|
|
|
IBaseControl Gel1 = GetBaseControl("Gel1");
|
|
|
|
IBaseControl Gel1 = GetBaseControl("Gel1");
|
|
|
|
IBaseControl Gel2 = GetBaseControl("Gel2");
|
|
|
|
IBaseControl Gel2 = GetBaseControl("Gel2");
|
|
|
@ -78,6 +82,27 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
IBaseControl SetSpiralValue2 = GetBaseControl("SetSpiralValue2");
|
|
|
|
IBaseControl SetSpiralValue2 = GetBaseControl("SetSpiralValue2");
|
|
|
|
IBaseControl SetSpiralValue3 = GetBaseControl("SetSpiralValue3");
|
|
|
|
IBaseControl SetSpiralValue3 = GetBaseControl("SetSpiralValue3");
|
|
|
|
IBaseControl SetSpiralValue4 = GetBaseControl("SetSpiralValue4");
|
|
|
|
IBaseControl SetSpiralValue4 = GetBaseControl("SetSpiralValue4");
|
|
|
|
|
|
|
|
IBaseControl FastSpiralValue1 = GetBaseControl("FastSpiralValue1");
|
|
|
|
|
|
|
|
IBaseControl FastSpiralValue2 = GetBaseControl("FastSpiralValue2");
|
|
|
|
|
|
|
|
IBaseControl FastSpiralValue3 = GetBaseControl("FastSpiralValue3");
|
|
|
|
|
|
|
|
IBaseControl FastSpiralValue4 = GetBaseControl("FastSpiralValue4");
|
|
|
|
|
|
|
|
IBaseControl PointSpiralValue1 = GetBaseControl("PointSpiralValue1");
|
|
|
|
|
|
|
|
IBaseControl PointSpiralValue2 = GetBaseControl("PointSpiralValue2");
|
|
|
|
|
|
|
|
IBaseControl PointSpiralValue3 = GetBaseControl("PointSpiralValue3");
|
|
|
|
|
|
|
|
IBaseControl PointSpiralValue4 = GetBaseControl("PointSpiralValue4");
|
|
|
|
|
|
|
|
IBaseControl FastSpeedSpiralValue1 = GetBaseControl("FastSpeedSpiralValue1");
|
|
|
|
|
|
|
|
IBaseControl FastSpeedSpiralValue2 = GetBaseControl("FastSpeedSpiralValue2");
|
|
|
|
|
|
|
|
IBaseControl FastSpeedSpiralValue3 = GetBaseControl("FastSpeedSpiralValue3");
|
|
|
|
|
|
|
|
IBaseControl FastSpeedSpiralValue4 = GetBaseControl("FastSpeedSpiralValue4");
|
|
|
|
|
|
|
|
IBaseControl LowSpeedSpiralValue1 = GetBaseControl("LowSpeedSpiralValue1");
|
|
|
|
|
|
|
|
IBaseControl LowSpeedSpiralValue2 = GetBaseControl("LowSpeedSpiralValue2");
|
|
|
|
|
|
|
|
IBaseControl LowSpeedSpiralValue3 = GetBaseControl("LowSpeedSpiralValue3");
|
|
|
|
|
|
|
|
IBaseControl LowSpeedSpiralValue4 = GetBaseControl("LowSpeedSpiralValue4");
|
|
|
|
|
|
|
|
IBaseControl PointSpeedSpiralValue1 = GetBaseControl("PointSpeedSpiralValue1");
|
|
|
|
|
|
|
|
IBaseControl PointSpeedSpiralValue2 = GetBaseControl("PointSpeedSpiralValue2");
|
|
|
|
|
|
|
|
IBaseControl PointSpeedSpiralValue3 = GetBaseControl("PointSpeedSpiralValue3");
|
|
|
|
|
|
|
|
IBaseControl PointSpeedSpiralValue4 = GetBaseControl("PointSpeedSpiralValue4");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
@ -289,8 +314,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
@ -309,8 +332,13 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.26.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.28.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称A开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (WaterOut2 == runtime.Sender)
|
|
|
|
if (WaterOut2 == runtime.Sender)
|
|
|
@ -320,8 +348,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (GelChooseA)
|
|
|
|
switch (GelChooseA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
@ -340,8 +366,13 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.6.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称A开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (WaterOut3 == runtime.Sender)
|
|
|
|
if (WaterOut3 == runtime.Sender)
|
|
|
@ -351,8 +382,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
@ -361,18 +390,23 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(2));
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(2));
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(3));
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(3));
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.36.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.8.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.38.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("冷水称B开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (WaterOut4 == runtime.Sender)
|
|
|
|
if (WaterOut4 == runtime.Sender)
|
|
|
@ -382,8 +416,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (GelChooseB)
|
|
|
|
switch (GelChooseB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
@ -402,20 +434,34 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.16.0", Convert.ToUInt16(4));
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
PlcConnect.Instance.Write("DB2119.18.4", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个糊化锅!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("热水称B开始排水");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOn1 == runtime.Sender)
|
|
|
|
if (SpiralOn1 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float value;
|
|
|
|
float valueSet;
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue1.MCValue), out value))
|
|
|
|
float valueFast;
|
|
|
|
|
|
|
|
float valuePoint;
|
|
|
|
|
|
|
|
float valueSpeedFast;
|
|
|
|
|
|
|
|
float valueSpeedLow;
|
|
|
|
|
|
|
|
float valueSpeedPoint;
|
|
|
|
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue1.MCValue), out valueSet) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpiralValue1.MCValue), out valueFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpiralValue1.MCValue), out valuePoint) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpeedSpiralValue1.MCValue), out valueSpeedFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(LowSpeedSpiralValue1.MCValue), out valueSpeedLow) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpeedSpiralValue1.MCValue), out valueSpeedPoint))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (MessageBox.Show("螺旋1确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
if (MessageBox.Show("螺旋1确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋1启动");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -427,25 +473,53 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (WetChoose1)
|
|
|
|
switch (WetChoose1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.40.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.44.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.46.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.50.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.52.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.54.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.58.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.60.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.40.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.44.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.46.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.50.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.52.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.54.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.58.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.60.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个湿混机!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋1启动");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOn2 == runtime.Sender)
|
|
|
|
if (SpiralOn2 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float value;
|
|
|
|
float valueSet;
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue2.MCValue), out value))
|
|
|
|
float valueFast;
|
|
|
|
|
|
|
|
float valuePoint;
|
|
|
|
|
|
|
|
float valueSpeedFast;
|
|
|
|
|
|
|
|
float valueSpeedLow;
|
|
|
|
|
|
|
|
float valueSpeedPoint;
|
|
|
|
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue2.MCValue), out valueSet) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpiralValue2.MCValue), out valueFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpiralValue2.MCValue), out valuePoint) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpeedSpiralValue2.MCValue), out valueSpeedFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(LowSpeedSpiralValue2.MCValue), out valueSpeedLow) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpeedSpiralValue2.MCValue), out valueSpeedPoint))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (MessageBox.Show("螺旋2确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
if (MessageBox.Show("螺旋2确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋2启动");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -457,25 +531,53 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (WetChoose2)
|
|
|
|
switch (WetChoose2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.62.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.66.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.68.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.72.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.74.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.76.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.80.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.82.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.62.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.66.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.68.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.72.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.74.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.76.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.80.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.82.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个湿混机!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋2启动");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOn3 == runtime.Sender)
|
|
|
|
if (SpiralOn3 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float value;
|
|
|
|
float valueSet;
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue3.MCValue), out value))
|
|
|
|
float valueFast;
|
|
|
|
|
|
|
|
float valuePoint;
|
|
|
|
|
|
|
|
float valueSpeedFast;
|
|
|
|
|
|
|
|
float valueSpeedLow;
|
|
|
|
|
|
|
|
float valueSpeedPoint;
|
|
|
|
|
|
|
|
if (float.TryParse(Convert.ToString(SetSpiralValue3.MCValue), out valueSet) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpiralValue3.MCValue), out valueFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpiralValue3.MCValue), out valuePoint) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(FastSpeedSpiralValue3.MCValue), out valueSpeedFast) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(LowSpeedSpiralValue3.MCValue), out valueSpeedLow) &&
|
|
|
|
|
|
|
|
float.TryParse(Convert.ToString(PointSpeedSpiralValue3.MCValue), out valueSpeedPoint))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (MessageBox.Show("螺旋3确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
if (MessageBox.Show("螺旋3确认启动?", "螺旋启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋3启动");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -487,49 +589,119 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
switch (WetChoose3)
|
|
|
|
switch (WetChoose3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.84.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.88.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.90.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.94.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.96.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.98.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.102.0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.104.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.84.0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.88.0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.90.0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.94.0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.96.0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.98.0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.102.0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.104.0", true);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default:
|
|
|
|
|
|
|
|
MessageBox.Show("请选择一个湿混机!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋3启动");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOn4 == runtime.Sender)
|
|
|
|
if (SpiralOn4 == runtime.Sender)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox.Show("二期工程,敬请期待!");
|
|
|
|
MessageBox.Show("二期工程,敬请期待!");
|
|
|
|
//float value;
|
|
|
|
//float valueSet;
|
|
|
|
//if (float.TryParse(Convert.ToString(SetSpiralValue4.MCValue), out value))
|
|
|
|
//float valueFast;
|
|
|
|
|
|
|
|
//float valuePoint;
|
|
|
|
|
|
|
|
//float valueSpeedFast;
|
|
|
|
|
|
|
|
//float valueSpeedLow;
|
|
|
|
|
|
|
|
//float valueSpeedPoint;
|
|
|
|
|
|
|
|
//if (float.TryParse(Convert.ToString(SetSpiralValue4.MCValue), out valueSet) &&
|
|
|
|
|
|
|
|
// float.TryParse(Convert.ToString(FastSpiralValue4.MCValue), out valueFast) &&
|
|
|
|
|
|
|
|
// float.TryParse(Convert.ToString(PointSpiralValue4.MCValue), out valuePoint) &&
|
|
|
|
|
|
|
|
// float.TryParse(Convert.ToString(FastSpeedSpiralValue4.MCValue), out valueSpeedFast) &&
|
|
|
|
|
|
|
|
// float.TryParse(Convert.ToString(LowSpeedSpiralValue4.MCValue), out valueSpeedLow) &&
|
|
|
|
|
|
|
|
// float.TryParse(Convert.ToString(PointSpeedSpiralValue4.MCValue), out valueSpeedPoint))
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// 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输入数值的格式有误");
|
|
|
|
// MesnacServiceManager.Instance.LoggingService.Info("螺旋4输入数值的格式有误");
|
|
|
|
// MessageBox.Show("输入数值的格式有误!");
|
|
|
|
// MessageBox.Show("输入数值的格式有误!");
|
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//switch (WetChoose4)
|
|
|
|
//switch (WetChoose4)
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// case 7:
|
|
|
|
// case 7:
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(1));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", true);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 8:
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSet));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueFast));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valuePoint));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedFast));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedLow));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(valueSpeedPoint));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", Convert.ToUInt16(2));
|
|
|
|
|
|
|
|
// PlcConnect.Instance.Write("DB2119..0", true);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// default: return;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// break;
|
|
|
|
if (SpiralOff1 == runtime.Sender)
|
|
|
|
// case 8:
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.60.1", true);
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋1已手动停止");
|
|
|
|
|
|
|
|
MessageBox.Show("螺旋1已停止!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// break;
|
|
|
|
if (SpiralOff2 == runtime.Sender)
|
|
|
|
// default: break;
|
|
|
|
{
|
|
|
|
//}
|
|
|
|
PlcConnect.Instance.Write("DB2119.82.1", true);
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋2已手动停止");
|
|
|
|
|
|
|
|
MessageBox.Show("螺旋2已停止!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
if (SpiralOff3 == runtime.Sender)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write("DB2119.104.1", true);
|
|
|
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("螺旋3已手动停止");
|
|
|
|
|
|
|
|
MessageBox.Show("螺旋3已停止!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (SpiralOff4 == runtime.Sender)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MessageBox.Show("二期工程,敬请期待!");
|
|
|
|
|
|
|
|
//PlcConnect.Instance.Write("DB2119..1", true);
|
|
|
|
|
|
|
|
//MesnacServiceManager.Instance.LoggingService.Info("螺旋4已手动停止");
|
|
|
|
|
|
|
|
//MessageBox.Show("螺旋4已停止!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|