Pārlūkot izejas kodu

V1.7.0
增加转把控制参数的设置。

Dail 1 gadu atpakaļ
vecāks
revīzija
8644c7e576

BIN
.vs/MOTINOVA_Motor_Factory_Set/v17/.suo


+ 42 - 2
CheckForm.cs

@@ -1,4 +1,5 @@
-using System;
+using NPOI.POIFS.FileSystem;
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -430,7 +431,35 @@ namespace MOTINOVA_Motor_Factory_Set
                                     richTextBox_ReadCfg.Text += "车速级数," + binary_data_1[26].ToString() + "\r\n";
                                     richTextBox_ReadCfg.Text += "踏频启动," + binary_data_1[27].ToString() + "\r\n";
                                     richTextBox_ReadCfg.Text += "指拨模式," + binary_data_1[2].ToString() + ",";
-                                    richTextBox_ReadCfg.Text += ((binary_data_1[2] == 0x55) ? "不支持" : "支持") + "\r\n";
+                                    if (binary_data_1[2] == 0x55)
+                                        richTextBox_ReadCfg.Text += "不支持" + "\r\n";
+                                    else if (binary_data_1[2] == 0xF8)
+                                        richTextBox_ReadCfg.Text += "支持 推行模式" + "\r\n";
+                                    else
+                                    {
+                                        richTextBox_ReadCfg.Text += "支持";
+                                        //控制模式
+                                        if ((binary_data_1[2] & 0x01) == 0x00) //速度模式
+                                            richTextBox_ReadCfg.Text += " 速度模式";
+                                        else
+                                            richTextBox_ReadCfg.Text += " 力矩模式";
+                                        //功率限制方式
+                                        if ((binary_data_1[2] & 0x02) == 0x00) //按挡位不限制
+                                            richTextBox_ReadCfg.Text += " 挡位不限制功率";
+                                        else
+                                            richTextBox_ReadCfg.Text += " 挡位限制功率";
+                                        //启动方式
+                                        if ((binary_data_1[2] & 0x04) == 0x00) //零速启动
+                                            richTextBox_ReadCfg.Text += " 零速启动";
+                                        else
+                                            richTextBox_ReadCfg.Text += " 带速启动";
+                                        //限速
+                                        if ((binary_data_1[2] >> 3) <= 5)
+                                            richTextBox_ReadCfg.Text += " 限速:" + (binary_data_1[6] + 31 + (binary_data_1[2] >> 3) - (0xAA >> 3)).ToString() + "km/h";
+                                        else
+                                            richTextBox_ReadCfg.Text += " 限速:" + (binary_data_1[6] + (binary_data_1[2] >> 3) - (0xAA >> 3)).ToString() + "km/h";
+                                        richTextBox_ReadCfg.Text += "\r\n";
+                                    }
                                     richTextBox_ReadCfg.Text += "速度信号来源," + binary_data_1[28].ToString() + ",";
                                     richTextBox_ReadCfg.Text += ((binary_data_1[28] == 0x55) ? "传感器" :
                                                                 (binary_data_1[28] == 0xAA) ? "踏频" :
@@ -619,6 +648,17 @@ namespace MOTINOVA_Motor_Factory_Set
                                     richTextBox_ReadCfg.Text += "尾灯周期," + ((ushort)(binary_data_1[15] * 256 + binary_data_1[14])).ToString() + "\r\n";
                                     richTextBox_ReadCfg.Text += "起始限速," + binary_data_1[16].ToString() + "\r\n";
                                     richTextBox_ReadCfg.Text += "结束限速," + binary_data_1[17].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "限速微调," + binary_data_1[18].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "ECO最大电流增益," + binary_data_1[20].ToString() + "\r\n";//跳过预留
+                                    richTextBox_ReadCfg.Text += "ECO最大力矩增益," + binary_data_1[21].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "NORM最大电流增益," + binary_data_1[22].ToString() + "\r\n";//跳过预留
+                                    richTextBox_ReadCfg.Text += "NORM最大力矩增益," + binary_data_1[23].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "SPORT最大电流增益," + binary_data_1[24].ToString() + "\r\n";//跳过预留
+                                    richTextBox_ReadCfg.Text += "SPORT最大力矩增益," + binary_data_1[25].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "TURBO最大电流增益," + binary_data_1[26].ToString() + "\r\n";//跳过预留
+                                    richTextBox_ReadCfg.Text += "TURBO最大力矩增益," + binary_data_1[27].ToString() + "\r\n";
+                                    richTextBox_ReadCfg.Text += "SMART最大电流增益," + binary_data_1[28].ToString() + "\r\n";//跳过预留
+                                    richTextBox_ReadCfg.Text += "SMART最大力矩增益," + binary_data_1[29].ToString() + "\r\n";
                                 }));
                             }
                             break;

+ 82 - 81
ExportForm.Designer.cs

@@ -31,10 +31,15 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExportForm));
             this.label2 = new System.Windows.Forms.Label();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.label74 = new System.Windows.Forms.Label();
+            this.comboBox_GasModeStart = new System.Windows.Forms.ComboBox();
+            this.label72 = new System.Windows.Forms.Label();
+            this.comboBox_GasPowerLimit = new System.Windows.Forms.ComboBox();
             this.label1 = new System.Windows.Forms.Label();
             this.textBox_WalkSpeed = new System.Windows.Forms.TextBox();
             this.textBox_WheelSizeAdj = new System.Windows.Forms.TextBox();
             this.label6 = new System.Windows.Forms.Label();
+            this.textBox_GasSpeedLimit = new System.Windows.Forms.TextBox();
             this.textBox_CadenceStart = new System.Windows.Forms.TextBox();
             this.label9 = new System.Windows.Forms.Label();
             this.textBox_SMART_Gain = new System.Windows.Forms.TextBox();
@@ -87,6 +92,7 @@
             this.label20 = new System.Windows.Forms.Label();
             this.comboBox_NoPBU = new System.Windows.Forms.ComboBox();
             this.label23 = new System.Windows.Forms.Label();
+            this.label73 = new System.Windows.Forms.Label();
             this.label26 = new System.Windows.Forms.Label();
             this.label47 = new System.Windows.Forms.Label();
             this.label29 = new System.Windows.Forms.Label();
@@ -186,12 +192,6 @@
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.button_keyboard = new System.Windows.Forms.Button();
-            this.label72 = new System.Windows.Forms.Label();
-            this.comboBox_GasPowerLimit = new System.Windows.Forms.ComboBox();
-            this.label73 = new System.Windows.Forms.Label();
-            this.textBox_GasSpeedLimit = new System.Windows.Forms.TextBox();
-            this.label74 = new System.Windows.Forms.Label();
-            this.comboBox_GasModeStart = new System.Windows.Forms.ComboBox();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
             this.groupBox7.SuspendLayout();
@@ -214,7 +214,7 @@
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(423, 21);
             this.label2.TabIndex = 5;
-            this.label2.Text = "Copyright © 2022 MOTINOVA Inc. All Rights Reserved";
+            this.label2.Text = "Copyright © 2023 MOTINOVA Inc. All Rights Reserved";
             // 
             // groupBox2
             // 
@@ -292,6 +292,58 @@
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "用户参数1";
             // 
+            // label74
+            // 
+            this.label74.AutoSize = true;
+            this.label74.Location = new System.Drawing.Point(363, 289);
+            this.label74.Name = "label74";
+            this.label74.Size = new System.Drawing.Size(74, 21);
+            this.label74.TabIndex = 5;
+            this.label74.Text = "指拨启动";
+            // 
+            // comboBox_GasModeStart
+            // 
+            this.comboBox_GasModeStart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.comboBox_GasModeStart.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_GasModeStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.comboBox_GasModeStart.ForeColor = System.Drawing.Color.Black;
+            this.comboBox_GasModeStart.FormattingEnabled = true;
+            this.comboBox_GasModeStart.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.comboBox_GasModeStart.Items.AddRange(new object[] {
+            "无效",
+            "零速",
+            "带速"});
+            this.comboBox_GasModeStart.Location = new System.Drawing.Point(463, 285);
+            this.comboBox_GasModeStart.Name = "comboBox_GasModeStart";
+            this.comboBox_GasModeStart.Size = new System.Drawing.Size(70, 29);
+            this.comboBox_GasModeStart.TabIndex = 6;
+            // 
+            // label72
+            // 
+            this.label72.AutoSize = true;
+            this.label72.Location = new System.Drawing.Point(180, 289);
+            this.label72.Name = "label72";
+            this.label72.Size = new System.Drawing.Size(90, 21);
+            this.label72.TabIndex = 3;
+            this.label72.Text = "指拨限功率";
+            // 
+            // comboBox_GasPowerLimit
+            // 
+            this.comboBox_GasPowerLimit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.comboBox_GasPowerLimit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_GasPowerLimit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.comboBox_GasPowerLimit.ForeColor = System.Drawing.Color.Black;
+            this.comboBox_GasPowerLimit.FormattingEnabled = true;
+            this.comboBox_GasPowerLimit.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.comboBox_GasPowerLimit.Items.AddRange(new object[] {
+            "无效",
+            "限制",
+            "不限制"});
+            this.comboBox_GasPowerLimit.Location = new System.Drawing.Point(288, 285);
+            this.comboBox_GasPowerLimit.Name = "comboBox_GasPowerLimit";
+            this.comboBox_GasPowerLimit.Size = new System.Drawing.Size(70, 29);
+            this.comboBox_GasPowerLimit.TabIndex = 4;
+            // 
             // label1
             // 
             this.label1.AutoSize = true;
@@ -330,6 +382,16 @@
             this.label6.TabIndex = 0;
             this.label6.Text = "下降速度";
             // 
+            // textBox_GasSpeedLimit
+            // 
+            this.textBox_GasSpeedLimit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_GasSpeedLimit.ForeColor = System.Drawing.Color.Black;
+            this.textBox_GasSpeedLimit.ImeMode = System.Windows.Forms.ImeMode.Disable;
+            this.textBox_GasSpeedLimit.Location = new System.Drawing.Point(105, 317);
+            this.textBox_GasSpeedLimit.Name = "textBox_GasSpeedLimit";
+            this.textBox_GasSpeedLimit.Size = new System.Drawing.Size(70, 29);
+            this.textBox_GasSpeedLimit.TabIndex = 2;
+            // 
             // textBox_CadenceStart
             // 
             this.textBox_CadenceStart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
@@ -770,7 +832,8 @@
             this.comboBox_GasMode.Items.AddRange(new object[] {
             "不支持",
             "速度模式",
-            "力矩模式"});
+            "力矩模式",
+            "推行模式"});
             this.comboBox_GasMode.Location = new System.Drawing.Point(105, 285);
             this.comboBox_GasMode.Name = "comboBox_GasMode";
             this.comboBox_GasMode.Size = new System.Drawing.Size(70, 29);
@@ -847,6 +910,15 @@
             this.label23.TabIndex = 0;
             this.label23.Text = "SMART增益";
             // 
+            // label73
+            // 
+            this.label73.AutoSize = true;
+            this.label73.Location = new System.Drawing.Point(6, 321);
+            this.label73.Name = "label73";
+            this.label73.Size = new System.Drawing.Size(74, 21);
+            this.label73.TabIndex = 0;
+            this.label73.Text = "指拨限速";
+            // 
             // label26
             // 
             this.label26.AutoSize = true;
@@ -930,7 +1002,7 @@
             this.label68.Name = "label68";
             this.label68.Size = new System.Drawing.Size(74, 21);
             this.label68.TabIndex = 11;
-            this.label68.Text = "结束限速";
+            this.label68.Text = "结束偏移";
             // 
             // textBox_LimitSpeedStop
             // 
@@ -949,7 +1021,7 @@
             this.label69.Name = "label69";
             this.label69.Size = new System.Drawing.Size(74, 21);
             this.label69.TabIndex = 9;
-            this.label69.Text = "起始限速";
+            this.label69.Text = "起始偏移";
             // 
             // textBox_LimitSpeedStart
             // 
@@ -1928,77 +2000,6 @@
             this.button_keyboard.UseVisualStyleBackColor = false;
             this.button_keyboard.Click += new System.EventHandler(this.button_keyboard_Click);
             // 
-            // label72
-            // 
-            this.label72.AutoSize = true;
-            this.label72.Location = new System.Drawing.Point(180, 289);
-            this.label72.Name = "label72";
-            this.label72.Size = new System.Drawing.Size(90, 21);
-            this.label72.TabIndex = 3;
-            this.label72.Text = "指拨限功率";
-            // 
-            // comboBox_GasPowerLimit
-            // 
-            this.comboBox_GasPowerLimit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.comboBox_GasPowerLimit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox_GasPowerLimit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.comboBox_GasPowerLimit.ForeColor = System.Drawing.Color.Black;
-            this.comboBox_GasPowerLimit.FormattingEnabled = true;
-            this.comboBox_GasPowerLimit.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.comboBox_GasPowerLimit.Items.AddRange(new object[] {
-            "无效",
-            "限制",
-            "不限制"});
-            this.comboBox_GasPowerLimit.Location = new System.Drawing.Point(288, 285);
-            this.comboBox_GasPowerLimit.Name = "comboBox_GasPowerLimit";
-            this.comboBox_GasPowerLimit.Size = new System.Drawing.Size(70, 29);
-            this.comboBox_GasPowerLimit.TabIndex = 4;
-            // 
-            // label73
-            // 
-            this.label73.AutoSize = true;
-            this.label73.Location = new System.Drawing.Point(6, 321);
-            this.label73.Name = "label73";
-            this.label73.Size = new System.Drawing.Size(74, 21);
-            this.label73.TabIndex = 0;
-            this.label73.Text = "指拨限速";
-            // 
-            // textBox_GasSpeedLimit
-            // 
-            this.textBox_GasSpeedLimit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_GasSpeedLimit.ForeColor = System.Drawing.Color.Black;
-            this.textBox_GasSpeedLimit.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.textBox_GasSpeedLimit.Location = new System.Drawing.Point(105, 317);
-            this.textBox_GasSpeedLimit.Name = "textBox_GasSpeedLimit";
-            this.textBox_GasSpeedLimit.Size = new System.Drawing.Size(70, 29);
-            this.textBox_GasSpeedLimit.TabIndex = 2;
-            // 
-            // label74
-            // 
-            this.label74.AutoSize = true;
-            this.label74.Location = new System.Drawing.Point(363, 289);
-            this.label74.Name = "label74";
-            this.label74.Size = new System.Drawing.Size(74, 21);
-            this.label74.TabIndex = 5;
-            this.label74.Text = "指拨启动";
-            // 
-            // comboBox_GasModeStart
-            // 
-            this.comboBox_GasModeStart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.comboBox_GasModeStart.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox_GasModeStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.comboBox_GasModeStart.ForeColor = System.Drawing.Color.Black;
-            this.comboBox_GasModeStart.FormattingEnabled = true;
-            this.comboBox_GasModeStart.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.comboBox_GasModeStart.Items.AddRange(new object[] {
-            "无效",
-            "零速",
-            "带速"});
-            this.comboBox_GasModeStart.Location = new System.Drawing.Point(463, 285);
-            this.comboBox_GasModeStart.Name = "comboBox_GasModeStart";
-            this.comboBox_GasModeStart.Size = new System.Drawing.Size(70, 29);
-            this.comboBox_GasModeStart.TabIndex = 6;
-            // 
             // ExportForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

+ 20 - 7
ExportForm.cs

@@ -16,6 +16,7 @@ using NPOI.SS.UserModel;
 using NPOI.HSSF.UserModel;
 using Spire.Xls;
 using Workbook = Spire.Xls.Workbook;
+using NPOI.POIFS.FileSystem;
 
 namespace MOTINOVA_Motor_Factory_Set
 {
@@ -424,6 +425,10 @@ namespace MOTINOVA_Motor_Factory_Set
                 {
                     Params1.Add("指拨模式", 0x55);
                 }
+                else if(comboBox_GasMode.SelectedIndex == 3) //推行
+                {
+                    Params1.Add("指拨模式", 0xF8);
+                }
                 else //支持
                 {
                     Byte GasModeTemp = 0;
@@ -469,7 +474,6 @@ namespace MOTINOVA_Motor_Factory_Set
                         GasModeTemp |= (byte)((0x15 + Convert.ToByte(textBox_GasSpeedLimit.Text) - Convert.ToByte(textBox_SpeedLimit.Text)) << 3);
                     Params1.Add("指拨模式", GasModeTemp);
                 }                
-
                 if (comboBox_SpeedSensor.Text == "传感器")
                 {
                     Params1.Add("速度信号来源", 0x55);
@@ -722,6 +726,8 @@ namespace MOTINOVA_Motor_Factory_Set
                         string strTemp = "";
                         if (entry.Value == 0x55)
                             strTemp += "不支持";
+                        else if(entry.Value == 0xF8)
+                            strTemp += "支持 推行模式";
                         else
                         {
                             strTemp += "支持";
@@ -731,12 +737,12 @@ namespace MOTINOVA_Motor_Factory_Set
                             else
                                 strTemp += " 力矩模式";
                             //功率限制方式
-                            if ((entry.Value & 0x02) == 0x00) //按挡位限制
-                                strTemp += " 挡位限制功率";
-                            else
+                            if ((entry.Value & 0x02) == 0x00) //按挡位不限制
                                 strTemp += " 挡位不限制功率";
+                            else
+                                strTemp += " 挡位限制功率";
                             //启动方式
-                            if ((entry.Value & 0x04) == 0x01) //零速启动
+                            if ((entry.Value & 0x04) == 0x00) //零速启动
                                 strTemp += " 零速启动";
                             else
                                 strTemp += " 带速启动";
@@ -1219,12 +1225,19 @@ namespace MOTINOVA_Motor_Factory_Set
         /// <param name="e"></param>
         private void comboBox_GasMode_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (comboBox_GasMode.SelectedIndex == 0)
+            if (comboBox_GasMode.SelectedIndex == 0)//不支持
             {
                 comboBox_GasPowerLimit.SelectedIndex = 0;
                 textBox_GasSpeedLimit.Text = "无效";
+                comboBox_GasModeStart.SelectedIndex = 0;                
             }
-            else
+            else if (comboBox_GasMode.SelectedIndex == 3)//推行模式
+            {
+                comboBox_GasPowerLimit.SelectedIndex = 0;
+                comboBox_GasModeStart.SelectedIndex = 0;
+                textBox_GasSpeedLimit.Text = "6";
+            }
+            else//速度模式或力矩模式
             {
                 comboBox_GasPowerLimit.SelectedIndex = 1;
                 comboBox_GasModeStart.SelectedIndex = 1;

+ 50 - 25
ImportForm.cs

@@ -218,22 +218,22 @@ namespace MOTINOVA_Motor_Factory_Set
                 return;
             }
             //更新推行模式测试判断标准
-            MotorRadeSpeed = Convert.ToUInt16(array_CfgInfo[47].ToString().Split(',')[1]);
-            RateVoltage = (ushort)(Convert.ToByte(array_CfgInfo[52].ToString().Split(',')[1]) * 1000);
+            MotorRadeSpeed = Convert.ToUInt16(array_CfgInfo[58].ToString().Split(',')[1]);
+            RateVoltage = (ushort)(Convert.ToByte(array_CfgInfo[63].ToString().Split(',')[1]) * 1000);
 
             //更新指拨和速度传感器测试标志
             byte temp = Convert.ToByte(array_CfgInfo[25].ToString().Split(',')[1]);
-            GasModeTest = temp == 0x55 ? false : temp == 0xAA ? true : false;
+            GasModeTest = temp == 0x55 ? false : true;
             temp = Convert.ToByte(array_CfgInfo[26].ToString().Split(',')[1]);
             SpeedSensorTest = temp == 0x55 || (temp == 0xAA ? false : temp == 0xEE ? false : false);
 
             //更新空载电流和车速传感器判断阈值
             if (array_CfgInfo.Count > 56)//旧版本无改配置项,采用默认值
             {
-                No_load_Current = Convert.ToUInt16(array_CfgInfo[64].ToString().Split(',')[1]);
-                SpeedSensorThData = Convert.ToUInt16(array_CfgInfo[65].ToString().Split(',')[1]);
-                RateCadence = Convert.ToUInt16(array_CfgInfo[66].ToString().Split(',')[1]);
-                GasModeSpeed = Convert.ToUInt16(array_CfgInfo[67].ToString().Split(',')[1]);
+                No_load_Current = Convert.ToUInt16(array_CfgInfo[75].ToString().Split(',')[1]);
+                SpeedSensorThData = Convert.ToUInt16(array_CfgInfo[76].ToString().Split(',')[1]);
+                RateCadence = Convert.ToUInt16(array_CfgInfo[77].ToString().Split(',')[1]);
+                GasModeSpeed = Convert.ToUInt16(array_CfgInfo[78].ToString().Split(',')[1]);
             }
         }
         #endregion
@@ -1422,6 +1422,31 @@ namespace MOTINOVA_Motor_Factory_Set
             Code[14] = Convert.ToByte(array_CfgInfo[42].ToString().Split(',')[1]);
             //结束限速
             Code[15] = Convert.ToByte(array_CfgInfo[43].ToString().Split(',')[1]);
+            //限速微调
+            Code[16] = Convert.ToByte(array_CfgInfo[44].ToString().Split(',')[1]);
+            //预留
+            Code[17] = 0x00;
+            //ECO最大电流增益
+            Code[18] = Convert.ToByte(array_CfgInfo[45].ToString().Split(',')[1]);
+            //ECO最大力矩增益
+            Code[19] = Convert.ToByte(array_CfgInfo[46].ToString().Split(',')[1]);
+            //NORM最大电流增益
+            Code[20] = Convert.ToByte(array_CfgInfo[47].ToString().Split(',')[1]);
+            //NORM最大力矩增益
+            Code[21] = Convert.ToByte(array_CfgInfo[48].ToString().Split(',')[1]);
+            //SPORT最大电流增益
+            Code[22] = Convert.ToByte(array_CfgInfo[49].ToString().Split(',')[1]);
+            //SPORT最大力矩增益
+            Code[23] = Convert.ToByte(array_CfgInfo[50].ToString().Split(',')[1]);
+            //TURBO最大电流增益
+            Code[24] = Convert.ToByte(array_CfgInfo[51].ToString().Split(',')[1]);
+            //TURBO最大力矩增益
+            Code[25] = Convert.ToByte(array_CfgInfo[52].ToString().Split(',')[1]);
+            //SMART最大电流增益
+            Code[26] = Convert.ToByte(array_CfgInfo[53].ToString().Split(',')[1]);
+            //SMART最大力矩增益
+            Code[27] = Convert.ToByte(array_CfgInfo[54].ToString().Split(',')[1]);
+
             SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3120, Code);
             Ack_Flag = false;
             Ack_Cnt = 0;
@@ -1456,31 +1481,31 @@ namespace MOTINOVA_Motor_Factory_Set
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入马达参数" + "\r\n";
             Array.Clear(Code, 0, 32);
             //额定功率
-            DataTemp = Convert.ToUInt16(array_CfgInfo[46].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[57].ToString().Split(',')[1]);
             Code[0] = (byte)(DataTemp & 0xFF);
             Code[1] = (byte)(DataTemp >> 8);
             //额定转速
-            DataTemp = Convert.ToUInt16(array_CfgInfo[47].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[58].ToString().Split(',')[1]);
             Code[2] = (byte)(DataTemp & 0xFF);
             Code[3] = (byte)(DataTemp >> 8);
             //定子电阻
-            DataTemp = Convert.ToUInt16(array_CfgInfo[48].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[59].ToString().Split(',')[1]);
             Code[4] = (byte)(DataTemp & 0xFF);
             Code[5] = (byte)(DataTemp >> 8);
             //Lq
-            DataTemp = Convert.ToUInt16(array_CfgInfo[49].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[60].ToString().Split(',')[1]);
             Code[6] = (byte)(DataTemp & 0xFF);
             Code[7] = (byte)(DataTemp >> 8);
             //Ld
-            DataTemp = Convert.ToUInt16(array_CfgInfo[50].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[61].ToString().Split(',')[1]);
             Code[8] = (byte)(DataTemp & 0xFF);
             Code[9] = (byte)(DataTemp >> 8);
             //反电动势
-            DataTemp = Convert.ToUInt16(array_CfgInfo[51].ToString().Split(',')[1]);
+            DataTemp = Convert.ToUInt16(array_CfgInfo[62].ToString().Split(',')[1]);
             Code[10] = (byte)(DataTemp & 0xFF);
             Code[11] = (byte)(DataTemp >> 8);
             //额定电压
-            Code[12] = Convert.ToByte(array_CfgInfo[52].ToString().Split(',')[1]);
+            Code[12] = Convert.ToByte(array_CfgInfo[63].ToString().Split(',')[1]);
             SendCmd((ushort)0x751, (byte)0x16, (ushort)0x1D10, Code);
             Ack_Flag = false;
             Ack_Cnt = 0;
@@ -1515,17 +1540,17 @@ namespace MOTINOVA_Motor_Factory_Set
             Delay_ms(200);
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入生产信息" + "\r\n";
             Array.Clear(Code, 0, 32);
-            string MAC_Info = array_CfgInfo[55].ToString().Split(',')[1];
+            string MAC_Info = array_CfgInfo[66].ToString().Split(',')[1];
             for (ushort i = 0; i < ((MAC_Info.Length > 8) ? 8 : MAC_Info.Length); i++)
             {
                 Code[i] = (byte)MAC_Info[i];
             }
-            MAC_Info = array_CfgInfo[56].ToString().Split(',')[1];
+            MAC_Info = array_CfgInfo[67].ToString().Split(',')[1];
             for (ushort i = 0; i < ((MAC_Info.Length > 8) ? 8 : MAC_Info.Length); i++)
             {
                 Code[8 + i] = (byte)MAC_Info[i];
             }
-            MAC_Info = array_CfgInfo[57].ToString().Split(',')[1];
+            MAC_Info = array_CfgInfo[68].ToString().Split(',')[1];
             for (ushort i = 0; i < ((MAC_Info.Length > 8) ? 8 : MAC_Info.Length); i++)
             {
                 Code[16 + i] = (byte)MAC_Info[i];
@@ -1563,9 +1588,9 @@ namespace MOTINOVA_Motor_Factory_Set
             Delay_ms(200);
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入校验密钥" + "\r\n";
             Array.Clear(Code, 0, 32);
-            if (array_CfgInfo[58].ToString().EndsWith(",") == false)
+            if (array_CfgInfo[69].ToString().EndsWith(",") == false)
             {
-                string KeyString = array_CfgInfo[58].ToString().Split(',')[1];
+                string KeyString = array_CfgInfo[69].ToString().Split(',')[1];
                 for (ushort i = 0; i < ((KeyString.Length > 8) ? 8 : KeyString.Length); i++)
                 {
                     Code[i] = (byte)KeyString[i];
@@ -1609,9 +1634,9 @@ namespace MOTINOVA_Motor_Factory_Set
             Delay_ms(200);
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入自定义信息1" + "\r\n";
             Array.Clear(Code, 0, 32);
-            if (array_CfgInfo[59].ToString().EndsWith(",") == false)
+            if (array_CfgInfo[70].ToString().EndsWith(",") == false)
             {
-                string UserInfo1String = array_CfgInfo[57].ToString().Split(',')[1];
+                string UserInfo1String = array_CfgInfo[70].ToString().Split(',')[1];
                 for (ushort i = 0; i < (UserInfo1String.Length > 16 ? 16 : UserInfo1String.Length); i++)
                 {
                     Code[i] = (byte)UserInfo1String[i];
@@ -1652,9 +1677,9 @@ namespace MOTINOVA_Motor_Factory_Set
             Delay_ms(200);
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入自定义信息2" + "\r\n";
             Array.Clear(Code, 0, 32);
-            if (array_CfgInfo[60].ToString().EndsWith(",") == false)
+            if (array_CfgInfo[71].ToString().EndsWith(",") == false)
             {
-                string UserInfo2String = array_CfgInfo[58].ToString().Split(',')[1];
+                string UserInfo2String = array_CfgInfo[71].ToString().Split(',')[1];
                 for (ushort i = 0; i < (UserInfo2String.Length > 16 ? 16 : UserInfo2String.Length); i++)
                 {
                     Code[i] = (byte)UserInfo2String[i];
@@ -1695,9 +1720,9 @@ namespace MOTINOVA_Motor_Factory_Set
             Delay_ms(200);
             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "写入自定义信息3" + "\r\n";
             Array.Clear(Code, 0, 32);
-            if (array_CfgInfo[61].ToString().EndsWith(",") == false)
+            if (array_CfgInfo[72].ToString().EndsWith(",") == false)
             {
-                string UserInfo3String = array_CfgInfo[59].ToString().Split(',')[1];
+                string UserInfo3String = array_CfgInfo[72].ToString().Split(',')[1];
                 for (ushort i = 0; i < (UserInfo3String.Length > 16 ? 16 : UserInfo3String.Length); i++)
                 {
                     Code[i] = (byte)UserInfo3String[i];

+ 1 - 1
StartForm.Designer.cs

@@ -118,7 +118,7 @@
             this.label_Ver.Name = "label_Ver";
             this.label_Ver.Size = new System.Drawing.Size(316, 21);
             this.label_Ver.TabIndex = 2;
-            this.label_Ver.Text = "Ver: V1.6.0 Build Time: 2023-05-17 16:00";
+            this.label_Ver.Text = "Ver: V1.7.0 Build Time: 2023-12-27 18:30";
             // 
             // label_NetStatus
             // 

+ 2 - 2
bin/Debug/CheckSerialNum

@@ -1,4 +1,4 @@
 流水号:
-6
+13
 合格计数:
-2
+4

+ 1 - 1
bin/Debug/MOTINOVA_Motor_Factory_Set.application

@@ -14,7 +14,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>th4C5qza6B7k36HgXwTJFCUrrdpZpsMJfwmu11DGhLI=</dsig:DigestValue>
+        <dsig:DigestValue>HW7nekAol+5kussy0y0mfyOihODsM1YA+u0tte8mIok=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
bin/Debug/MOTINOVA_Motor_Factory_Set.exe


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

@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="728064">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="730112">
       <assemblyIdentity name="MOTINOVA_Motor_Factory_Set" 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#sha256" />
-        <dsig:DigestValue>3zX7bM+b4EXQAclFHcYxYL+UofGl486IDebeXOZR/Rk=</dsig:DigestValue>
+        <dsig:DigestValue>8J7rguBRFor31+4l2oxHDIeM/oJxhsx3qsYBQH4AX7I=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
bin/Debug/MOTINOVA_Motor_Factory_Set.pdb


+ 2 - 2
bin/Debug/TestSerialNum

@@ -1,4 +1,4 @@
 流水号:
-57
+62
 合格计数:
-19
+22

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


BIN
bin/Debug/发布文件20231227/MOTINOVA_Motor_Factory_Set_20231227.rar


+ 1 - 1
obj/Debug/MOTINOVA_Motor_Factory_Set.application

@@ -14,7 +14,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>th4C5qza6B7k36HgXwTJFCUrrdpZpsMJfwmu11DGhLI=</dsig:DigestValue>
+        <dsig:DigestValue>HW7nekAol+5kussy0y0mfyOihODsM1YA+u0tte8mIok=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

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


BIN
obj/Debug/MOTINOVA_Motor_Factory_Set.exe


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

@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="728064">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="730112">
       <assemblyIdentity name="MOTINOVA_Motor_Factory_Set" 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#sha256" />
-        <dsig:DigestValue>3zX7bM+b4EXQAclFHcYxYL+UofGl486IDebeXOZR/Rk=</dsig:DigestValue>
+        <dsig:DigestValue>8J7rguBRFor31+4l2oxHDIeM/oJxhsx3qsYBQH4AX7I=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
obj/Debug/MOTINOVA_Motor_Factory_Set.pdb