diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs index f2f203c..691de98 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs @@ -52,10 +52,10 @@ this.ListBox_DmChange_Weight = new System.Windows.Forms.ListBox(); this.Refresh = new System.Windows.Forms.Button(); this.PIDGroupBox = new System.Windows.Forms.GroupBox(); - this.PV = new System.Windows.Forms.Label(); - this.SV = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); + this.SV = new System.Windows.Forms.Label(); + this.PV = new System.Windows.Forms.Label(); this.ListBox_DmChange_PID = new System.Windows.Forms.ListBox(); this.PressureGroupBox.SuspendLayout(); this.WeightGroupBox.SuspendLayout(); @@ -327,7 +327,7 @@ // // Refresh // - this.Refresh.Location = new System.Drawing.Point(258, 315); + this.Refresh.Location = new System.Drawing.Point(178, 315); this.Refresh.Name = "Refresh"; this.Refresh.Size = new System.Drawing.Size(157, 42); this.Refresh.TabIndex = 3; @@ -348,24 +348,6 @@ this.PIDGroupBox.TabStop = false; this.PIDGroupBox.Text = "PID"; // - // PV - // - this.PV.AutoSize = true; - this.PV.Location = new System.Drawing.Point(6, 17); - this.PV.Name = "PV"; - this.PV.Size = new System.Drawing.Size(11, 12); - this.PV.TabIndex = 3; - this.PV.Text = "0"; - // - // SV - // - this.SV.AutoSize = true; - this.SV.Location = new System.Drawing.Point(6, 29); - this.SV.Name = "SV"; - this.SV.Size = new System.Drawing.Size(11, 12); - this.SV.TabIndex = 4; - this.SV.Text = "0"; - // // label1 // this.label1.AutoSize = true; @@ -384,23 +366,39 @@ this.label3.TabIndex = 6; this.label3.Text = "设定值"; // + // SV + // + this.SV.AutoSize = true; + this.SV.Location = new System.Drawing.Point(6, 29); + this.SV.Name = "SV"; + this.SV.Size = new System.Drawing.Size(11, 12); + this.SV.TabIndex = 4; + this.SV.Text = "0"; + // + // PV + // + this.PV.AutoSize = true; + this.PV.Location = new System.Drawing.Point(6, 17); + this.PV.Name = "PV"; + this.PV.Size = new System.Drawing.Size(11, 12); + this.PV.TabIndex = 3; + this.PV.Text = "0"; + // // ListBox_DmChange_PID // this.ListBox_DmChange_PID.FormattingEnabled = true; this.ListBox_DmChange_PID.ItemHeight = 12; this.ListBox_DmChange_PID.Items.AddRange(new object[] { - "压送秤A输送比例阀", - "压送秤A清扫比例阀", - "压送秤B输送比例阀", - "压送秤B清扫比例阀", - "压送秤C输送比例阀", - "压送秤C清扫比例阀", - "压送秤D输送比例阀", - "压送秤D清扫比例阀", - "压送秤E输送比例阀", - "压送秤E清扫比例阀" - - }); + "压送秤A输送比例阀", + "压送秤A清扫比例阀", + "压送秤B输送比例阀", + "压送秤B清扫比例阀", + "压送秤C输送比例阀", + "压送秤C清扫比例阀", + "压送秤D输送比例阀", + "压送秤D清扫比例阀", + "压送秤E输送比例阀", + "压送秤E清扫比例阀"}); this.ListBox_DmChange_PID.Location = new System.Drawing.Point(340, 65); this.ListBox_DmChange_PID.Name = "ListBox_DmChange_PID"; this.ListBox_DmChange_PID.Size = new System.Drawing.Size(158, 244); @@ -411,7 +409,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); + this.ClientSize = new System.Drawing.Size(509, 363); this.Controls.Add(this.ListBox_DmChange_PID); this.Controls.Add(this.PIDGroupBox); this.Controls.Add(this.Refresh); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs index d31e197..38df551 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs @@ -21,6 +21,7 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith InitializeComponent(); StateMonitor_Pressure(DmChange_Pressure); StateMonitor_Weight(DmChange_Weight); + StateMonitor_PID(DmChange_PID); } private void StateMonitor_Pressure(string dmName) @@ -62,6 +63,7 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith { StateMonitor_Pressure(DmChange_Pressure); StateMonitor_Weight(DmChange_Weight); + StateMonitor_PID(DmChange_PID); } private IDictionary dmNameValue = new Dictionary() @@ -109,16 +111,16 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith ["热水秤B重量"] = "WScale_2", ["冷水秤A重量"] = "WScale_3", ["冷水秤B重量"] = "WScale_4", - ["压送秤A输送比例阀"] = "", - ["压送秤A清扫比例阀"] = "", - ["压送秤B输送比例阀"] = "", - ["压送秤B清扫比例阀"] = "", - ["压送秤C输送比例阀"] = "", - ["压送秤C清扫比例阀"] = "", - ["压送秤D输送比例阀"] = "", - ["压送秤D清扫比例阀"] = "", - ["压送秤E输送比例阀"] = "", - ["压送秤E清扫比例阀"] = "", + ["压送秤A输送比例阀"] = "convey_V1", + ["压送秤A清扫比例阀"] = "purge_V1", + ["压送秤B输送比例阀"] = "convey_V2", + ["压送秤B清扫比例阀"] = "purge_V2", + ["压送秤C输送比例阀"] = "convey_V3", + ["压送秤C清扫比例阀"] = "purge_V3", + ["压送秤D输送比例阀"] = "convey_V4", + ["压送秤D清扫比例阀"] = "purge_V4", + ["压送秤E输送比例阀"] = "convey_V5", + ["压送秤E清扫比例阀"] = "purge_V5", }; @@ -145,7 +147,8 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith private void ListBox_DmChange_PID_SelectedIndexChanged(object sender, EventArgs e) { - + DmChange_PID = dmNameValue[ListBox_DmChange_PID.Text]; + StateMonitor_PID(DmChange_PID); } } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.Designer.cs new file mode 100644 index 0000000..a0f75a6 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.Designer.cs @@ -0,0 +1,557 @@ +namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWithPCStateMonitor +{ + partial class ParametersWithPCStateMonitor_Para + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.JogTime = new System.Windows.Forms.Label(); + this.Precut = new System.Windows.Forms.Label(); + this.WeightSlow = new System.Windows.Forms.Label(); + this.LowSpeed = new System.Windows.Forms.Label(); + this.HighSpeed = new System.Windows.Forms.Label(); + this.UntiStatus_HMI_GroupBox = new System.Windows.Forms.GroupBox(); + this.label27 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.pressure = new System.Windows.Forms.Label(); + this.currnet = new System.Windows.Forms.Label(); + this.speed = new System.Windows.Forms.Label(); + this.temperature = new System.Windows.Forms.Label(); + this.stepTime = new System.Windows.Forms.Label(); + this.totalTime = new System.Windows.Forms.Label(); + this.stepCode = new System.Windows.Forms.Label(); + this.step = new System.Windows.Forms.Label(); + this.batch = new System.Windows.Forms.Label(); + this.status = new System.Windows.Forms.Label(); + this.mode = new System.Windows.Forms.Label(); + this.ListBox_WeightPara = new System.Windows.Forms.ListBox(); + this.ListBox_UntiStatus_HMI = new System.Windows.Forms.ListBox(); + this.Refresh = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.UntiStatus_HMI_GroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.JogTime); + this.groupBox1.Controls.Add(this.Precut); + this.groupBox1.Controls.Add(this.WeightSlow); + this.groupBox1.Controls.Add(this.LowSpeed); + this.groupBox1.Controls.Add(this.HighSpeed); + this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(138, 84); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "weightPra"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(59, 65); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(53, 12); + this.label5.TabIndex = 9; + this.label5.Text = "点动时间"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(59, 53); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(41, 12); + this.label4.TabIndex = 8; + this.label4.Text = "提前值"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(59, 41); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(65, 12); + this.label3.TabIndex = 7; + this.label3.Text = "快慢值转换"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(59, 29); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(53, 12); + this.label2.TabIndex = 6; + this.label2.Text = "低速频率"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(59, 17); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 5; + this.label1.Text = "高速频率"; + // + // JogTime + // + this.JogTime.AutoSize = true; + this.JogTime.Location = new System.Drawing.Point(6, 65); + this.JogTime.Name = "JogTime"; + this.JogTime.Size = new System.Drawing.Size(11, 12); + this.JogTime.TabIndex = 4; + this.JogTime.Text = "0"; + // + // Precut + // + this.Precut.AutoSize = true; + this.Precut.Location = new System.Drawing.Point(6, 53); + this.Precut.Name = "Precut"; + this.Precut.Size = new System.Drawing.Size(11, 12); + this.Precut.TabIndex = 3; + this.Precut.Text = "0"; + // + // WeightSlow + // + this.WeightSlow.AutoSize = true; + this.WeightSlow.Location = new System.Drawing.Point(6, 41); + this.WeightSlow.Name = "WeightSlow"; + this.WeightSlow.Size = new System.Drawing.Size(11, 12); + this.WeightSlow.TabIndex = 2; + this.WeightSlow.Text = "0"; + // + // LowSpeed + // + this.LowSpeed.AutoSize = true; + this.LowSpeed.Location = new System.Drawing.Point(6, 29); + this.LowSpeed.Name = "LowSpeed"; + this.LowSpeed.Size = new System.Drawing.Size(11, 12); + this.LowSpeed.TabIndex = 1; + this.LowSpeed.Text = "0"; + // + // HighSpeed + // + this.HighSpeed.AutoSize = true; + this.HighSpeed.Location = new System.Drawing.Point(6, 17); + this.HighSpeed.Name = "HighSpeed"; + this.HighSpeed.Size = new System.Drawing.Size(11, 12); + this.HighSpeed.TabIndex = 0; + this.HighSpeed.Text = "0"; + // + // UntiStatus_HMI_GroupBox + // + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label27); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label26); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label25); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label24); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label23); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label22); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label21); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label20); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label19); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label18); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.label17); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.pressure); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.currnet); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.speed); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.temperature); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.stepTime); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.totalTime); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.stepCode); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.step); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.batch); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.status); + this.UntiStatus_HMI_GroupBox.Controls.Add(this.mode); + this.UntiStatus_HMI_GroupBox.Location = new System.Drawing.Point(156, 12); + this.UntiStatus_HMI_GroupBox.Name = "UntiStatus_HMI_GroupBox"; + this.UntiStatus_HMI_GroupBox.Size = new System.Drawing.Size(141, 156); + this.UntiStatus_HMI_GroupBox.TabIndex = 0; + this.UntiStatus_HMI_GroupBox.TabStop = false; + this.UntiStatus_HMI_GroupBox.Text = "UntiStatus_HMI"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(59, 137); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(29, 12); + this.label27.TabIndex = 22; + this.label27.Text = "压力"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(59, 125); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(29, 12); + this.label26.TabIndex = 21; + this.label26.Text = "电流"; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(59, 113); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(29, 12); + this.label25.TabIndex = 20; + this.label25.Text = "速度"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(59, 101); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(29, 12); + this.label24.TabIndex = 19; + this.label24.Text = "温度"; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(59, 89); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(65, 12); + this.label23.TabIndex = 18; + this.label23.Text = "当前步时间"; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(60, 77); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(41, 12); + this.label22.TabIndex = 17; + this.label22.Text = "总时间"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(59, 65); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(53, 12); + this.label21.TabIndex = 16; + this.label21.Text = "步序动作"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(59, 53); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(29, 12); + this.label20.TabIndex = 15; + this.label20.Text = "步号"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(59, 41); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(41, 12); + this.label19.TabIndex = 14; + this.label19.Text = "批次号"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(59, 29); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(29, 12); + this.label18.TabIndex = 13; + this.label18.Text = "状态"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(59, 17); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(29, 12); + this.label17.TabIndex = 12; + this.label17.Text = "模式"; + // + // pressure + // + this.pressure.AutoSize = true; + this.pressure.Location = new System.Drawing.Point(6, 137); + this.pressure.Name = "pressure"; + this.pressure.Size = new System.Drawing.Size(11, 12); + this.pressure.TabIndex = 11; + this.pressure.Text = "0"; + // + // currnet + // + this.currnet.AutoSize = true; + this.currnet.Location = new System.Drawing.Point(6, 125); + this.currnet.Name = "currnet"; + this.currnet.Size = new System.Drawing.Size(11, 12); + this.currnet.TabIndex = 10; + this.currnet.Text = "0"; + // + // speed + // + this.speed.AutoSize = true; + this.speed.Location = new System.Drawing.Point(6, 113); + this.speed.Name = "speed"; + this.speed.Size = new System.Drawing.Size(11, 12); + this.speed.TabIndex = 9; + this.speed.Text = "0"; + // + // temperature + // + this.temperature.AutoSize = true; + this.temperature.Location = new System.Drawing.Point(6, 101); + this.temperature.Name = "temperature"; + this.temperature.Size = new System.Drawing.Size(11, 12); + this.temperature.TabIndex = 8; + this.temperature.Text = "0"; + // + // stepTime + // + this.stepTime.AutoSize = true; + this.stepTime.Location = new System.Drawing.Point(6, 89); + this.stepTime.Name = "stepTime"; + this.stepTime.Size = new System.Drawing.Size(11, 12); + this.stepTime.TabIndex = 7; + this.stepTime.Text = "0"; + // + // totalTime + // + this.totalTime.AutoSize = true; + this.totalTime.Location = new System.Drawing.Point(6, 77); + this.totalTime.Name = "totalTime"; + this.totalTime.Size = new System.Drawing.Size(11, 12); + this.totalTime.TabIndex = 6; + this.totalTime.Text = "0"; + // + // stepCode + // + this.stepCode.AutoSize = true; + this.stepCode.Location = new System.Drawing.Point(6, 65); + this.stepCode.Name = "stepCode"; + this.stepCode.Size = new System.Drawing.Size(11, 12); + this.stepCode.TabIndex = 5; + this.stepCode.Text = "0"; + // + // step + // + this.step.AutoSize = true; + this.step.Location = new System.Drawing.Point(6, 53); + this.step.Name = "step"; + this.step.Size = new System.Drawing.Size(11, 12); + this.step.TabIndex = 4; + this.step.Text = "0"; + // + // batch + // + this.batch.AutoSize = true; + this.batch.Location = new System.Drawing.Point(6, 41); + this.batch.Name = "batch"; + this.batch.Size = new System.Drawing.Size(11, 12); + this.batch.TabIndex = 3; + this.batch.Text = "0"; + // + // status + // + this.status.AutoSize = true; + this.status.Location = new System.Drawing.Point(6, 29); + this.status.Name = "status"; + this.status.Size = new System.Drawing.Size(11, 12); + this.status.TabIndex = 2; + this.status.Text = "0"; + // + // mode + // + this.mode.AutoSize = true; + this.mode.Location = new System.Drawing.Point(6, 17); + this.mode.Name = "mode"; + this.mode.Size = new System.Drawing.Size(11, 12); + this.mode.TabIndex = 1; + this.mode.Text = "0"; + // + // ListBox_WeightPara + // + this.ListBox_WeightPara.FormattingEnabled = true; + this.ListBox_WeightPara.ItemHeight = 12; + this.ListBox_WeightPara.Items.AddRange(new object[] { + "大储仓A", + "大储仓B", + "大储仓C", + "大储仓D", + "大储仓E", + "大储仓F", + "大储仓G", + "大储仓H", + "大储仓I", + "大储仓J", + "大储仓K", + "大储仓L", + "大储仓M", + "大储仓N", + "大储仓O", + "日罐A", + "日罐B", + "日罐C", + "日罐D", + "日罐E", + "日罐F", + "日罐G", + "日罐H", + "日罐I", + "日罐J", + "日罐K", + "日罐L", + "缓存仓A", + "缓存仓B", + "缓存仓C", + "缓存仓D", + "热水秤A", + "热水秤B", + "冷水秤A", + "冷水秤B"}); + this.ListBox_WeightPara.Location = new System.Drawing.Point(12, 102); + this.ListBox_WeightPara.Name = "ListBox_WeightPara"; + this.ListBox_WeightPara.Size = new System.Drawing.Size(138, 256); + this.ListBox_WeightPara.TabIndex = 1; + this.ListBox_WeightPara.SelectedIndexChanged += new System.EventHandler(this.ListBox_WeightPara_SelectedIndexChanged); + // + // ListBox_UntiStatus_HMI + // + this.ListBox_UntiStatus_HMI.FormattingEnabled = true; + this.ListBox_UntiStatus_HMI.ItemHeight = 12; + this.ListBox_UntiStatus_HMI.Items.AddRange(new object[] { + "干混机参数0", + "干混机参数1", + "干混机参数2", + "干混机参数3", + "糊化机参数0", + "糊化机参数1", + "糊化机参数2", + "糊化机参数3", + "糊化机参数4", + "糊化机参数5", + "糊化机参数6", + "糊化机参数7", + "湿混机参数0", + "湿混机参数1", + "湿混机参数2", + "湿混机参数3", + "湿混机参数4", + "湿混机参数5", + "湿混机参数6", + "湿混机参数7"}); + this.ListBox_UntiStatus_HMI.Location = new System.Drawing.Point(156, 174); + this.ListBox_UntiStatus_HMI.Name = "ListBox_UntiStatus_HMI"; + this.ListBox_UntiStatus_HMI.Size = new System.Drawing.Size(141, 184); + this.ListBox_UntiStatus_HMI.TabIndex = 2; + this.ListBox_UntiStatus_HMI.SelectedIndexChanged += new System.EventHandler(this.ListBox_UntiStatus_HMI_SelectedIndexChanged); + // + // Refresh + // + this.Refresh.Location = new System.Drawing.Point(87, 364); + this.Refresh.Name = "Refresh"; + this.Refresh.Size = new System.Drawing.Size(133, 35); + this.Refresh.TabIndex = 3; + this.Refresh.Text = "刷新"; + this.Refresh.UseVisualStyleBackColor = true; + this.Refresh.Click += new System.EventHandler(this.button1_Click); + // + // ParametersWithPCStateMonitor_Para + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(310, 405); + this.Controls.Add(this.Refresh); + this.Controls.Add(this.ListBox_UntiStatus_HMI); + this.Controls.Add(this.ListBox_WeightPara); + this.Controls.Add(this.UntiStatus_HMI_GroupBox); + this.Controls.Add(this.groupBox1); + this.Name = "ParametersWithPCStateMonitor_Para"; + this.Text = "ParametersWithPCStateMonitor_Para"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.UntiStatus_HMI_GroupBox.ResumeLayout(false); + this.UntiStatus_HMI_GroupBox.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox UntiStatus_HMI_GroupBox; + private System.Windows.Forms.ListBox ListBox_WeightPara; + private System.Windows.Forms.ListBox ListBox_UntiStatus_HMI; + private System.Windows.Forms.Button Refresh; + private System.Windows.Forms.Label JogTime; + private System.Windows.Forms.Label Precut; + private System.Windows.Forms.Label WeightSlow; + private System.Windows.Forms.Label LowSpeed; + private System.Windows.Forms.Label HighSpeed; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label pressure; + private System.Windows.Forms.Label currnet; + private System.Windows.Forms.Label speed; + private System.Windows.Forms.Label temperature; + private System.Windows.Forms.Label stepTime; + private System.Windows.Forms.Label totalTime; + private System.Windows.Forms.Label stepCode; + private System.Windows.Forms.Label step; + private System.Windows.Forms.Label batch; + private System.Windows.Forms.Label status; + private System.Windows.Forms.Label mode; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label27; + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.cs new file mode 100644 index 0000000..39ca5d5 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.cs @@ -0,0 +1,150 @@ +using DevExpress.XtraRichEdit.Model; +using Mesnac.Action.ChemicalWeighing.Entity; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWithPCStateMonitor +{ + public partial class ParametersWithPCStateMonitor_Para : Form + { + string DmName_Weight = "Silo0"; + string DmName_UntiStatus_HMI = "Dryer0"; + public ParametersWithPCStateMonitor_Para() + { + InitializeComponent(); + StateMonitor_Weight(DmName_Weight); + StateMonitor_UntiStatus_HMI(DmName_UntiStatus_HMI); + } + + private void StateMonitor_Weight(string dmName) + { + HighSpeed.Text = GetDataToString(dmName, "_HighSpeed"); + LowSpeed.Text = GetDataToString(dmName, "_LowSpeed"); + WeightSlow.Text = GetDataToString(dmName, "_WeightSlow"); + Precut.Text = GetDataToString(dmName, "_Precut"); + JogTime.Text = GetDataToString(dmName, "_JogTime"); + } + + private void StateMonitor_UntiStatus_HMI(string dmName) + { + mode.Text = GetDataToString(dmName, "_mode"); + status.Text = GetDataToString(dmName, "_status"); + batch.Text = GetDataToString(dmName, "_batch"); + step.Text = GetDataToString(dmName, "_step"); + stepCode.Text = GetDataToString(dmName, "_stepCode"); + totalTime.Text = GetDataToString(dmName, "_totalTime"); + stepTime.Text = GetDataToString(dmName, "_stepTime"); + temperature.Text = GetDataToString(dmName, "_temperature"); + speed.Text = GetDataToString(dmName, "_speed"); + currnet.Text = GetDataToString(dmName, "_currnet"); + pressure.Text = GetDataToString(dmName, "_pressure"); + + } + + private void ListBox_WeightPara_SelectedIndexChanged(object sender, EventArgs e) + { + DmName_Weight = dmNameValue[ListBox_WeightPara.Text]; + StateMonitor_Weight(DmName_Weight); + } + + private void ListBox_UntiStatus_HMI_SelectedIndexChanged(object sender, EventArgs e) + { + DmName_UntiStatus_HMI = dmNameValue[ListBox_UntiStatus_HMI.Text]; + StateMonitor_UntiStatus_HMI(DmName_UntiStatus_HMI); + } + + /// + /// 根据属性名和现在选择的数据块名得到PLC数据块的具体引用 + /// + /// 数据块属性名 + /// + private DataKeyValue GetDataNameValue(string dmName, string dmValue) + { + return new DataKeyValue(dmName + dmValue); + } + + /// + /// 从PLC中读取值 + /// + /// 要读取的属性 + /// + private string GetDataToString(string dmName, string dmValue) + { + return GetDataNameValue(dmName, dmValue).NowValue.ToString(); + } + + private IDictionary dmNameValue = new Dictionary() + { + ["大储仓A"] = "Silo0", + ["大储仓B"] = "Silo1", + ["大储仓C"] = "Silo2", + ["大储仓D"] = "Silo3", + ["大储仓E"] = "Silo4", + ["大储仓F"] = "Silo5", + ["大储仓G"] = "Silo6", + ["大储仓H"] = "Silo7", + ["大储仓I"] = "Silo8", + ["大储仓J"] = "Silo9", + ["大储仓K"] = "Silo10", + ["大储仓L"] = "Silo11", + ["大储仓M"] = "Silo12", + ["大储仓N"] = "Silo13", + ["大储仓O"] = "Silo14", + ["日罐A"] = "DayBin0", + ["日罐B"] = "DayBin1", + ["日罐C"] = "DayBin2", + ["日罐D"] = "DayBin3", + ["日罐E"] = "DayBin4", + ["日罐F"] = "DayBin5", + ["日罐G"] = "DayBin6", + ["日罐H"] = "DayBin7", + ["日罐I"] = "DayBin8", + ["日罐J"] = "DayBin9", + ["日罐K"] = "DayBin10", + ["日罐L"] = "DayBin11", + ["缓存仓A"] = "Hoper0", + ["缓存仓B"] = "Hoper1", + ["缓存仓C"] = "Hoper2", + ["缓存仓D"] = "Hoper3", + ["热水秤A"] = "Water0", + ["热水秤B"] = "Water1", + ["冷水秤A"] = "Water2", + ["冷水秤B"] = "Water3", + ["干混机参数0"] = "Dryer0", + ["干混机参数1"] = "Dryer1", + ["干混机参数2"] = "Dryer2", + ["干混机参数3"] = "Dryer3", + ["糊化机参数0"] = "Gelater0", + ["糊化机参数1"] = "Gelater1", + ["糊化机参数2"] = "Gelater2", + ["糊化机参数3"] = "Gelater3", + ["糊化机参数4"] = "Gelater4", + ["糊化机参数5"] = "Gelater5", + ["糊化机参数6"] = "Gelater6", + ["糊化机参数7"] = "Gelater7", + ["湿混机参数0"] = "Weter0", + ["湿混机参数1"] = "Weter1", + ["湿混机参数2"] = "Weter2", + ["湿混机参数3"] = "Weter3", + ["湿混机参数4"] = "Weter4", + ["湿混机参数5"] = "Weter5", + ["湿混机参数6"] = "Weter6", + ["湿混机参数7"] = "Weter7" + }; + + private void button1_Click(object sender, EventArgs e) + { + StateMonitor_Weight(DmName_Weight); + StateMonitor_UntiStatus_HMI(DmName_UntiStatus_HMI); + } + + + } +} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.resx b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor_Para.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/PlcCommunicationUtil.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/PlcCommunicationUtil.cs index 3d24f44..84b1eaf 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/PlcCommunicationUtil.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/PlcCommunicationUtil.cs @@ -26,7 +26,7 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode /// private DataKeyValue GetDataNameValue(string dmValue) { - return new DataKeyValue(DmName + dmValue); + return new DataKeyValue(dmValue); } /// @@ -48,5 +48,25 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode { Plc.PlcWriteByDataKey(GetDataNameValue(dmValue), new Object[] { value }); } + + /// + /// 从PLC中读取值 + /// + /// 要读取的属性 + /// + private string GetDataToString(string dmName, string dmValue) + { + return GetDataNameValue(dmName, dmValue).NowValue.ToString(); + } + + /// + /// 根据属性名和现在选择的数据块名得到PLC数据块的具体引用 + /// + /// 数据块属性名 + /// + private DataKeyValue GetDataNameValue(string dmName, string dmValue) + { + return new DataKeyValue(dmName + dmValue); + } } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 7a72c30..a9a039a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -236,6 +236,12 @@ ParametersWithPCStateMonitor_Normal_HMI.cs + + Form + + + ParametersWithPCStateMonitor_Para.cs + Form @@ -745,6 +751,9 @@ ParametersWithPCStateMonitor_Normal_HMI.cs Designer + + ParametersWithPCStateMonitor_Para.cs + ValveInitStateMonitor.cs diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index 861730b..eb965e4 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -46,7 +46,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test // dbHelper.CommandText = sql; - ParametersWithPCStateMonitor Form = new ParametersWithPCStateMonitor(); + ParametersWithPCStateMonitor_Para Form = new ParametersWithPCStateMonitor_Para(); Form.Show(); diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml index 4bd1f37..068fbde 100644 --- a/Main/MCEdit/Data/MCProject/nodeDevice.xml +++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml @@ -252,101 +252,101 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +