Parcourir la source

1、修改指拨模式标志为指拨控制参数,需填写文本(待优化);
2、增加调试窗口,可读取指定存储器空间内容。

Dail il y a 1 an
Parent
commit
533ee4cc3c

BIN
.vs/MOTINOVA_MC_Test/v17/.suo


+ 219 - 72
MOTINOVA_MC_Test/Form1.Designer.cs

@@ -141,7 +141,6 @@
             this.comboBox_NoWatch = new System.Windows.Forms.ComboBox();
             this.comboBox_DownDec = new System.Windows.Forms.ComboBox();
             this.comboBox_StartMode = new System.Windows.Forms.ComboBox();
-            this.comboBox_Config_GasMode = new System.Windows.Forms.ComboBox();
             this.button_Write_Config = new System.Windows.Forms.Button();
             this.button_Read_Config = new System.Windows.Forms.Button();
             this.label27 = new System.Windows.Forms.Label();
@@ -159,6 +158,7 @@
             this.label31 = new System.Windows.Forms.Label();
             this.label30 = new System.Windows.Forms.Label();
             this.label34 = new System.Windows.Forms.Label();
+            this.textBox_Config_GasMode = new System.Windows.Forms.TextBox();
             this.textBox_Config_ECO_K = new System.Windows.Forms.TextBox();
             this.textBox_Config_WalkMotorSpeed = new System.Windows.Forms.TextBox();
             this.textBox_Config_WheelAdj = new System.Windows.Forms.TextBox();
@@ -363,6 +363,17 @@
             this.label127 = new System.Windows.Forms.Label();
             this.label1_Welcom = new System.Windows.Forms.Label();
             this.button_ReadAll = new System.Windows.Forms.Button();
+            this.groupBox18 = new System.Windows.Forms.GroupBox();
+            this.button_DebugRead = new System.Windows.Forms.Button();
+            this.textBox_DebugAddrEnd = new System.Windows.Forms.TextBox();
+            this.textBox_DebugAddrBegin = new System.Windows.Forms.TextBox();
+            this.label137 = new System.Windows.Forms.Label();
+            this.label138 = new System.Windows.Forms.Label();
+            this.checkBox_DebugAuto = new System.Windows.Forms.CheckBox();
+            this.radioButton_DebugDec = new System.Windows.Forms.RadioButton();
+            this.radioButton_DebugHex = new System.Windows.Forms.RadioButton();
+            this.checkBox_DebugReset = new System.Windows.Forms.CheckBox();
+            this.richTextBox_DebugInfo = new System.Windows.Forms.RichTextBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -381,6 +392,7 @@
             this.groupBox16.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.trackBar_MotorSpeedSet)).BeginInit();
             this.groupBox17.SuspendLayout();
+            this.groupBox18.SuspendLayout();
             this.SuspendLayout();
             // 
             // groupBox1
@@ -1594,7 +1606,6 @@
             this.groupBox10.Controls.Add(this.comboBox_NoWatch);
             this.groupBox10.Controls.Add(this.comboBox_DownDec);
             this.groupBox10.Controls.Add(this.comboBox_StartMode);
-            this.groupBox10.Controls.Add(this.comboBox_Config_GasMode);
             this.groupBox10.Controls.Add(this.button_Write_Config);
             this.groupBox10.Controls.Add(this.button_Read_Config);
             this.groupBox10.Controls.Add(this.label27);
@@ -1612,6 +1623,7 @@
             this.groupBox10.Controls.Add(this.label31);
             this.groupBox10.Controls.Add(this.label30);
             this.groupBox10.Controls.Add(this.label34);
+            this.groupBox10.Controls.Add(this.textBox_Config_GasMode);
             this.groupBox10.Controls.Add(this.textBox_Config_ECO_K);
             this.groupBox10.Controls.Add(this.textBox_Config_WalkMotorSpeed);
             this.groupBox10.Controls.Add(this.textBox_Config_WheelAdj);
@@ -1736,17 +1748,6 @@
             this.comboBox_StartMode.Size = new System.Drawing.Size(70, 28);
             this.comboBox_StartMode.TabIndex = 4;
             // 
-            // comboBox_Config_GasMode
-            // 
-            this.comboBox_Config_GasMode.FormattingEnabled = true;
-            this.comboBox_Config_GasMode.Items.AddRange(new object[] {
-            "不支持",
-            "支持"});
-            this.comboBox_Config_GasMode.Location = new System.Drawing.Point(80, 16);
-            this.comboBox_Config_GasMode.Name = "comboBox_Config_GasMode";
-            this.comboBox_Config_GasMode.Size = new System.Drawing.Size(70, 28);
-            this.comboBox_Config_GasMode.TabIndex = 4;
-            // 
             // button_Write_Config
             // 
             this.button_Write_Config.Enabled = false;
@@ -1902,6 +1903,14 @@
             this.label34.TabIndex = 2;
             this.label34.Text = "SMART加速";
             // 
+            // textBox_Config_GasMode
+            // 
+            this.textBox_Config_GasMode.Location = new System.Drawing.Point(80, 17);
+            this.textBox_Config_GasMode.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_Config_GasMode.Name = "textBox_Config_GasMode";
+            this.textBox_Config_GasMode.Size = new System.Drawing.Size(70, 26);
+            this.textBox_Config_GasMode.TabIndex = 2;
+            // 
             // textBox_Config_ECO_K
             // 
             this.textBox_Config_ECO_K.Location = new System.Drawing.Point(251, 17);
@@ -3059,7 +3068,7 @@
             this.groupBox14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.groupBox14.Location = new System.Drawing.Point(1070, 13);
             this.groupBox14.Name = "groupBox14";
-            this.groupBox14.Size = new System.Drawing.Size(318, 709);
+            this.groupBox14.Size = new System.Drawing.Size(318, 506);
             this.groupBox14.TabIndex = 14;
             this.groupBox14.TabStop = false;
             this.groupBox14.Text = "历史信息";
@@ -3068,7 +3077,7 @@
             // label99
             // 
             this.label99.AutoSize = true;
-            this.label99.Location = new System.Drawing.Point(5, 675);
+            this.label99.Location = new System.Drawing.Point(152, 399);
             this.label99.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label99.Name = "label99";
             this.label99.Size = new System.Drawing.Size(84, 20);
@@ -3077,7 +3086,7 @@
             // 
             // button_ReadErrorLog
             // 
-            this.button_ReadErrorLog.Location = new System.Drawing.Point(185, 663);
+            this.button_ReadErrorLog.Location = new System.Drawing.Point(193, 458);
             this.button_ReadErrorLog.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.button_ReadErrorLog.Name = "button_ReadErrorLog";
             this.button_ReadErrorLog.Size = new System.Drawing.Size(80, 35);
@@ -3089,7 +3098,7 @@
             // 
             // button_ReadRunLog
             // 
-            this.button_ReadRunLog.Location = new System.Drawing.Point(185, 620);
+            this.button_ReadRunLog.Location = new System.Drawing.Point(43, 458);
             this.button_ReadRunLog.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.button_ReadRunLog.Name = "button_ReadRunLog";
             this.button_ReadRunLog.Size = new System.Drawing.Size(80, 35);
@@ -3101,7 +3110,7 @@
             // label96
             // 
             this.label96.AutoSize = true;
-            this.label96.Location = new System.Drawing.Point(5, 611);
+            this.label96.Location = new System.Drawing.Point(152, 343);
             this.label96.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label96.Name = "label96";
             this.label96.Size = new System.Drawing.Size(79, 20);
@@ -3110,7 +3119,7 @@
             // 
             // textBox_Runlog1_MCU_MIN
             // 
-            this.textBox_Runlog1_MCU_MIN.Location = new System.Drawing.Point(90, 672);
+            this.textBox_Runlog1_MCU_MIN.Location = new System.Drawing.Point(247, 396);
             this.textBox_Runlog1_MCU_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_MCU_MIN.Name = "textBox_Runlog1_MCU_MIN";
             this.textBox_Runlog1_MCU_MIN.ReadOnly = true;
@@ -3119,7 +3128,7 @@
             // 
             // textBox_Runlog1_Coil_MIN
             // 
-            this.textBox_Runlog1_Coil_MIN.Location = new System.Drawing.Point(90, 608);
+            this.textBox_Runlog1_Coil_MIN.Location = new System.Drawing.Point(247, 340);
             this.textBox_Runlog1_Coil_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Coil_MIN.Name = "textBox_Runlog1_Coil_MIN";
             this.textBox_Runlog1_Coil_MIN.ReadOnly = true;
@@ -3129,7 +3138,7 @@
             // label98
             // 
             this.label98.AutoSize = true;
-            this.label98.Location = new System.Drawing.Point(5, 643);
+            this.label98.Location = new System.Drawing.Point(152, 371);
             this.label98.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label98.Name = "label98";
             this.label98.Size = new System.Drawing.Size(84, 20);
@@ -3138,7 +3147,7 @@
             // 
             // textBox_Runlog1_MCU_MAX
             // 
-            this.textBox_Runlog1_MCU_MAX.Location = new System.Drawing.Point(90, 640);
+            this.textBox_Runlog1_MCU_MAX.Location = new System.Drawing.Point(247, 368);
             this.textBox_Runlog1_MCU_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_MCU_MAX.Name = "textBox_Runlog1_MCU_MAX";
             this.textBox_Runlog1_MCU_MAX.ReadOnly = true;
@@ -3148,7 +3157,7 @@
             // label97
             // 
             this.label97.AutoSize = true;
-            this.label97.Location = new System.Drawing.Point(5, 579);
+            this.label97.Location = new System.Drawing.Point(152, 315);
             this.label97.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label97.Name = "label97";
             this.label97.Size = new System.Drawing.Size(79, 20);
@@ -3157,7 +3166,7 @@
             // 
             // textBox_Runlog1_Coil_MAX
             // 
-            this.textBox_Runlog1_Coil_MAX.Location = new System.Drawing.Point(90, 575);
+            this.textBox_Runlog1_Coil_MAX.Location = new System.Drawing.Point(247, 312);
             this.textBox_Runlog1_Coil_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Coil_MAX.Name = "textBox_Runlog1_Coil_MAX";
             this.textBox_Runlog1_Coil_MAX.ReadOnly = true;
@@ -3167,7 +3176,7 @@
             // label95
             // 
             this.label95.AutoSize = true;
-            this.label95.Location = new System.Drawing.Point(5, 547);
+            this.label95.Location = new System.Drawing.Point(152, 287);
             this.label95.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label95.Name = "label95";
             this.label95.Size = new System.Drawing.Size(78, 20);
@@ -3176,7 +3185,7 @@
             // 
             // textBox_Runlog1_PCB_MIN
             // 
-            this.textBox_Runlog1_PCB_MIN.Location = new System.Drawing.Point(90, 543);
+            this.textBox_Runlog1_PCB_MIN.Location = new System.Drawing.Point(247, 284);
             this.textBox_Runlog1_PCB_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PCB_MIN.Name = "textBox_Runlog1_PCB_MIN";
             this.textBox_Runlog1_PCB_MIN.ReadOnly = true;
@@ -3186,7 +3195,7 @@
             // label94
             // 
             this.label94.AutoSize = true;
-            this.label94.Location = new System.Drawing.Point(5, 515);
+            this.label94.Location = new System.Drawing.Point(152, 259);
             this.label94.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label94.Name = "label94";
             this.label94.Size = new System.Drawing.Size(78, 20);
@@ -3195,7 +3204,7 @@
             // 
             // textBox_Runlog1_PCB_MAX
             // 
-            this.textBox_Runlog1_PCB_MAX.Location = new System.Drawing.Point(90, 511);
+            this.textBox_Runlog1_PCB_MAX.Location = new System.Drawing.Point(247, 256);
             this.textBox_Runlog1_PCB_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PCB_MAX.Name = "textBox_Runlog1_PCB_MAX";
             this.textBox_Runlog1_PCB_MAX.ReadOnly = true;
@@ -3205,7 +3214,7 @@
             // label93
             // 
             this.label93.AutoSize = true;
-            this.label93.Location = new System.Drawing.Point(6, 483);
+            this.label93.Location = new System.Drawing.Point(6, 427);
             this.label93.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label93.Name = "label93";
             this.label93.Size = new System.Drawing.Size(79, 20);
@@ -3214,7 +3223,7 @@
             // 
             // textBox_Runlog1_PBUFault
             // 
-            this.textBox_Runlog1_PBUFault.Location = new System.Drawing.Point(90, 479);
+            this.textBox_Runlog1_PBUFault.Location = new System.Drawing.Point(90, 424);
             this.textBox_Runlog1_PBUFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PBUFault.Name = "textBox_Runlog1_PBUFault";
             this.textBox_Runlog1_PBUFault.ReadOnly = true;
@@ -3224,7 +3233,7 @@
             // label92
             // 
             this.label92.AutoSize = true;
-            this.label92.Location = new System.Drawing.Point(6, 451);
+            this.label92.Location = new System.Drawing.Point(6, 399);
             this.label92.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label92.Name = "label92";
             this.label92.Size = new System.Drawing.Size(80, 20);
@@ -3233,7 +3242,7 @@
             // 
             // textBox_Runlog1_HMIFault
             // 
-            this.textBox_Runlog1_HMIFault.Location = new System.Drawing.Point(90, 448);
+            this.textBox_Runlog1_HMIFault.Location = new System.Drawing.Point(90, 396);
             this.textBox_Runlog1_HMIFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_HMIFault.Name = "textBox_Runlog1_HMIFault";
             this.textBox_Runlog1_HMIFault.ReadOnly = true;
@@ -3243,7 +3252,7 @@
             // label91
             // 
             this.label91.AutoSize = true;
-            this.label91.Location = new System.Drawing.Point(6, 419);
+            this.label91.Location = new System.Drawing.Point(6, 371);
             this.label91.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label91.Name = "label91";
             this.label91.Size = new System.Drawing.Size(82, 20);
@@ -3252,7 +3261,7 @@
             // 
             // textBox_Runlog1_BMSFault
             // 
-            this.textBox_Runlog1_BMSFault.Location = new System.Drawing.Point(90, 416);
+            this.textBox_Runlog1_BMSFault.Location = new System.Drawing.Point(90, 368);
             this.textBox_Runlog1_BMSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_BMSFault.Name = "textBox_Runlog1_BMSFault";
             this.textBox_Runlog1_BMSFault.ReadOnly = true;
@@ -3262,7 +3271,7 @@
             // label90
             // 
             this.label90.AutoSize = true;
-            this.label90.Location = new System.Drawing.Point(5, 387);
+            this.label90.Location = new System.Drawing.Point(5, 343);
             this.label90.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label90.Name = "label90";
             this.label90.Size = new System.Drawing.Size(65, 20);
@@ -3271,7 +3280,7 @@
             // 
             // textBox_Runlog1_NTCFault
             // 
-            this.textBox_Runlog1_NTCFault.Location = new System.Drawing.Point(90, 384);
+            this.textBox_Runlog1_NTCFault.Location = new System.Drawing.Point(90, 340);
             this.textBox_Runlog1_NTCFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_NTCFault.Name = "textBox_Runlog1_NTCFault";
             this.textBox_Runlog1_NTCFault.ReadOnly = true;
@@ -3281,7 +3290,7 @@
             // label89
             // 
             this.label89.AutoSize = true;
-            this.label89.Location = new System.Drawing.Point(5, 355);
+            this.label89.Location = new System.Drawing.Point(5, 315);
             this.label89.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label89.Name = "label89";
             this.label89.Size = new System.Drawing.Size(65, 20);
@@ -3290,7 +3299,7 @@
             // 
             // textBox_Runlog1_Phase
             // 
-            this.textBox_Runlog1_Phase.Location = new System.Drawing.Point(90, 352);
+            this.textBox_Runlog1_Phase.Location = new System.Drawing.Point(90, 312);
             this.textBox_Runlog1_Phase.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Phase.Name = "textBox_Runlog1_Phase";
             this.textBox_Runlog1_Phase.ReadOnly = true;
@@ -3300,7 +3309,7 @@
             // label88
             // 
             this.label88.AutoSize = true;
-            this.label88.Location = new System.Drawing.Point(5, 323);
+            this.label88.Location = new System.Drawing.Point(5, 287);
             this.label88.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label88.Name = "label88";
             this.label88.Size = new System.Drawing.Size(65, 20);
@@ -3309,7 +3318,7 @@
             // 
             // textBox_Runlog1_HallFault
             // 
-            this.textBox_Runlog1_HallFault.Location = new System.Drawing.Point(90, 320);
+            this.textBox_Runlog1_HallFault.Location = new System.Drawing.Point(90, 284);
             this.textBox_Runlog1_HallFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_HallFault.Name = "textBox_Runlog1_HallFault";
             this.textBox_Runlog1_HallFault.ReadOnly = true;
@@ -3319,7 +3328,7 @@
             // label87
             // 
             this.label87.AutoSize = true;
-            this.label87.Location = new System.Drawing.Point(5, 291);
+            this.label87.Location = new System.Drawing.Point(5, 259);
             this.label87.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label87.Name = "label87";
             this.label87.Size = new System.Drawing.Size(64, 20);
@@ -3328,7 +3337,7 @@
             // 
             // textBox_Runlog1_TQSFault
             // 
-            this.textBox_Runlog1_TQSFault.Location = new System.Drawing.Point(90, 288);
+            this.textBox_Runlog1_TQSFault.Location = new System.Drawing.Point(90, 256);
             this.textBox_Runlog1_TQSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_TQSFault.Name = "textBox_Runlog1_TQSFault";
             this.textBox_Runlog1_TQSFault.ReadOnly = true;
@@ -3338,7 +3347,7 @@
             // label86
             // 
             this.label86.AutoSize = true;
-            this.label86.Location = new System.Drawing.Point(5, 259);
+            this.label86.Location = new System.Drawing.Point(5, 231);
             this.label86.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label86.Name = "label86";
             this.label86.Size = new System.Drawing.Size(62, 20);
@@ -3347,7 +3356,7 @@
             // 
             // textBox_Runlog1_SPSFault
             // 
-            this.textBox_Runlog1_SPSFault.Location = new System.Drawing.Point(90, 256);
+            this.textBox_Runlog1_SPSFault.Location = new System.Drawing.Point(90, 228);
             this.textBox_Runlog1_SPSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_SPSFault.Name = "textBox_Runlog1_SPSFault";
             this.textBox_Runlog1_SPSFault.ReadOnly = true;
@@ -3357,7 +3366,7 @@
             // label85
             // 
             this.label85.AutoSize = true;
-            this.label85.Location = new System.Drawing.Point(5, 227);
+            this.label85.Location = new System.Drawing.Point(5, 203);
             this.label85.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label85.Name = "label85";
             this.label85.Size = new System.Drawing.Size(65, 20);
@@ -3366,7 +3375,7 @@
             // 
             // textBox_Runlog1_OT
             // 
-            this.textBox_Runlog1_OT.Location = new System.Drawing.Point(90, 224);
+            this.textBox_Runlog1_OT.Location = new System.Drawing.Point(90, 200);
             this.textBox_Runlog1_OT.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OT.Name = "textBox_Runlog1_OT";
             this.textBox_Runlog1_OT.ReadOnly = true;
@@ -3376,7 +3385,7 @@
             // label84
             // 
             this.label84.AutoSize = true;
-            this.label84.Location = new System.Drawing.Point(5, 195);
+            this.label84.Location = new System.Drawing.Point(5, 176);
             this.label84.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label84.Name = "label84";
             this.label84.Size = new System.Drawing.Size(65, 20);
@@ -3385,7 +3394,7 @@
             // 
             // textBox_Runlog1_Lock
             // 
-            this.textBox_Runlog1_Lock.Location = new System.Drawing.Point(90, 192);
+            this.textBox_Runlog1_Lock.Location = new System.Drawing.Point(90, 172);
             this.textBox_Runlog1_Lock.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Lock.Name = "textBox_Runlog1_Lock";
             this.textBox_Runlog1_Lock.ReadOnly = true;
@@ -3395,7 +3404,7 @@
             // label83
             // 
             this.label83.AutoSize = true;
-            this.label83.Location = new System.Drawing.Point(5, 163);
+            this.label83.Location = new System.Drawing.Point(5, 147);
             this.label83.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label83.Name = "label83";
             this.label83.Size = new System.Drawing.Size(65, 20);
@@ -3404,7 +3413,7 @@
             // 
             // textBox_Runlog1_OV
             // 
-            this.textBox_Runlog1_OV.Location = new System.Drawing.Point(90, 160);
+            this.textBox_Runlog1_OV.Location = new System.Drawing.Point(90, 144);
             this.textBox_Runlog1_OV.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OV.Name = "textBox_Runlog1_OV";
             this.textBox_Runlog1_OV.ReadOnly = true;
@@ -3414,7 +3423,7 @@
             // label82
             // 
             this.label82.AutoSize = true;
-            this.label82.Location = new System.Drawing.Point(5, 131);
+            this.label82.Location = new System.Drawing.Point(5, 119);
             this.label82.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label82.Name = "label82";
             this.label82.Size = new System.Drawing.Size(65, 20);
@@ -3423,7 +3432,7 @@
             // 
             // textBox_Runlog1_UV
             // 
-            this.textBox_Runlog1_UV.Location = new System.Drawing.Point(90, 128);
+            this.textBox_Runlog1_UV.Location = new System.Drawing.Point(90, 116);
             this.textBox_Runlog1_UV.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_UV.Name = "textBox_Runlog1_UV";
             this.textBox_Runlog1_UV.ReadOnly = true;
@@ -3433,7 +3442,7 @@
             // label81
             // 
             this.label81.AutoSize = true;
-            this.label81.Location = new System.Drawing.Point(5, 99);
+            this.label81.Location = new System.Drawing.Point(5, 91);
             this.label81.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label81.Name = "label81";
             this.label81.Size = new System.Drawing.Size(65, 20);
@@ -3442,7 +3451,7 @@
             // 
             // textBox_Runlog1_OC
             // 
-            this.textBox_Runlog1_OC.Location = new System.Drawing.Point(90, 96);
+            this.textBox_Runlog1_OC.Location = new System.Drawing.Point(90, 88);
             this.textBox_Runlog1_OC.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OC.Name = "textBox_Runlog1_OC";
             this.textBox_Runlog1_OC.ReadOnly = true;
@@ -3452,7 +3461,7 @@
             // label80
             // 
             this.label80.AutoSize = true;
-            this.label80.Location = new System.Drawing.Point(5, 67);
+            this.label80.Location = new System.Drawing.Point(5, 63);
             this.label80.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label80.Name = "label80";
             this.label80.Size = new System.Drawing.Size(65, 20);
@@ -3461,7 +3470,7 @@
             // 
             // textBox_Runlog1_RunTime
             // 
-            this.textBox_Runlog1_RunTime.Location = new System.Drawing.Point(90, 64);
+            this.textBox_Runlog1_RunTime.Location = new System.Drawing.Point(90, 60);
             this.textBox_Runlog1_RunTime.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_RunTime.Name = "textBox_Runlog1_RunTime";
             this.textBox_Runlog1_RunTime.ReadOnly = true;
@@ -3471,7 +3480,7 @@
             // label107
             // 
             this.label107.AutoSize = true;
-            this.label107.Location = new System.Drawing.Point(152, 259);
+            this.label107.Location = new System.Drawing.Point(152, 231);
             this.label107.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label107.Name = "label107";
             this.label107.Size = new System.Drawing.Size(81, 20);
@@ -3480,7 +3489,7 @@
             // 
             // textBox_Runlog2_TE_CircuitFault
             // 
-            this.textBox_Runlog2_TE_CircuitFault.Location = new System.Drawing.Point(247, 256);
+            this.textBox_Runlog2_TE_CircuitFault.Location = new System.Drawing.Point(247, 228);
             this.textBox_Runlog2_TE_CircuitFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_TE_CircuitFault.Name = "textBox_Runlog2_TE_CircuitFault";
             this.textBox_Runlog2_TE_CircuitFault.ReadOnly = true;
@@ -3490,7 +3499,7 @@
             // label106
             // 
             this.label106.AutoSize = true;
-            this.label106.Location = new System.Drawing.Point(152, 227);
+            this.label106.Location = new System.Drawing.Point(152, 203);
             this.label106.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label106.Name = "label106";
             this.label106.Size = new System.Drawing.Size(92, 20);
@@ -3499,7 +3508,7 @@
             // 
             // textBox_Runlog2_TE_MCUFault
             // 
-            this.textBox_Runlog2_TE_MCUFault.Location = new System.Drawing.Point(247, 224);
+            this.textBox_Runlog2_TE_MCUFault.Location = new System.Drawing.Point(247, 200);
             this.textBox_Runlog2_TE_MCUFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_TE_MCUFault.Name = "textBox_Runlog2_TE_MCUFault";
             this.textBox_Runlog2_TE_MCUFault.ReadOnly = true;
@@ -3509,7 +3518,7 @@
             // label105
             // 
             this.label105.AutoSize = true;
-            this.label105.Location = new System.Drawing.Point(152, 195);
+            this.label105.Location = new System.Drawing.Point(152, 175);
             this.label105.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label105.Name = "label105";
             this.label105.Size = new System.Drawing.Size(65, 20);
@@ -3518,7 +3527,7 @@
             // 
             // textBox_Runlog2_CircuitFault
             // 
-            this.textBox_Runlog2_CircuitFault.Location = new System.Drawing.Point(247, 192);
+            this.textBox_Runlog2_CircuitFault.Location = new System.Drawing.Point(247, 172);
             this.textBox_Runlog2_CircuitFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_CircuitFault.Name = "textBox_Runlog2_CircuitFault";
             this.textBox_Runlog2_CircuitFault.ReadOnly = true;
@@ -3528,7 +3537,7 @@
             // label104
             // 
             this.label104.AutoSize = true;
-            this.label104.Location = new System.Drawing.Point(152, 163);
+            this.label104.Location = new System.Drawing.Point(152, 147);
             this.label104.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label104.Name = "label104";
             this.label104.Size = new System.Drawing.Size(65, 20);
@@ -3537,7 +3546,7 @@
             // 
             // textBox_Runlog2_VolFault
             // 
-            this.textBox_Runlog2_VolFault.Location = new System.Drawing.Point(247, 160);
+            this.textBox_Runlog2_VolFault.Location = new System.Drawing.Point(247, 144);
             this.textBox_Runlog2_VolFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_VolFault.Name = "textBox_Runlog2_VolFault";
             this.textBox_Runlog2_VolFault.ReadOnly = true;
@@ -3547,7 +3556,7 @@
             // label103
             // 
             this.label103.AutoSize = true;
-            this.label103.Location = new System.Drawing.Point(152, 132);
+            this.label103.Location = new System.Drawing.Point(152, 119);
             this.label103.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label103.Name = "label103";
             this.label103.Size = new System.Drawing.Size(70, 20);
@@ -3556,7 +3565,7 @@
             // 
             // textBox_Runlog2_MOS_SC
             // 
-            this.textBox_Runlog2_MOS_SC.Location = new System.Drawing.Point(247, 128);
+            this.textBox_Runlog2_MOS_SC.Location = new System.Drawing.Point(247, 116);
             this.textBox_Runlog2_MOS_SC.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_MOS_SC.Name = "textBox_Runlog2_MOS_SC";
             this.textBox_Runlog2_MOS_SC.ReadOnly = true;
@@ -3566,7 +3575,7 @@
             // label102
             // 
             this.label102.AutoSize = true;
-            this.label102.Location = new System.Drawing.Point(152, 101);
+            this.label102.Location = new System.Drawing.Point(152, 91);
             this.label102.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label102.Name = "label102";
             this.label102.Size = new System.Drawing.Size(65, 20);
@@ -3575,7 +3584,7 @@
             // 
             // textBox_Runlog2_GasFault
             // 
-            this.textBox_Runlog2_GasFault.Location = new System.Drawing.Point(247, 96);
+            this.textBox_Runlog2_GasFault.Location = new System.Drawing.Point(247, 88);
             this.textBox_Runlog2_GasFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_GasFault.Name = "textBox_Runlog2_GasFault";
             this.textBox_Runlog2_GasFault.ReadOnly = true;
@@ -3585,7 +3594,7 @@
             // label101
             // 
             this.label101.AutoSize = true;
-            this.label101.Location = new System.Drawing.Point(152, 68);
+            this.label101.Location = new System.Drawing.Point(152, 63);
             this.label101.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label101.Name = "label101";
             this.label101.Size = new System.Drawing.Size(65, 20);
@@ -3594,7 +3603,7 @@
             // 
             // textBox_Runlog2_CDSFault
             // 
-            this.textBox_Runlog2_CDSFault.Location = new System.Drawing.Point(247, 64);
+            this.textBox_Runlog2_CDSFault.Location = new System.Drawing.Point(247, 60);
             this.textBox_Runlog2_CDSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_CDSFault.Name = "textBox_Runlog2_CDSFault";
             this.textBox_Runlog2_CDSFault.ReadOnly = true;
@@ -4033,12 +4042,137 @@
             this.button_ReadAll.Visible = false;
             this.button_ReadAll.Click += new System.EventHandler(this.button_ReadAll_Click);
             // 
+            // groupBox18
+            // 
+            this.groupBox18.Controls.Add(this.richTextBox_DebugInfo);
+            this.groupBox18.Controls.Add(this.radioButton_DebugHex);
+            this.groupBox18.Controls.Add(this.radioButton_DebugDec);
+            this.groupBox18.Controls.Add(this.checkBox_DebugReset);
+            this.groupBox18.Controls.Add(this.checkBox_DebugAuto);
+            this.groupBox18.Controls.Add(this.button_DebugRead);
+            this.groupBox18.Controls.Add(this.textBox_DebugAddrEnd);
+            this.groupBox18.Controls.Add(this.textBox_DebugAddrBegin);
+            this.groupBox18.Controls.Add(this.label137);
+            this.groupBox18.Controls.Add(this.label138);
+            this.groupBox18.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBox18.Location = new System.Drawing.Point(1070, 523);
+            this.groupBox18.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.groupBox18.Name = "groupBox18";
+            this.groupBox18.Padding = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.groupBox18.Size = new System.Drawing.Size(318, 206);
+            this.groupBox18.TabIndex = 9;
+            this.groupBox18.TabStop = false;
+            this.groupBox18.Text = "内部存储器";
+            this.groupBox18.Visible = false;
+            // 
+            // button_DebugRead
+            // 
+            this.button_DebugRead.Location = new System.Drawing.Point(252, 168);
+            this.button_DebugRead.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.button_DebugRead.Name = "button_DebugRead";
+            this.button_DebugRead.Size = new System.Drawing.Size(58, 30);
+            this.button_DebugRead.TabIndex = 2;
+            this.button_DebugRead.Text = "读取";
+            this.button_DebugRead.UseVisualStyleBackColor = true;
+            this.button_DebugRead.Click += new System.EventHandler(this.button_DebugRead_Click);
+            // 
+            // textBox_DebugAddrEnd
+            // 
+            this.textBox_DebugAddrEnd.Location = new System.Drawing.Point(229, 22);
+            this.textBox_DebugAddrEnd.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_DebugAddrEnd.Name = "textBox_DebugAddrEnd";
+            this.textBox_DebugAddrEnd.Size = new System.Drawing.Size(80, 26);
+            this.textBox_DebugAddrEnd.TabIndex = 2;
+            this.textBox_DebugAddrEnd.Text = "08000001";
+            // 
+            // textBox_DebugAddrBegin
+            // 
+            this.textBox_DebugAddrBegin.Location = new System.Drawing.Point(76, 22);
+            this.textBox_DebugAddrBegin.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_DebugAddrBegin.Name = "textBox_DebugAddrBegin";
+            this.textBox_DebugAddrBegin.Size = new System.Drawing.Size(80, 26);
+            this.textBox_DebugAddrBegin.TabIndex = 2;
+            this.textBox_DebugAddrBegin.Text = "08000000";
+            // 
+            // label137
+            // 
+            this.label137.AutoSize = true;
+            this.label137.Location = new System.Drawing.Point(160, 25);
+            this.label137.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label137.Name = "label137";
+            this.label137.Size = new System.Drawing.Size(65, 20);
+            this.label137.TabIndex = 2;
+            this.label137.Text = "结束地址";
+            // 
+            // label138
+            // 
+            this.label138.AutoSize = true;
+            this.label138.Location = new System.Drawing.Point(7, 25);
+            this.label138.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label138.Name = "label138";
+            this.label138.Size = new System.Drawing.Size(65, 20);
+            this.label138.TabIndex = 2;
+            this.label138.Text = "起始地址";
+            // 
+            // checkBox_DebugAuto
+            // 
+            this.checkBox_DebugAuto.AutoSize = true;
+            this.checkBox_DebugAuto.Location = new System.Drawing.Point(252, 139);
+            this.checkBox_DebugAuto.Name = "checkBox_DebugAuto";
+            this.checkBox_DebugAuto.Size = new System.Drawing.Size(56, 24);
+            this.checkBox_DebugAuto.TabIndex = 6;
+            this.checkBox_DebugAuto.Text = "自动";
+            this.checkBox_DebugAuto.UseVisualStyleBackColor = true;
+            // 
+            // radioButton_DebugDec
+            // 
+            this.radioButton_DebugDec.AutoSize = true;
+            this.radioButton_DebugDec.Checked = true;
+            this.radioButton_DebugDec.Location = new System.Drawing.Point(252, 52);
+            this.radioButton_DebugDec.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.radioButton_DebugDec.Name = "radioButton_DebugDec";
+            this.radioButton_DebugDec.Size = new System.Drawing.Size(55, 24);
+            this.radioButton_DebugDec.TabIndex = 6;
+            this.radioButton_DebugDec.Text = "DEC";
+            this.radioButton_DebugDec.UseVisualStyleBackColor = true;
+            // 
+            // radioButton_DebugHex
+            // 
+            this.radioButton_DebugHex.AutoSize = true;
+            this.radioButton_DebugHex.Location = new System.Drawing.Point(252, 81);
+            this.radioButton_DebugHex.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.radioButton_DebugHex.Name = "radioButton_DebugHex";
+            this.radioButton_DebugHex.Size = new System.Drawing.Size(55, 24);
+            this.radioButton_DebugHex.TabIndex = 7;
+            this.radioButton_DebugHex.Text = "HEX";
+            this.radioButton_DebugHex.UseVisualStyleBackColor = true;
+            // 
+            // checkBox_DebugReset
+            // 
+            this.checkBox_DebugReset.AutoSize = true;
+            this.checkBox_DebugReset.Location = new System.Drawing.Point(252, 110);
+            this.checkBox_DebugReset.Name = "checkBox_DebugReset";
+            this.checkBox_DebugReset.Size = new System.Drawing.Size(56, 24);
+            this.checkBox_DebugReset.TabIndex = 6;
+            this.checkBox_DebugReset.Text = "清除";
+            this.checkBox_DebugReset.UseVisualStyleBackColor = true;
+            // 
+            // richTextBox_DebugInfo
+            // 
+            this.richTextBox_DebugInfo.Location = new System.Drawing.Point(10, 51);
+            this.richTextBox_DebugInfo.Name = "richTextBox_DebugInfo";
+            this.richTextBox_DebugInfo.ReadOnly = true;
+            this.richTextBox_DebugInfo.Size = new System.Drawing.Size(234, 146);
+            this.richTextBox_DebugInfo.TabIndex = 8;
+            this.richTextBox_DebugInfo.Text = "";
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(120)))));
             this.ClientSize = new System.Drawing.Size(1394, 792);
+            this.Controls.Add(this.groupBox18);
             this.Controls.Add(this.button_ReadAll);
             this.Controls.Add(this.label127);
             this.Controls.Add(this.groupBox17);
@@ -4070,7 +4204,7 @@
             this.MaximizeBox = false;
             this.Name = "Form1";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "MOTINOVA中置电机配置软件V2.1.6(内部使用)";
+            this.Text = "MOTINOVA中置电机配置软件V2.1.7(内部使用)";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
             this.Load += new System.EventHandler(this.Form1_Load);
@@ -4108,6 +4242,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.trackBar_MotorSpeedSet)).EndInit();
             this.groupBox17.ResumeLayout(false);
             this.groupBox17.PerformLayout();
+            this.groupBox18.ResumeLayout(false);
+            this.groupBox18.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -4432,7 +4568,6 @@
         private System.Windows.Forms.ComboBox comboBox_NoWatch;
         private System.Windows.Forms.ComboBox comboBox_DownDec;
         private System.Windows.Forms.ComboBox comboBox_StartMode;
-        private System.Windows.Forms.ComboBox comboBox_Config_GasMode;
         private System.Windows.Forms.ComboBox comboBox_TailLightVol;
         private System.Windows.Forms.ComboBox comboBox_AttiSensor;
         private System.Windows.Forms.ComboBox comboBox_FrontLigthVol;
@@ -4448,6 +4583,18 @@
         private System.Windows.Forms.TextBox textBox_Config_SpeedAlarm;
         private System.Windows.Forms.Label label132;
         private System.Windows.Forms.Button button_ReadAll;
+        private System.Windows.Forms.TextBox textBox_Config_GasMode;
+        private System.Windows.Forms.GroupBox groupBox18;
+        private System.Windows.Forms.RadioButton radioButton_DebugHex;
+        private System.Windows.Forms.RadioButton radioButton_DebugDec;
+        private System.Windows.Forms.CheckBox checkBox_DebugReset;
+        private System.Windows.Forms.CheckBox checkBox_DebugAuto;
+        private System.Windows.Forms.Button button_DebugRead;
+        private System.Windows.Forms.TextBox textBox_DebugAddrEnd;
+        private System.Windows.Forms.TextBox textBox_DebugAddrBegin;
+        private System.Windows.Forms.Label label137;
+        private System.Windows.Forms.Label label138;
+        private System.Windows.Forms.RichTextBox richTextBox_DebugInfo;
     }
 }
 

+ 235 - 22
MOTINOVA_MC_Test/Form1.cs

@@ -8,6 +8,7 @@ using System.Windows.Forms;
 using System.IO.Ports;
 using System.Threading;
 using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
 
 namespace MOTINOVA_MC_Test
 {
@@ -279,12 +280,12 @@ namespace MOTINOVA_MC_Test
         #endregion
 
         #region 发送指令函数
-        private void SendCmd(ushort ID, byte Mode, ushort Cmd, byte[] Data)
+        private bool SendCmd(ushort ID, byte Mode, ushort Cmd, byte[] Data)
         {
             if (!serialPort1.IsOpen)
             {
                 MessageBox.Show("串口未连接");    
-                return;
+                return false;
             }
 
             ushort DataLength = (ushort)(Cmd & 0xFF);
@@ -321,6 +322,8 @@ namespace MOTINOVA_MC_Test
             //发送数据
             serialPort1.Write(SendCmdTmp, 0, SendCmdTmp.Length);
 
+            return true;
+
         }
         #endregion
 
@@ -943,7 +946,8 @@ namespace MOTINOVA_MC_Test
 
                     if (serialPort1.IsOpen)
                     {
-                        SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2802, CtrlCode);
+                        if (!SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2802, CtrlCode))
+                            checkBox_AutoSend.Checked = false;
                     }                   
                 }
             }
@@ -960,8 +964,9 @@ namespace MOTINOVA_MC_Test
                 {
                     AutoSendReadAttitudeAngleTimeCnt = 0;
                     if (serialPort1.IsOpen)
-                    { 
-                        SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2F00, null);
+                    {
+                        if (!SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2F00, null))
+                            checkBox_ReadAttitudeAngleAutoSend.Checked = false;
                     }        
                 }
             }
@@ -978,8 +983,9 @@ namespace MOTINOVA_MC_Test
                 {
                     AutoSendReadRideInfoTimeCnt = 0;
                     if (serialPort1.IsOpen)
-                    { 
-                        SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2E00, null);
+                    {
+                        if (!SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2E00, null))
+                            checkBox_ReadRideInfo.Checked = false;
                     }
                     
                 }
@@ -1519,14 +1525,7 @@ namespace MOTINOVA_MC_Test
                                 {
                                     //指拨模式
                                     DataTemp = (ushort)(binary_data_1[2]);
-                                    if (DataTemp == 0x55)
-                                    {
-                                        comboBox_Config_GasMode.Text = "不支持";
-                                    }
-                                    else if (DataTemp == 0xAA)
-                                    {
-                                        comboBox_Config_GasMode.Text = "支持";
-                                    }
+                                    textBox_Config_GasMode.Text = Convert.ToString(DataTemp, 16).PadLeft(2, '0').ToUpper();                                   
                                     //启动模式
                                     DataTemp = (ushort)(binary_data_1[3]);
                                     if (DataTemp == 0x01)
@@ -1757,7 +1756,94 @@ namespace MOTINOVA_MC_Test
                             }
                             break;
                         }
-                    case 0xAB88://TE APP版本信息
+                    case 0xAB09://存储器数据
+                    case 0xAB0A:
+                    case 0xAB0B:
+                    case 0xAB0C:
+                        {
+                            unchecked
+                            {
+                                this.Invoke((EventHandler)(delegate
+                                {
+                                    long ByteNum = 0;
+                                    ByteNum = ((binary_data_1[6] << 24) + (binary_data_1[7] << 16) + (binary_data_1[8] << 8) + binary_data_1[9]) - ((binary_data_1[2] << 24) + (binary_data_1[3] << 16) + (binary_data_1[4] << 8) + binary_data_1[5]) + 1;
+                                    if (ByteNum > 4) //数据长度超过4Bytes,按照16进制显示字节流
+                                    {
+                                        for (int i = 0; i < ByteNum; i++)
+                                        {
+                                            richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10 + i], 16).PadLeft(2, '0').ToUpper() + " ");
+                                        }
+                                    }
+                                    else //根据设置自动转换10进制显示
+                                    {
+                                        if (radioButton_DebugDec.Checked == true) //10进制显示
+                                        {
+                                            switch (ByteNum)
+                                            {
+                                                case 1:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10]) + ", ");
+                                                        break;
+                                                    }
+                                                case 2:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8)) + ", ");
+                                                        break;
+                                                    }
+                                                case 3:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8) + (binary_data_1[12] << 16)) + ", ");
+                                                        break;
+                                                    }
+                                                case 4:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8) + (binary_data_1[12] << 16) + (binary_data_1[13] << 24)) + ", ");
+                                                        break;
+                                                    }
+                                                default:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("无效数据" + ", ");
+                                                        break;
+                                                    }
+                                            }
+                                        }
+                                        else if (radioButton_DebugHex.Checked == true)//16进制显示
+                                        {
+                                            switch (ByteNum)
+                                            {
+                                                case 1:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("0x" + Convert.ToString(binary_data_1[10], 16).PadLeft(2, '0').ToUpper() + ", ");
+                                                        break;
+                                                    }
+                                                case 2:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("0x" + Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8), 16).PadLeft(4, '0').ToUpper() + ", ");
+                                                        break;
+                                                    }
+                                                case 3:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("0x" + Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8) + (binary_data_1[12] << 16), 16).PadLeft(6, '0').ToUpper() + ", ");
+                                                        break;
+                                                    }
+                                                case 4:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("0x" + Convert.ToString(binary_data_1[10] + (binary_data_1[11] << 8) + (binary_data_1[12] << 16) + (binary_data_1[13] << 24), 16).PadLeft(8, '0').ToUpper() + ", ");
+                                                        break;
+                                                    }
+                                                default:
+                                                    {
+                                                        richTextBox_DebugInfo.AppendText("无效数据" + ", ");
+                                                        break;
+                                                    }
+                                            }
+                                        }
+                                    }
+                                }));
+                            }
+                            break;
+                        }
+                    case 0xAB88://故障日志
                         {
                             unchecked
                             {
@@ -2015,6 +2101,25 @@ namespace MOTINOVA_MC_Test
                         }
                     default: break;
                 }
+                //存储器导出数据显示
+                if ((CmdTemp & 0xFF00) == 0xAB00)
+                {
+                    unchecked
+                    {
+                        this.Invoke((EventHandler)(delegate
+                        {
+                            long ByteNum = 0;
+                            ByteNum = ((binary_data_1[6] << 24) + (binary_data_1[7] << 16) + (binary_data_1[8] << 8) + binary_data_1[9]) - ((binary_data_1[2] << 24) + (binary_data_1[3] << 16) + (binary_data_1[4] << 8) + binary_data_1[5]) + 1;
+                            if (ByteNum > 4) //数据长度超过4Bytes,按照16进制显示字节流
+                            {
+                                for (int i = 0; i < ByteNum; i++)
+                                {
+                                    richTextBox_DebugInfo.AppendText(Convert.ToString(binary_data_1[10 + i], 16).PadLeft(2, '0').ToUpper() + " ");
+                                }
+                            }
+                        }));
+                    }
+                }
             }
             #endregion
 
@@ -2166,11 +2271,8 @@ namespace MOTINOVA_MC_Test
                 ConfigParam[i] = 0;
             ushort DataTemp;
 
-            //指拨模式
-            if (comboBox_Config_GasMode.Text == "支持")
-                ConfigParam[0] = 0xAA;
-            else
-                ConfigParam[0] = 0x55;
+            //指拨参数
+            ConfigParam[0] = byte.Parse(textBox_Config_GasMode.Text, System.Globalization.NumberStyles.HexNumber);
             //启动模式
             if (comboBox_StartMode.Text == "柔和")
                 ConfigParam[1] = 0x01;
@@ -2519,7 +2621,69 @@ namespace MOTINOVA_MC_Test
         private void timer2_Tick(object sender, EventArgs e)
         {
             //定时显示系统时钟
-           label_DateTime.Text = DateTime.Now.ToString();
+            label_DateTime.Text = DateTime.Now.ToString();
+
+            //定时读取存储器
+            if (checkBox_DebugAuto.Checked == true)
+            {
+                var Address = new byte[4];
+                UInt32 Address_Begin;
+                UInt32 Addres_End;
+
+                if (!serialPort1.IsOpen)
+                {
+                    checkBox_DebugAuto.Checked = false;
+                    return;
+                }
+                
+                if (checkBox_DebugReset.Checked == true)
+                    richTextBox_DebugInfo.Clear();
+
+                do
+                {
+                    if ((textBox_DebugAddrBegin.Text == string.Empty) || (textBox_DebugAddrEnd.Text == string.Empty))
+                    {
+                        checkBox_DebugAuto.Checked = false;
+                        MessageBox.Show("请输入起始和结束地址!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        continue;
+                    }
+                    else if ((textBox_DebugAddrBegin.Text.Length != 8) || (textBox_DebugAddrEnd.Text.Length != 8))
+                    {
+                        checkBox_DebugAuto.Checked = false;
+                        MessageBox.Show("请检查地址长度!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        continue;
+                    }
+                    else
+                    {
+                        Address = HexStringToBytes(textBox_DebugAddrBegin.Text, false);
+                        Address_Begin = ((UInt32)Address[0] << 24) + ((UInt32)Address[1] << 16) + ((UInt32)Address[2] << 8) + ((UInt32)Address[3]);
+                        Address = HexStringToBytes(textBox_DebugAddrEnd.Text, false);
+                        Addres_End = ((UInt32)Address[0] << 24) + ((UInt32)Address[1] << 16) + ((UInt32)Address[2] << 8) + ((UInt32)Address[3]);
+
+                        if (Addres_End < Address_Begin)
+                        {
+                            checkBox_DebugAuto.Checked = false;
+                            MessageBox.Show("结束地址必须大于或等于起始地址!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                            continue;
+                        }
+                        else
+                        {
+                            var SendByte = new byte[8];
+                            SendByte[0] = (byte)(Address_Begin >> 24);
+                            SendByte[1] = (byte)(Address_Begin >> 16);
+                            SendByte[2] = (byte)(Address_Begin >> 8);
+                            SendByte[3] = (byte)(Address_Begin);
+                            SendByte[4] = (byte)(Addres_End >> 24);
+                            SendByte[5] = (byte)(Addres_End >> 16);
+                            SendByte[6] = (byte)(Addres_End >> 8);
+                            SendByte[7] = (byte)(Addres_End);
+
+                            if (!SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2D08, SendByte))
+                                checkBox_DebugAuto.Checked = false;
+                        }
+                    }
+                } while (false);
+            }
         }
 
         private void checkBox_ReadTorqueData_CheckedChanged(object sender, EventArgs e)
@@ -3544,5 +3708,54 @@ namespace MOTINOVA_MC_Test
             button_Write_Mode.Enabled = true;
             button_Write_SN.Enabled = true;
         }
+
+        //读取指定地址的数据
+        private void button_DebugRead_Click(object sender, EventArgs e)
+        {
+            var Address = new byte[4];
+            UInt32 Address_Begin;
+            UInt32 Addres_End;
+
+            if (checkBox_DebugReset.Checked == true)
+                richTextBox_DebugInfo.Clear();
+
+            if ((textBox_DebugAddrBegin.Text == string.Empty) || (textBox_DebugAddrEnd.Text == string.Empty))
+            {                
+                MessageBox.Show("请输入起始和结束地址!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+            else if ((textBox_DebugAddrBegin.Text.Length != 8) || (textBox_DebugAddrEnd.Text.Length != 8))
+            {
+                MessageBox.Show("请检查地址长度!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+            else
+            {
+                Address = HexStringToBytes(textBox_DebugAddrBegin.Text, false);
+                Address_Begin = ((UInt32)Address[0] << 24) + ((UInt32)Address[1] << 16) + ((UInt32)Address[2] << 8) + ((UInt32)Address[3]);
+                Address = HexStringToBytes(textBox_DebugAddrEnd.Text, false);
+                Addres_End = ((UInt32)Address[0] << 24) + ((UInt32)Address[1] << 16) + ((UInt32)Address[2] << 8) + ((UInt32)Address[3]);
+
+                if (Addres_End < Address_Begin)
+                {
+                    MessageBox.Show("结束地址必须大于或等于起始地址!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+                else
+                {
+                    var SendByte = new byte[8];
+                    SendByte[0] = (byte)(Address_Begin >> 24);
+                    SendByte[1] = (byte)(Address_Begin >> 16);
+                    SendByte[2] = (byte)(Address_Begin >> 8);
+                    SendByte[3] = (byte)(Address_Begin);
+                    SendByte[4] = (byte)(Addres_End >> 24);
+                    SendByte[5] = (byte)(Addres_End >> 16);
+                    SendByte[6] = (byte)(Addres_End >> 8);
+                    SendByte[7] = (byte)(Addres_End);
+
+                    SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2D08, SendByte);
+                }
+            }
+        }
     }
 }

+ 1 - 1
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>Bk0k6jSF+hIv1yJ7/vg4LMxpjrI=</dsig:DigestValue>
+        <dsig:DigestValue>hSbq9Qbnip0MA7L6SXymik6sdXQ=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe


+ 2 - 2
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -48,14 +48,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="226304">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="231424">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>9GdvGCN10zxREFmIsRBi8stc1jA=</dsig:DigestValue>
+        <dsig:DigestValue>9oKf8wuDYP0v5NhcoLxRfRyX624=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.pdb


BIN
MOTINOVA_MC_Test/bin/Debug/app.publish/MOTINOVA_MC_Test.exe


BIN
MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferences.cache


+ 1 - 1
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>Bk0k6jSF+hIv1yJ7/vg4LMxpjrI=</dsig:DigestValue>
+        <dsig:DigestValue>hSbq9Qbnip0MA7L6SXymik6sdXQ=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.AssemblyReference.cache


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.GenerateResource.cache


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe


+ 2 - 2
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -48,14 +48,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="226304">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="231424">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>9GdvGCN10zxREFmIsRBi8stc1jA=</dsig:DigestValue>
+        <dsig:DigestValue>9oKf8wuDYP0v5NhcoLxRfRyX624=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.pdb