add - 手动控制完成 下班

dep_nodyang
wangsr 1 year ago
parent 1c27c80404
commit fb1ff146c0

@ -1,10 +1,11 @@
using Mesnac.Action.Base; using DataBlockHelper;
using HslCommunication;
using Mesnac.Action.Base;
using Mesnac.Controls.Base; using Mesnac.Controls.Base;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.ManualControl namespace Mesnac.Action.ChemicalWeighing.ManualControl
@ -13,15 +14,14 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
{ {
List<DbMCControl> McControllist; List<DbMCControl> McControllist;
OperateResult<byte[]> Read;
byte[] content;
public void Run(RuntimeParameter runtime) public void Run(RuntimeParameter runtime)
{ {
base.RunIni(runtime); //必须要调用的 base.RunIni(runtime); //必须要调用的
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
//IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl;
McControllist = GetAllDbMCControlsByOption(DbOptionTypes.InitData);//获取所有待初始化控件 McControllist = GetAllDbMCControlsByOption(DbOptionTypes.InitData);//获取所有待初始化控件
IBaseControl WaterActualValue1 = GetBaseControl("WaterActualValue1"); IBaseControl WaterActualValue1 = GetBaseControl("WaterActualValue1");
@ -33,7 +33,48 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
IBaseControl SpiralActValue3 = GetBaseControl("SpiralActValue3"); IBaseControl SpiralActValue3 = GetBaseControl("SpiralActValue3");
IBaseControl SpiralActValue4 = GetBaseControl("SpiralActValue4"); IBaseControl SpiralActValue4 = GetBaseControl("SpiralActValue4");
MessageBox.Show("LoadingSuccess!"); Read = PlcConnect.Instance.Read("DB2119.22.0", 2);
content = Read.Content;
WaterActualValue1.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.2.0", 2);
content = Read.Content;
WaterActualValue2.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.32.0", 2);
content = Read.Content;
WaterActualValue3.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.12.0", 2);
content = Read.Content;
WaterActualValue4.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.42.0", 2);
content = Read.Content;
SpiralActValue1.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.64.0", 2);
content = Read.Content;
SpiralActValue2.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Read = PlcConnect.Instance.Read("DB2119.86.0", 2);
content = Read.Content;
SpiralActValue3.MCValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
} }
private IBaseControl GetBaseControl(string name) private IBaseControl GetBaseControl(string name)

@ -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

@ -1,5 +1,31 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ManualWaterControl" children="Controls"> <Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ManualWaterControl" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton9" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIEFEQTI3NUNERUFEODQwREY4NkZFMDBCNjIzOEU0M0Q3BgYAAAAP56qX5L2T5Yid5aeL5YyWBgcAAAAP56qX5L2T5Yid5aeL5YyWCw==</Binary>
</Property>
<Property name="MCKey">Refresh</Property>
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="FlatStyle">System</Property>
<Property name="Text">刷新</Property>
<Property name="Font">宋体, 19pt</Property>
<Property name="Location">12, 12</Property>
<Property name="Name">MCButton9</Property>
<Property name="Size">678, 53</Property>
<Property name="TabIndex">26</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox6" children="Controls"> <Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox6" children="Controls">
<Object type="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCTextBox2147483641" children="Controls"> <Object type="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCTextBox2147483641" children="Controls">
<Property name="KeyDownActionList"> <Property name="KeyDownActionList">
@ -43,7 +69,7 @@
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
<Property name="FlatStyle">System</Property> <Property name="FlatStyle">System</Property>
<Property name="Text">螺旋1启动</Property> <Property name="Text">螺旋2停止</Property>
<Property name="Location">85, 248</Property> <Property name="Location">85, 248</Property>
<Property name="Name">MCButton6</Property> <Property name="Name">MCButton6</Property>
<Property name="Size">74, 38</Property> <Property name="Size">74, 38</Property>
@ -385,7 +411,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">湿混机螺旋2</Property> <Property name="Text">湿混机螺旋2</Property>
<Property name="Location">183, 349</Property> <Property name="Location">183, 408</Property>
<Property name="Name">GroupBox6</Property> <Property name="Name">GroupBox6</Property>
<Property name="Size">165, 291</Property> <Property name="Size">165, 291</Property>
<Property name="TabIndex">25</Property> <Property name="TabIndex">25</Property>
@ -605,7 +631,7 @@
<Property name="ClickActionList"> <Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary> <Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property> </Property>
<Property name="MCKey">SpiralOff2</Property> <Property name="MCKey">SpiralOff3</Property>
<Property name="MCDataSourceID" /> <Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property> <Property name="IsDbControl">False</Property>
<Property name="InitDataSource" /> <Property name="InitDataSource" />
@ -620,7 +646,7 @@
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
<Property name="FlatStyle">System</Property> <Property name="FlatStyle">System</Property>
<Property name="Text">螺旋1启动</Property> <Property name="Text">螺旋3停止</Property>
<Property name="Location">85, 248</Property> <Property name="Location">85, 248</Property>
<Property name="Name">MCButton7</Property> <Property name="Name">MCButton7</Property>
<Property name="Size">74, 38</Property> <Property name="Size">74, 38</Property>
@ -775,7 +801,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">湿混机螺旋3</Property> <Property name="Text">湿混机螺旋3</Property>
<Property name="Location">354, 349</Property> <Property name="Location">354, 408</Property>
<Property name="Name">GroupBox7</Property> <Property name="Name">GroupBox7</Property>
<Property name="Size">165, 291</Property> <Property name="Size">165, 291</Property>
<Property name="TabIndex">25</Property> <Property name="TabIndex">25</Property>
@ -995,7 +1021,7 @@
<Property name="ClickActionList"> <Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary> <Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property> </Property>
<Property name="MCKey">SpiralOff2</Property> <Property name="MCKey">SpiralOff4</Property>
<Property name="MCDataSourceID" /> <Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property> <Property name="IsDbControl">False</Property>
<Property name="InitDataSource" /> <Property name="InitDataSource" />
@ -1010,7 +1036,7 @@
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
<Property name="FlatStyle">System</Property> <Property name="FlatStyle">System</Property>
<Property name="Text">螺旋1启动</Property> <Property name="Text">螺旋4停止</Property>
<Property name="Location">85, 248</Property> <Property name="Location">85, 248</Property>
<Property name="Name">MCButton8</Property> <Property name="Name">MCButton8</Property>
<Property name="Size">74, 38</Property> <Property name="Size">74, 38</Property>
@ -1165,7 +1191,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">湿混机螺旋4</Property> <Property name="Text">湿混机螺旋4</Property>
<Property name="Location">525, 349</Property> <Property name="Location">525, 408</Property>
<Property name="Name">GroupBox8</Property> <Property name="Name">GroupBox8</Property>
<Property name="Size">165, 291</Property> <Property name="Size">165, 291</Property>
<Property name="TabIndex">25</Property> <Property name="TabIndex">25</Property>
@ -1400,7 +1426,7 @@
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
<Property name="FlatStyle">System</Property> <Property name="FlatStyle">System</Property>
<Property name="Text">螺旋1启动</Property> <Property name="Text">螺旋1停止</Property>
<Property name="Location">85, 247</Property> <Property name="Location">85, 247</Property>
<Property name="Name">MCButton5</Property> <Property name="Name">MCButton5</Property>
<Property name="Size">74, 38</Property> <Property name="Size">74, 38</Property>
@ -1555,7 +1581,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">湿混机螺旋1</Property> <Property name="Text">湿混机螺旋1</Property>
<Property name="Location">12, 349</Property> <Property name="Location">12, 408</Property>
<Property name="Name">GroupBox5</Property> <Property name="Name">GroupBox5</Property>
<Property name="Size">165, 291</Property> <Property name="Size">165, 291</Property>
<Property name="TabIndex">15</Property> <Property name="TabIndex">15</Property>
@ -2011,7 +2037,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">B组水称控制</Property> <Property name="Text">B组水称控制</Property>
<Property name="Location">354, 12</Property> <Property name="Location">354, 71</Property>
<Property name="Name">GroupBox2</Property> <Property name="Name">GroupBox2</Property>
<Property name="Size">336, 331</Property> <Property name="Size">336, 331</Property>
<Property name="TabIndex">14</Property> <Property name="TabIndex">14</Property>
@ -2485,7 +2511,7 @@
</Object> </Object>
<Property name="TabStop">False</Property> <Property name="TabStop">False</Property>
<Property name="Text">A组水称控制</Property> <Property name="Text">A组水称控制</Property>
<Property name="Location">12, 12</Property> <Property name="Location">12, 71</Property>
<Property name="Name">GroupBox1</Property> <Property name="Name">GroupBox1</Property>
<Property name="Size">336, 331</Property> <Property name="Size">336, 331</Property>
<Property name="TabIndex">13</Property> <Property name="TabIndex">13</Property>
@ -2506,7 +2532,7 @@
<Property name="MCPurview">False</Property> <Property name="MCPurview">False</Property>
<Property name="AllowOriginalSizeShow">False</Property> <Property name="AllowOriginalSizeShow">False</Property>
<Property name="BackColor">Control</Property> <Property name="BackColor">Control</Property>
<Property name="Size">719, 689</Property> <Property name="Size">719, 749</Property>
<Property name="StartPosition">WindowsDefaultLocation</Property> <Property name="StartPosition">WindowsDefaultLocation</Property>
<Property name="Text">手动控制</Property> <Property name="Text">手动控制</Property>
<Property name="WindowState">Normal</Property> <Property name="WindowState">Normal</Property>

Loading…
Cancel
Save