diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.Designer.cs
index 2987417..119f202 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.Designer.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.Designer.cs
@@ -126,6 +126,7 @@
this.Running_VFD = new System.Windows.Forms.Label();
this.DmChange_FOR_MOTOR_S = new System.Windows.Forms.ListBox();
this.DmChange_FOR_MOTOR_VFD = new System.Windows.Forms.ListBox();
+ this.Refresh = new System.Windows.Forms.Button();
this.FOR_MOTOR.SuspendLayout();
this.FOR_MOTOR_S_TO_T.SuspendLayout();
this.FOR_MOTOR_VFD.SuspendLayout();
@@ -1128,11 +1129,22 @@
this.DmChange_FOR_MOTOR_VFD.TabIndex = 5;
this.DmChange_FOR_MOTOR_VFD.SelectedIndexChanged += new System.EventHandler(this.DmChange_FOR_MOTOR_VFD_SelectedIndexChanged);
//
+ // Refresh
+ //
+ this.Refresh.Location = new System.Drawing.Point(195, 328);
+ this.Refresh.Name = "Refresh";
+ this.Refresh.Size = new System.Drawing.Size(151, 35);
+ this.Refresh.TabIndex = 6;
+ this.Refresh.Text = "刷新";
+ this.Refresh.UseVisualStyleBackColor = true;
+ this.Refresh.Click += new System.EventHandler(this.Refresh_Click);
+ //
// ElectronicMachineryStateMonitor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(564, 329);
+ this.ClientSize = new System.Drawing.Size(564, 371);
+ this.Controls.Add(this.Refresh);
this.Controls.Add(this.DmChange_FOR_MOTOR_VFD);
this.Controls.Add(this.DmChange_FOR_MOTOR_S);
this.Controls.Add(this.FOR_MOTOR_VFD);
@@ -1251,5 +1263,6 @@
private System.Windows.Forms.Label Alarm_VFD;
private System.Windows.Forms.Label VVVF_OK_VFD;
private System.Windows.Forms.Label Running_VFD;
+ private System.Windows.Forms.Button Refresh;
}
}
\ No newline at end of file
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.cs
index c2c35c2..efd92f4 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachineryStateMonitor/ElectronicMachineryStateMonitor.cs
@@ -172,5 +172,12 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
SetSpeed_M_VFD.Text = GetDataToString(dmName, "_SetSpeedM");
ACT_Speed_VFD.Text = GetDataToString(dmName, "_ACTSpeed");
}
+
+ private void Refresh_Click(object sender, EventArgs e)
+ {
+ StateMonitor_FOR_MOTOR(DmName_FOR_MOTOR);
+ StateMonitor_FOR_MOTOR_S(DmName_FOR_MOTOR_S);
+ StateMonitor_FOR_MOTOR_VFD(DmName_FOR_MOTOR_VFD);
+ }
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.Designer.cs
new file mode 100644
index 0000000..cf1a518
--- /dev/null
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.Designer.cs
@@ -0,0 +1,379 @@
+namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.InstrumentDataStateMonitor
+{
+ partial class InstrumentDataStateMonitor
+ {
+ ///
+ /// 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.DmChange_3006 = new System.Windows.Forms.ListBox();
+ this.DmChange_3005 = new System.Windows.Forms.ListBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.Max_3005 = new System.Windows.Forms.Label();
+ this.Alarm_3005 = new System.Windows.Forms.Label();
+ this.Min_3005 = new System.Windows.Forms.Label();
+ this.Value_3005 = new System.Windows.Forms.Label();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.Max_3006 = new System.Windows.Forms.Label();
+ this.Alarm_3006 = new System.Windows.Forms.Label();
+ this.Mlin_3006 = new System.Windows.Forms.Label();
+ this.SetValue_3006 = new System.Windows.Forms.Label();
+ this.Refresh = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // DmChange_3006
+ //
+ this.DmChange_3006.FormattingEnabled = true;
+ this.DmChange_3006.ItemHeight = 12;
+ this.DmChange_3006.Items.AddRange(new object[] {
+ "输送线A_主管电磁比例阀",
+ "输送线A_辅管电磁比例阀",
+ "输送线B_主管电磁比例阀",
+ "输送线B_辅管电磁比例阀",
+ "输送线C_主管电磁比例阀",
+ "输送线C_辅管电磁比例阀"});
+ this.DmChange_3006.Location = new System.Drawing.Point(220, 91);
+ this.DmChange_3006.Name = "DmChange_3006";
+ this.DmChange_3006.Size = new System.Drawing.Size(143, 196);
+ this.DmChange_3006.TabIndex = 0;
+ this.DmChange_3006.SelectedIndexChanged += new System.EventHandler(this.DmChange_3006_SelectedIndexChanged);
+ //
+ // DmChange_3005
+ //
+ this.DmChange_3005.FormattingEnabled = true;
+ this.DmChange_3005.ItemHeight = 12;
+ this.DmChange_3005.Items.AddRange(new object[] {
+ "输送线A_主气源压力传感器",
+ "输送线A_1号压送罐压力传感器",
+ "输送线A_2号压送罐压力传感器",
+ "输送线A_出料口检测压力传感器",
+ "输送线B_主气源压力传感器",
+ "输送线B_1号压送罐压力传感器",
+ "输送线B_2号压送罐压力传感器",
+ "输送线B_出料口检测压力传感器",
+ "输送线C_主气源压力传感器",
+ "输送线C_1号压送罐压力传感器",
+ "输送线C_2号压送罐压力传感器",
+ "输送线C_出料口检测压力传感器",
+ "大仓A压力传感器",
+ "大仓B压力传感器",
+ "大仓C压力传感器",
+ "大仓D压力传感器",
+ "大仓E压力传感器",
+ "大仓F压力传感器",
+ "大仓G压力传感器",
+ "大仓H压力传感器",
+ "大仓I压力传感器",
+ "大仓J压力传感器",
+ "大仓O压力传感器",
+ "输送线A_管道压力传感器",
+ "输送线B_管道压力传感器",
+ "输送线C_管道压力传感器",
+ "大仓A连续料位计",
+ "大仓B连续料位计",
+ "大仓C连续料位计",
+ "大仓D连续料位计",
+ "大仓E连续料位计",
+ "大仓F连续料位计",
+ "大仓G连续料位计",
+ "大仓H连续料位计",
+ "大仓I连续料位计",
+ "大仓J连续料位计",
+ "大仓O连续料位计",
+ "大仓A顶部热电阻/测温开关",
+ "大仓B顶部热电阻/测温开关",
+ "大仓C顶部热电阻/测温开关",
+ "大仓D顶部热电阻/测温开关",
+ "大仓E顶部热电阻/测温开关",
+ "大仓F顶部热电阻/测温开关",
+ "大仓G顶部热电阻/测温开关",
+ "大仓H顶部热电阻/测温开关",
+ "大仓I顶部热电阻/测温开关",
+ "大仓J顶部热电阻/测温开关",
+ "大仓O顶部热电阻/测温开关",
+ "大仓A低部热电阻/测温开关",
+ "大仓B低部热电阻/测温开关",
+ "大仓C低部热电阻/测温开关",
+ "大仓D低部热电阻/测温开关",
+ "大仓E低部热电阻/测温开关",
+ "大仓F低部热电阻/测温开关",
+ "大仓G低部热电阻/测温开关",
+ "大仓H低部热电阻/测温开关",
+ "大仓I低部热电阻/测温开关",
+ "大仓J低部热电阻/测温开关",
+ "大仓K低部热电阻/测温开关",
+ "大仓L低部热电阻/测温开关",
+ "大仓M低部热电阻/测温开关",
+ "大仓N低部热电阻/测温开关",
+ "大仓O低部热电阻/测温开关"});
+ this.DmChange_3005.Location = new System.Drawing.Point(12, 91);
+ this.DmChange_3005.Name = "DmChange_3005";
+ this.DmChange_3005.Size = new System.Drawing.Size(201, 196);
+ this.DmChange_3005.TabIndex = 1;
+ this.DmChange_3005.SelectedIndexChanged += new System.EventHandler(this.DmChange_3005_SelectedIndexChanged);
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.label5);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.Max_3005);
+ this.groupBox1.Controls.Add(this.Alarm_3005);
+ this.groupBox1.Controls.Add(this.Min_3005);
+ this.groupBox1.Controls.Add(this.Value_3005);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(201, 73);
+ this.groupBox1.TabIndex = 2;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "log_In_FC3005";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(23, 29);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(23, 12);
+ this.label5.TabIndex = 5;
+ this.label5.Text = "Max";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(23, 53);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(35, 12);
+ this.label6.TabIndex = 7;
+ this.label6.Text = "Alarm";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(23, 17);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(23, 12);
+ this.label7.TabIndex = 4;
+ this.label7.Text = "Min";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(23, 41);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(35, 12);
+ this.label8.TabIndex = 6;
+ this.label8.Text = "Value";
+ //
+ // Max_3005
+ //
+ this.Max_3005.AutoSize = true;
+ this.Max_3005.Location = new System.Drawing.Point(6, 29);
+ this.Max_3005.Name = "Max_3005";
+ this.Max_3005.Size = new System.Drawing.Size(11, 12);
+ this.Max_3005.TabIndex = 1;
+ this.Max_3005.Text = "0";
+ //
+ // Alarm_3005
+ //
+ this.Alarm_3005.AutoSize = true;
+ this.Alarm_3005.Location = new System.Drawing.Point(6, 53);
+ this.Alarm_3005.Name = "Alarm_3005";
+ this.Alarm_3005.Size = new System.Drawing.Size(11, 12);
+ this.Alarm_3005.TabIndex = 3;
+ this.Alarm_3005.Text = "0";
+ //
+ // Min_3005
+ //
+ this.Min_3005.AutoSize = true;
+ this.Min_3005.Location = new System.Drawing.Point(6, 17);
+ this.Min_3005.Name = "Min_3005";
+ this.Min_3005.Size = new System.Drawing.Size(11, 12);
+ this.Min_3005.TabIndex = 0;
+ this.Min_3005.Text = "0";
+ //
+ // Value_3005
+ //
+ this.Value_3005.AutoSize = true;
+ this.Value_3005.Location = new System.Drawing.Point(6, 41);
+ this.Value_3005.Name = "Value_3005";
+ this.Value_3005.Size = new System.Drawing.Size(11, 12);
+ this.Value_3005.TabIndex = 2;
+ this.Value_3005.Text = "0";
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.label1);
+ this.groupBox2.Controls.Add(this.label2);
+ this.groupBox2.Controls.Add(this.label3);
+ this.groupBox2.Controls.Add(this.label4);
+ this.groupBox2.Controls.Add(this.Max_3006);
+ this.groupBox2.Controls.Add(this.Alarm_3006);
+ this.groupBox2.Controls.Add(this.Mlin_3006);
+ this.groupBox2.Controls.Add(this.SetValue_3006);
+ this.groupBox2.Location = new System.Drawing.Point(220, 12);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(143, 73);
+ this.groupBox2.TabIndex = 0;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "log_out_FC3006";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(23, 29);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(23, 12);
+ this.label1.TabIndex = 9;
+ this.label1.Text = "Max";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(23, 53);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(35, 12);
+ this.label2.TabIndex = 11;
+ this.label2.Text = "Alarm";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(23, 17);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(29, 12);
+ this.label3.TabIndex = 8;
+ this.label3.Text = "Mlin";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(23, 41);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(53, 12);
+ this.label4.TabIndex = 10;
+ this.label4.Text = "SetValue";
+ //
+ // Max_3006
+ //
+ this.Max_3006.AutoSize = true;
+ this.Max_3006.Location = new System.Drawing.Point(6, 29);
+ this.Max_3006.Name = "Max_3006";
+ this.Max_3006.Size = new System.Drawing.Size(11, 12);
+ this.Max_3006.TabIndex = 5;
+ this.Max_3006.Text = "0";
+ //
+ // Alarm_3006
+ //
+ this.Alarm_3006.AutoSize = true;
+ this.Alarm_3006.Location = new System.Drawing.Point(6, 53);
+ this.Alarm_3006.Name = "Alarm_3006";
+ this.Alarm_3006.Size = new System.Drawing.Size(11, 12);
+ this.Alarm_3006.TabIndex = 7;
+ this.Alarm_3006.Text = "0";
+ //
+ // Mlin_3006
+ //
+ this.Mlin_3006.AutoSize = true;
+ this.Mlin_3006.Location = new System.Drawing.Point(6, 17);
+ this.Mlin_3006.Name = "Mlin_3006";
+ this.Mlin_3006.Size = new System.Drawing.Size(11, 12);
+ this.Mlin_3006.TabIndex = 4;
+ this.Mlin_3006.Text = "0";
+ //
+ // SetValue_3006
+ //
+ this.SetValue_3006.AutoSize = true;
+ this.SetValue_3006.Location = new System.Drawing.Point(6, 41);
+ this.SetValue_3006.Name = "SetValue_3006";
+ this.SetValue_3006.Size = new System.Drawing.Size(11, 12);
+ this.SetValue_3006.TabIndex = 6;
+ this.SetValue_3006.Text = "0";
+ //
+ // Refresh
+ //
+ this.Refresh.Location = new System.Drawing.Point(108, 293);
+ this.Refresh.Name = "Refresh";
+ this.Refresh.Size = new System.Drawing.Size(105, 37);
+ this.Refresh.TabIndex = 4;
+ this.Refresh.Text = "刷新";
+ this.Refresh.UseVisualStyleBackColor = true;
+ this.Refresh.Click += new System.EventHandler(this.Refresh_Click);
+ //
+ // InstrumentDataStateMonitor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(454, 339);
+ this.Controls.Add(this.Refresh);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.DmChange_3005);
+ this.Controls.Add(this.DmChange_3006);
+ this.Name = "InstrumentDataStateMonitor";
+ this.Text = "InstrumentDataStateMonitor";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox DmChange_3006;
+ private System.Windows.Forms.ListBox DmChange_3005;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label Max_3005;
+ private System.Windows.Forms.Label Alarm_3005;
+ private System.Windows.Forms.Label Min_3005;
+ private System.Windows.Forms.Label Value_3005;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.Button Refresh;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label Max_3006;
+ private System.Windows.Forms.Label Alarm_3006;
+ private System.Windows.Forms.Label Mlin_3006;
+ private System.Windows.Forms.Label SetValue_3006;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ }
+}
\ No newline at end of file
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.cs
new file mode 100644
index 0000000..90b888f
--- /dev/null
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.cs
@@ -0,0 +1,155 @@
+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.InstrumentDataStateMonitor
+{
+ public partial class InstrumentDataStateMonitor : Form
+ {
+ string DmName_3005 = "PR1DBT01";
+ string DmName_3006 = "SPV1DBT01";
+
+ public InstrumentDataStateMonitor()
+ {
+ InitializeComponent();
+ StateMonitor_3005(DmName_3005);
+ StateMonitor_3006(DmName_3006);
+ }
+
+
+ ///
+ /// 根据属性名和现在选择的数据块名得到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 void DmChange_3005_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ DmName_3005 = dmNameValue[DmChange_3005.Text];
+ StateMonitor_3005(DmName_3005);
+ }
+
+ private void DmChange_3006_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ DmName_3006 = dmNameValue[DmChange_3006.Text];
+ StateMonitor_3006(DmName_3006);
+ }
+
+ private void Refresh_Click(object sender, EventArgs e)
+ {
+ StateMonitor_3005(DmName_3005);
+ StateMonitor_3006(DmName_3006);
+ }
+
+ private void StateMonitor_3005(string dmName)
+ {
+ Min_3005.Text = GetDataToString(dmName, "_Min");
+ Max_3005.Text = GetDataToString(dmName, "_Max");
+ Value_3005.Text = GetDataToString(dmName, "_Value");
+ Alarm_3005.Text = GetDataToString(dmName, "_Alarm");
+ }
+
+ private void StateMonitor_3006(string dmName)
+ {
+ Mlin_3006.Text = GetDataToString(dmName, "_Mlin");
+ Max_3006.Text = GetDataToString(dmName, "_Max");
+ SetValue_3006.Text = GetDataToString(dmName, "_SetValue");
+ Alarm_3006.Text = GetDataToString(dmName, "_Alarm");
+ }
+
+ private IDictionary dmNameValue = new Dictionary()
+ {
+ ["输送线A_主气源压力传感器"] = "PR1DBT01",
+ ["输送线A_1号压送罐压力传感器"] = "PR1DBT02",
+ ["输送线A_2号压送罐压力传感器"] = "PR1DBT03",
+ ["输送线A_出料口检测压力传感器"] = "PR1DBT04",
+ ["输送线B_主气源压力传感器"] = "PR2DBT01",
+ ["输送线B_1号压送罐压力传感器"] = "PR2DBT02",
+ ["输送线B_2号压送罐压力传感器"] = "PR2DBT03",
+ ["输送线B_出料口检测压力传感器"] = "PR2DBT04",
+ ["输送线C_主气源压力传感器"] = "PR3DBT01",
+ ["输送线C_1号压送罐压力传感器"] = "PR3DBT02",
+ ["输送线C_2号压送罐压力传感器"] = "PR3DBT03",
+ ["输送线C_出料口检测压力传感器"] = "PR3DBT04",
+ ["大仓A压力传感器"] = "PR1ASI01",
+ ["大仓B压力传感器"] = "PR1BSI01",
+ ["大仓C压力传感器"] = "PR1CSI01",
+ ["大仓D压力传感器"] = "PR1DSI01",
+ ["大仓E压力传感器"] = "PR1ESI01",
+ ["大仓F压力传感器"] = "PR1FSI01",
+ ["大仓G压力传感器"] = "PR1GSI01",
+ ["大仓H压力传感器"] = "PR1HSI01",
+ ["大仓I压力传感器"] = "PR1ISI01",
+ ["大仓J压力传感器"] = "PR1JSI01",
+ ["大仓O压力传感器"] = "PR1OSI01",
+ ["输送线A_管道压力传感器"] = "PR1PCP01",
+ ["输送线B_管道压力传感器"] = "PR1PCP02",
+ ["输送线C_管道压力传感器"] = "PR1PCP03",
+ ["大仓A连续料位计"] = "LS1ASI01",
+ ["大仓B连续料位计"] = "LS1BSI01",
+ ["大仓C连续料位计"] = "LS1CSI01",
+ ["大仓D连续料位计"] = "LS1DSI01",
+ ["大仓E连续料位计"] = "LS1ESI01",
+ ["大仓F连续料位计"] = "LS1FSI01",
+ ["大仓G连续料位计"] = "LS1GSI01",
+ ["大仓H连续料位计"] = "LS1HSI01",
+ ["大仓I连续料位计"] = "LS1ISI01",
+ ["大仓J连续料位计"] = "LS1JSI01",
+ ["大仓O连续料位计"] = "LS1OSI01",
+ ["大仓A顶部热电阻/测温开关"] = "HR1ASI01",
+ ["大仓B顶部热电阻/测温开关"] = "HR1BSI01",
+ ["大仓C顶部热电阻/测温开关"] = "HR1CSI01",
+ ["大仓D顶部热电阻/测温开关"] = "HR1DSI01",
+ ["大仓E顶部热电阻/测温开关"] = "HR1ESI01",
+ ["大仓F顶部热电阻/测温开关"] = "HR1FSI01",
+ ["大仓G顶部热电阻/测温开关"] = "HR1GSI01",
+ ["大仓H顶部热电阻/测温开关"] = "HR1HSI01",
+ ["大仓I顶部热电阻/测温开关"] = "HR1ISI01",
+ ["大仓J顶部热电阻/测温开关"] = "HR1JSI01",
+ ["大仓O顶部热电阻/测温开关"] = "HR1OSI01",
+ ["输送线A_主管电磁比例阀"] = "SPV1DBT01",
+ ["输送线A_辅管电磁比例阀"] = "SPV1DBT02",
+ ["输送线B_主管电磁比例阀"] = "SPV2DBT01",
+ ["输送线B_辅管电磁比例阀"] = "SPV2DBT02",
+ ["输送线C_主管电磁比例阀"] = "SPV3DBT01",
+ ["输送线C_辅管电磁比例阀"] = "SPV3DBT02",
+ ["大仓A低部热电阻/测温开关"] = "From_SiloA",
+ ["大仓B低部热电阻/测温开关"] = "From_SiloB",
+ ["大仓C低部热电阻/测温开关"] = "From_SiloC",
+ ["大仓D低部热电阻/测温开关"] = "From_SiloD",
+ ["大仓E低部热电阻/测温开关"] = "From_SiloE",
+ ["大仓F低部热电阻/测温开关"] = "From_SiloF",
+ ["大仓G低部热电阻/测温开关"] = "From_SiloG",
+ ["大仓H低部热电阻/测温开关"] = "From_SiloH",
+ ["大仓I低部热电阻/测温开关"] = "From_SiloI",
+ ["大仓J低部热电阻/测温开关"] = "From_SiloJ",
+ ["大仓K低部热电阻/测温开关"] = "From_SiloK",
+ ["大仓L低部热电阻/测温开关"] = "From_SiloL",
+ ["大仓M低部热电阻/测温开关"] = "From_SiloM",
+ ["大仓N低部热电阻/测温开关"] = "From_SiloN",
+ ["大仓O低部热电阻/测温开关"] = "From_SiloO"
+
+ };
+ }
+}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.resx b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/InstrumentDataStateMonitor/InstrumentDataStateMonitor.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/ValveStateMonitor/ValveStateMonitor.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.Designer.cs
index 37e8bca..96badfd 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.Designer.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.Designer.cs
@@ -28,7 +28,6 @@
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
@@ -87,7 +86,7 @@
this.AutoMode_D = new System.Windows.Forms.Label();
this.DmChange_S = new System.Windows.Forms.ListBox();
this.DmChange_D = new System.Windows.Forms.ListBox();
- this.ValueTimer = new System.Windows.Forms.Timer(this.components);
+ this.Refresh = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
@@ -749,17 +748,22 @@
this.DmChange_D.TabIndex = 3;
this.DmChange_D.SelectedIndexChanged += new System.EventHandler(this.DmChange_D_SelectedIndexChanged);
//
- // ValueTimer
+ // Refresh
//
- this.ValueTimer.Enabled = true;
- this.ValueTimer.Interval = 1000;
- this.ValueTimer.Tick += new System.EventHandler(this.ValueTimer_Tick);
+ this.Refresh.Location = new System.Drawing.Point(113, 369);
+ this.Refresh.Name = "Refresh";
+ this.Refresh.Size = new System.Drawing.Size(164, 33);
+ this.Refresh.TabIndex = 4;
+ this.Refresh.Text = "刷新";
+ this.Refresh.UseVisualStyleBackColor = true;
+ this.Refresh.Click += new System.EventHandler(this.Refresh_Click);
//
// ValveStateMonitor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(397, 369);
+ this.ClientSize = new System.Drawing.Size(397, 414);
+ this.Controls.Add(this.Refresh);
this.Controls.Add(this.DmChange_D);
this.Controls.Add(this.DmChange_S);
this.Controls.Add(this.groupBox2);
@@ -834,6 +838,6 @@
private System.Windows.Forms.Label label27;
private System.Windows.Forms.ListBox DmChange_S;
private System.Windows.Forms.ListBox DmChange_D;
- private System.Windows.Forms.Timer ValueTimer;
+ private System.Windows.Forms.Button Refresh;
}
}
\ No newline at end of file
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.cs
index 96f7d55..acf8ead 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.cs
@@ -184,5 +184,10 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateMoni
}
+ private void Refresh_Click(object sender, EventArgs e)
+ {
+ StateMonitor_D(DmName_D);
+ StateMonitor_S(DmName_S);
+ }
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.resx b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.resx
index e9d931c..1af7de1 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.resx
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveStateMonitor/ValveStateMonitor.resx
@@ -117,7 +117,4 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
\ No newline at end of file
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
index 8368aa9..5c9e70d 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 @@
ElectronicMachinery_3.cs
+
+ Form
+
+
+ InstrumentDataStateMonitor.cs
+
Form
@@ -714,6 +720,9 @@
ElectronicMachinery_3.cs
+
+ InstrumentDataStateMonitor.cs
+
ValveStateControl.cs
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
index f820286..0c19065 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
@@ -8,6 +8,7 @@ using ICSharpCode.Core;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinaryStateMonitor;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinery;
+using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.InstrumentDataStateMonitor;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateControl;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateMonitor;
using Mesnac.Action.ChemicalWeighing.Entity;
@@ -42,7 +43,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test
// dbHelper.CommandText = sql;
- ValveStateMonitor Form = new ValveStateMonitor();
+ InstrumentDataStateMonitor Form = new InstrumentDataStateMonitor();
Form.Show();
diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml
index 06f5760..0ffe148 100644
--- a/Main/MCEdit/Data/MCProject/nodeDevice.xml
+++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml
@@ -6061,29 +6061,29 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+