From 9b2978164373e4a7f9b17c9b85964f6c341f6138 Mon Sep 17 00:00:00 2001 From: wangsr Date: Fri, 25 Aug 2023 10:14:09 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20ParameterWithPC=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9B=91=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParametersWithPCStateMonitor.Designer.cs | 91 ++++++++++++++++++- .../ParametersWithPCStateMonitor.cs | 23 +++++ Main/MCEdit/Data/MCProject/nodeDevice.xml | 2 +- 3 files changed, 114 insertions(+), 2 deletions(-) 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 c9022a7..f2f203c 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.Designer.cs @@ -51,8 +51,15 @@ this.ListBox_DmChange_Pressure = new System.Windows.Forms.ListBox(); 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.ListBox_DmChange_PID = new System.Windows.Forms.ListBox(); this.PressureGroupBox.SuspendLayout(); this.WeightGroupBox.SuspendLayout(); + this.PIDGroupBox.SuspendLayout(); this.SuspendLayout(); // // PressureGroupBox @@ -320,7 +327,7 @@ // // Refresh // - this.Refresh.Location = new System.Drawing.Point(95, 315); + this.Refresh.Location = new System.Drawing.Point(258, 315); this.Refresh.Name = "Refresh"; this.Refresh.Size = new System.Drawing.Size(157, 42); this.Refresh.TabIndex = 3; @@ -328,11 +335,85 @@ this.Refresh.UseVisualStyleBackColor = true; this.Refresh.Click += new System.EventHandler(this.Refresh_Click); // + // PIDGroupBox + // + this.PIDGroupBox.Controls.Add(this.label1); + this.PIDGroupBox.Controls.Add(this.label3); + this.PIDGroupBox.Controls.Add(this.SV); + this.PIDGroupBox.Controls.Add(this.PV); + this.PIDGroupBox.Location = new System.Drawing.Point(340, 12); + this.PIDGroupBox.Name = "PIDGroupBox"; + this.PIDGroupBox.Size = new System.Drawing.Size(158, 47); + this.PIDGroupBox.TabIndex = 4; + 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; + this.label1.Location = new System.Drawing.Point(45, 17); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(41, 12); + this.label1.TabIndex = 5; + this.label1.Text = "实际值"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(45, 29); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(41, 12); + this.label3.TabIndex = 6; + this.label3.Text = "设定值"; + // + // 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清扫比例阀" + + }); + 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); + this.ListBox_DmChange_PID.TabIndex = 5; + this.ListBox_DmChange_PID.SelectedIndexChanged += new System.EventHandler(this.ListBox_DmChange_PID_SelectedIndexChanged); + // // ParametersWithPCStateMonitor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.ListBox_DmChange_PID); + this.Controls.Add(this.PIDGroupBox); this.Controls.Add(this.Refresh); this.Controls.Add(this.ListBox_DmChange_Weight); this.Controls.Add(this.ListBox_DmChange_Pressure); @@ -344,6 +425,8 @@ this.PressureGroupBox.PerformLayout(); this.WeightGroupBox.ResumeLayout(false); this.WeightGroupBox.PerformLayout(); + this.PIDGroupBox.ResumeLayout(false); + this.PIDGroupBox.PerformLayout(); this.ResumeLayout(false); } @@ -373,5 +456,11 @@ private System.Windows.Forms.ListBox ListBox_DmChange_Pressure; private System.Windows.Forms.ListBox ListBox_DmChange_Weight; private System.Windows.Forms.Button Refresh; + private System.Windows.Forms.GroupBox PIDGroupBox; + private System.Windows.Forms.Label SV; + private System.Windows.Forms.Label PV; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ListBox ListBox_DmChange_PID; } } \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs index 0f09a15..d31e197 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ParametersWithPCStateMonitor/ParametersWithPCStateMonitor.cs @@ -15,6 +15,7 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith { string DmChange_Pressure = "mainPress_V1"; string DmChange_Weight = "Hopper_1"; + string DmChange_PID = "convey_V1"; public ParametersWithPCStateMonitor() { InitializeComponent(); @@ -30,6 +31,12 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith Alarm.Text = GetDataToString(dmName, "_Alarm"); } + private void StateMonitor_PID(string dmName) + { + PV.Text = GetDataToString(dmName, "_PV"); + SV.Text = GetDataToString(dmName, "_SV"); + } + private void StateMonitor_Weight(string dmName) { ActWeight.Text = GetDataToString(dmName, "_ActWeight"); @@ -102,6 +109,17 @@ 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清扫比例阀"] = "", + }; @@ -124,5 +142,10 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ParametersWith { return GetDataNameValue(dmName, dmValue).NowValue.ToString(); } + + private void ListBox_DmChange_PID_SelectedIndexChanged(object sender, EventArgs e) + { + + } } } diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml index 54c145f..4bd1f37 100644 --- a/Main/MCEdit/Data/MCProject/nodeDevice.xml +++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml @@ -13,7 +13,7 @@ - +