筛分机 转速设置

dep_deliver
我叫锄头 1 year ago
parent 2dcc8dbc41
commit af172859d1

@ -16,6 +16,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting.Entity
public MCButton MCButtonB { get; set; }
public MCButton MCButtonD { get; set; }
public MCButton MCButtonC { get; set; }
public MCButton MCButtonE { get; set; }
}
public class MCTextboxEntity
@ -97,4 +100,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting.Entity
public MCTextBox Upper { get; set; }
public MCTextBox Lower { get; set; }
}
public class SpeedEntity
{
public MCTextBox TxtSpeedA { get; set; }
public MCTextBox TxtSpeedB { get; set; }
public MCTextBox TxtSpeedC { get; set; }
}
}

@ -1,15 +1,16 @@
using DataBlockHelper.DBHelpers;
using DevExpress.Utils.Extensions;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting.Entity;
using Mesnac.Controls.Default;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
@ -23,6 +24,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
PipeEntity pipe=new PipeEntity();
SpeedEntity speed=new SpeedEntity();
List<Control> Controls;
public void Run(RuntimeParameter runtime)
{
@ -36,9 +39,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
ControlsHelper.ControlImport<MCTextBox>(pipe, Controls);
ControlsHelper.ControlImport<MCTextBox>(speed, Controls);
SetValueFromPlc();
SetValue();
SetDb92Value();
SetSpeed();
}
private void SetValueFromPlc()
@ -122,5 +129,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
pipe.Upper.MCValue=p.UpperPressure.ToString();
pipe.Lower.MCValue=p.LowerPressure.ToString();
}
private void SetSpeed()
{
DB137Helper dB137=new DB137Helper();
speed.TxtSpeedA.MCValue=dB137.SpeedA.ToString();
speed.TxtSpeedB.MCValue = dB137.SpeedB.ToString();
speed.TxtSpeedC.MCValue = dB137.SpeedC.ToString();
}
}
}

@ -20,6 +20,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
SlioEntity slioEntity = new SlioEntity();
PipeEntity pipe = new PipeEntity();
SpeedEntity speed = new SpeedEntity();
List<Control> Controls;
public void Run(RuntimeParameter runtime)
@ -40,6 +42,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
ControlsHelper.ControlImport<MCTextBox>(slioEntity, Controls);
ControlsHelper.ControlImport<MCTextBox>(pipe, Controls);
ControlsHelper.ControlImport<MCTextBox>(speed, Controls);
}
public void ButtonAction(RuntimeParameter runtime)
@ -98,6 +102,36 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
}
if (ButtonE.MCButtonE == runtime.Sender)
{
if (MessageBox.Show("确定要下传数据到PLC", "下传数据确认", MessageBoxButtons.YesNo) == DialogResult.No)
{
return;
}
try
{
DB137WriterHelper.AddSpeed(new List<float>()
{
Convert.ToSingle(speed.TxtSpeedA.MCValue),
Convert.ToSingle(speed.TxtSpeedB.MCValue),
Convert.ToSingle(speed.TxtSpeedC.MCValue),
});
MessageBox.Show("下传成功");
}
catch (Exception)
{
MessageBox.Show("下传失败 参数异常");
}
}
}

@ -1,5 +1,193 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DeliverPressureSetting" children="Controls">
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox7" children="Controls">
<Object type="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="TxtSpeedC" children="Controls">
<Property name="KeyDownActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
<Property name="WaterMarkText" />
<Property name="MaxValue">0</Property>
<Property name="MinValue">0</Property>
<Property name="IsEmpty">True</Property>
<Property name="MCKey" />
<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="TextName" />
<Property name="Location">138, 115</Property>
<Property name="Name">TxtSpeedC</Property>
<Property name="Size">119, 26</Property>
<Property name="TabIndex">77</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel85" children="Controls">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<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="Text">C转速</Property>
<Property name="Font">宋体, 9pt</Property>
<Property name="Location">18, 122</Property>
<Property name="Name">MCLabel85</Property>
<Property name="Size">35, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="TxtSpeedB" children="Controls">
<Property name="KeyDownActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
<Property name="WaterMarkText" />
<Property name="MaxValue">0</Property>
<Property name="MinValue">0</Property>
<Property name="IsEmpty">True</Property>
<Property name="MCKey" />
<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="TextName" />
<Property name="Location">138, 65</Property>
<Property name="Name">TxtSpeedB</Property>
<Property name="Size">119, 26</Property>
<Property name="TabIndex">75</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel86" children="Controls">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<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="Text">B转速</Property>
<Property name="Font">宋体, 9pt</Property>
<Property name="Location">18, 72</Property>
<Property name="Name">MCLabel86</Property>
<Property name="Size">35, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton2147483646" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAOAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIEYwQTk5OUJFRTI5NTQ4N0RBRUEyRkNGM0UwMTA4NEZEBgYAAAAP5Yid5aeL5YyW5Y+C5pWwBgcAAAAP5Yid5aeL5YyW5Y+C5pWwCw==</Binary>
</Property>
<Property name="MCKey" />
<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="Text">刷新</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">210, 192</Property>
<Property name="Name">MCButton2147483646</Property>
<Property name="Size">159, 57</Property>
<Property name="TabIndex">74</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButtonE" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAKAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDZBQTAwQ0RBM0IzRTQ5OEE5QzY5OERDQUQ0NUY4QjRCBgYAAAAY5Y+C5pWw6K6+572u5oyJ6ZKu5LqL5Lu2BgcAAAAY5Y+C5pWw6K6+572u5oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property>
<Property name="MCKey" />
<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="Text">下传</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">18, 192</Property>
<Property name="Name">MCButtonE</Property>
<Property name="Size">159, 57</Property>
<Property name="TabIndex">73</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="TxtSpeedA" children="Controls">
<Property name="KeyDownActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
<Property name="WaterMarkText" />
<Property name="MaxValue">0</Property>
<Property name="MinValue">0</Property>
<Property name="IsEmpty">True</Property>
<Property name="MCKey" />
<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="TextName" />
<Property name="Location">138, 25</Property>
<Property name="Name">TxtSpeedA</Property>
<Property name="Size">119, 26</Property>
<Property name="TabIndex">1</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel87" children="Controls">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<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="Text">A转速</Property>
<Property name="Font">宋体, 9pt</Property>
<Property name="Location">18, 32</Property>
<Property name="Name">MCLabel87</Property>
<Property name="Size">35, 12</Property>
</Object>
<Property name="TabStop">False</Property>
<Property name="Text">筛分机</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">829, 343</Property>
<Property name="Name">GroupBox7</Property>
<Property name="Size">402, 518</Property>
<Property name="TabIndex">96</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="Mesnac.Controls.Default.MCTextBox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Lower" children="Controls">
<Property name="KeyDownActionList">
@ -2628,7 +2816,7 @@
<Property name="MCPurview">False</Property>
<Property name="AllowOriginalSizeShow">False</Property>
<Property name="BackColor">Control</Property>
<Property name="Size">897, 949</Property>
<Property name="Size">1362, 949</Property>
<Property name="StartPosition">WindowsDefaultLocation</Property>
<Property name="Text">输送压送罐参数设置</Property>
<Property name="WindowState">Normal</Property>

Loading…
Cancel
Save