Przeglądaj źródła

V1.4.5
1、增加与服务器端版本号比对,不一致时提示;
2、增加判断三个传感器校正系数的标准差;
3、三力矩电机启动值默认参数改为280-500;
4、修改xls模板,增加英文。

dail 2 lat temu
rodzic
commit
93fa9c6259

BIN
.vs/MOTINOVA_Motor_Factory_Set/v17/.suo


+ 39 - 1
CheckForm.cs

@@ -32,6 +32,10 @@ namespace MOTINOVA_Motor_Factory_Set
         TorqueCheckParam TorqueCheck = new TorqueCheckParam();
         #endregion
 
+        #region 三个传感器校正系数
+        List<float> K_array = new List<float>();
+        #endregion
+
         #region 硬件版本检测判断值
         string HW_Version_Check = "";
         #endregion
@@ -638,6 +642,16 @@ namespace MOTINOVA_Motor_Factory_Set
                                 {
                                     richTextBox_TQ.Text += "传感器" + binary_data_1[2].ToString() + "校正系数:";
                                     richTextBox_TQ.Text += ((float)binary_data_1[3] / 100f).ToString("#0.00") + "\r\n";
+                                    K_array.Add((float)binary_data_1[3] / 100f);
+                                    if (K_array.Count >= 3)
+                                    {
+                                        double avg = (K_array[0] + K_array[1] + K_array[2]) / 3.0f;
+                                        double sum = Math.Pow(K_array[0] - avg, 2) + Math.Pow(K_array[1] - avg, 2) + Math.Pow(K_array[2] - avg, 2);
+                                        double std = Math.Sqrt(sum / 3.0f);
+                                        richTextBox_TQ.Text += "校正系数标准差:" + std.ToString("#0.0000") + "\r\n";
+                                        K_array.Clear();
+                                    }
+                                    
                                 }));
                             }
                             break;
@@ -1074,7 +1088,7 @@ namespace MOTINOVA_Motor_Factory_Set
             }
             catch (System.Exception)
             {
-                label_Step.Text = "软件版本信息不完整!";
+                //label_Step.Text = "软件版本信息不完整!";
             }
             //PCBA版本确认
             if (HW_Version_Result.Contains(HW_Version_Check) == false)//PCBA版号错误,直接结束
@@ -1311,6 +1325,30 @@ namespace MOTINOVA_Motor_Factory_Set
                             richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + richTextBox_TQ.Lines[i].Split(':')[0] + "正常" + "\r\n";
                             break;
                         }
+                    case "校正系数标准差":
+                        {
+                            double std = Convert.ToDouble(richTextBox_TQ.Lines[i].Split(':')[1]);
+                            if (std > 0.3f)
+                            {
+                                richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "校正系数差异大" + "\r\n";
+                                label_Step.Text = "校正系数标准差超范围,测试结束!";
+                                label_Step.ForeColor = Color.Red;
+                                button_Start.Enabled = true;
+                                textBox_PDinfo.Enabled = true;
+                                ErrorSaveLog();
+                                //关机
+                                Code[0] = 0xF0;
+                                SendCmd(0x7FF, 0x16, 0x2201, Code);
+                                开ToolStripMenuItem.Checked = false;
+                                关ToolStripMenuItem.Checked = true;
+                                Delay_ms(500);
+                                //关闭串口
+                                portsettings_form.closePort();
+                                return;
+                            }
+                            richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + richTextBox_TQ.Lines[i].Split(':')[0] + "正常" + "\r\n";
+                            break;
+                        }                    
                     case "启动值":
                         {
                             string start = richTextBox_TQ.Lines[i].Split(':')[1];

+ 48 - 48
ExportForm.Designer.cs

@@ -139,6 +139,10 @@
             this.button_Generate = new System.Windows.Forms.Button();
             this.button_Default = new System.Windows.Forms.Button();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.comboBox_Baudrate = new System.Windows.Forms.ComboBox();
+            this.label64 = new System.Windows.Forms.Label();
+            this.textBox_HW_Version = new System.Windows.Forms.TextBox();
+            this.label63 = new System.Windows.Forms.Label();
             this.label53 = new System.Windows.Forms.Label();
             this.label57 = new System.Windows.Forms.Label();
             this.label52 = new System.Windows.Forms.Label();
@@ -168,10 +172,6 @@
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.button_keyboard = new System.Windows.Forms.Button();
-            this.label63 = new System.Windows.Forms.Label();
-            this.textBox_HW_Version = new System.Windows.Forms.TextBox();
-            this.label64 = new System.Windows.Forms.Label();
-            this.comboBox_Baudrate = new System.Windows.Forms.ComboBox();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
             this.groupBox7.SuspendLayout();
@@ -1408,6 +1408,50 @@
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "产品信息";
             // 
+            // comboBox_Baudrate
+            // 
+            this.comboBox_Baudrate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.comboBox_Baudrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_Baudrate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.comboBox_Baudrate.ForeColor = System.Drawing.Color.Black;
+            this.comboBox_Baudrate.FormattingEnabled = true;
+            this.comboBox_Baudrate.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.comboBox_Baudrate.Items.AddRange(new object[] {
+            "125K",
+            "250K"});
+            this.comboBox_Baudrate.Location = new System.Drawing.Point(10, 275);
+            this.comboBox_Baudrate.Name = "comboBox_Baudrate";
+            this.comboBox_Baudrate.Size = new System.Drawing.Size(103, 29);
+            this.comboBox_Baudrate.TabIndex = 3;
+            // 
+            // label64
+            // 
+            this.label64.AutoSize = true;
+            this.label64.Location = new System.Drawing.Point(7, 252);
+            this.label64.Name = "label64";
+            this.label64.Size = new System.Drawing.Size(58, 21);
+            this.label64.TabIndex = 5;
+            this.label64.Text = "波特率";
+            // 
+            // textBox_HW_Version
+            // 
+            this.textBox_HW_Version.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.textBox_HW_Version.ForeColor = System.Drawing.Color.Black;
+            this.textBox_HW_Version.ImeMode = System.Windows.Forms.ImeMode.Disable;
+            this.textBox_HW_Version.Location = new System.Drawing.Point(97, 101);
+            this.textBox_HW_Version.Name = "textBox_HW_Version";
+            this.textBox_HW_Version.Size = new System.Drawing.Size(133, 29);
+            this.textBox_HW_Version.TabIndex = 4;
+            // 
+            // label63
+            // 
+            this.label63.AutoSize = true;
+            this.label63.Location = new System.Drawing.Point(7, 105);
+            this.label63.Name = "label63";
+            this.label63.Size = new System.Drawing.Size(84, 21);
+            this.label63.TabIndex = 3;
+            this.label63.Text = "PCBA板号";
+            // 
             // label53
             // 
             this.label53.AutoSize = true;
@@ -1704,50 +1748,6 @@
             this.button_keyboard.UseVisualStyleBackColor = false;
             this.button_keyboard.Click += new System.EventHandler(this.button_keyboard_Click);
             // 
-            // label63
-            // 
-            this.label63.AutoSize = true;
-            this.label63.Location = new System.Drawing.Point(7, 105);
-            this.label63.Name = "label63";
-            this.label63.Size = new System.Drawing.Size(84, 21);
-            this.label63.TabIndex = 3;
-            this.label63.Text = "PCBA板号";
-            // 
-            // textBox_HW_Version
-            // 
-            this.textBox_HW_Version.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.textBox_HW_Version.ForeColor = System.Drawing.Color.Black;
-            this.textBox_HW_Version.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.textBox_HW_Version.Location = new System.Drawing.Point(97, 101);
-            this.textBox_HW_Version.Name = "textBox_HW_Version";
-            this.textBox_HW_Version.Size = new System.Drawing.Size(133, 29);
-            this.textBox_HW_Version.TabIndex = 4;
-            // 
-            // label64
-            // 
-            this.label64.AutoSize = true;
-            this.label64.Location = new System.Drawing.Point(7, 252);
-            this.label64.Name = "label64";
-            this.label64.Size = new System.Drawing.Size(58, 21);
-            this.label64.TabIndex = 5;
-            this.label64.Text = "波特率";
-            // 
-            // comboBox_Baudrate
-            // 
-            this.comboBox_Baudrate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.comboBox_Baudrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox_Baudrate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.comboBox_Baudrate.ForeColor = System.Drawing.Color.Black;
-            this.comboBox_Baudrate.FormattingEnabled = true;
-            this.comboBox_Baudrate.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.comboBox_Baudrate.Items.AddRange(new object[] {
-            "125K",
-            "250K"});
-            this.comboBox_Baudrate.Location = new System.Drawing.Point(10, 275);
-            this.comboBox_Baudrate.Name = "comboBox_Baudrate";
-            this.comboBox_Baudrate.Size = new System.Drawing.Size(103, 29);
-            this.comboBox_Baudrate.TabIndex = 3;
-            // 
             // ExportForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

+ 29 - 29
ExportForm.cs

@@ -637,7 +637,7 @@ namespace MOTINOVA_Motor_Factory_Set
             button_Generate.Text = "转换中";
 
             //保存为Excel文件
-            string importExcelName = "FOQC成机参数检验标准_Temple.xls";
+            string importExcelName = "FOQC成机参数检验标准_Temple2.xls";
             string exportExcelName = FilePath + Datenow + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ".xls"; 
 
             try
@@ -651,14 +651,14 @@ namespace MOTINOVA_Motor_Factory_Set
                 #region 开始按行写入单元格
                 //第3行,文件信息
                 IRow row = sheet.GetRow(2);
-                row.GetCell(0).SetCellValue("文件信息:" + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss"));
+                row.GetCell(0).SetCellValue("文件信息 File Info:" + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss"));
                 //第5行,第2列型号,第10列SPORT加速
                 row = sheet.GetRow(4);
                 row.GetCell(1).SetCellValue(textBox_Model.Text);
                 row.GetCell(9).SetCellValue(textBox_SPORT_Acc.Text);
                 //第6行,第2列SN,第10列TURBO增益
                 row = sheet.GetRow(5);
-                row.GetCell(1).SetCellValue("与打标一致");
+                row.GetCell(1).SetCellValue("Same as marking");
                 row.GetCell(9).SetCellValue(textBox_TURBO_Gain.Text);
                 //第7行,第2列硬件板号,第10列TURBO加速
                 row = sheet.GetRow(6);
@@ -686,48 +686,48 @@ namespace MOTINOVA_Motor_Factory_Set
                 row.GetCell(9).SetCellValue(textBox_Rate_Vol.Text + " V");
                 //第13行,第2列指拨模式,第10列速度信号个数
                 row = sheet.GetRow(12);
-                row.GetCell(1).SetCellValue(comboBox_GasMode.Text);
+                row.GetCell(1).SetCellValue(comboBox_GasMode.Text == "不支持" ? "不支持 No" : "支持 Yes");
                 row.GetCell(9).SetCellValue(textBox_SpeedSensor.Text);
                 //第14行,第2列启动模式,第10列踏频启动信号个数
                 row = sheet.GetRow(13);
-                row.GetCell(1).SetCellValue(comboBox_StartMode.Text);
+                row.GetCell(1).SetCellValue(comboBox_StartMode.Text == "柔和" ? "柔和 Comfort" : comboBox_StartMode.Text == "正常" ? "正常 Normal" : "强劲 Dynamic");
                 row.GetCell(9).SetCellValue(textBox_CadenceStart.Text);
                 //第15行,第2列停机时间,第10列车速信号来源
                 row = sheet.GetRow(14);
                 row.GetCell(1).SetCellValue(textBox_StopTime.Text + " ms");
-                row.GetCell(9).SetCellValue(comboBox_SpeedSensor.Text);
+                row.GetCell(9).SetCellValue(comboBox_SpeedSensor.Text == "传感器" ? "传感器 Sensor" : comboBox_SpeedSensor.Text == "踏频" ? "踏频 Cadence" : "通信 CAN");
                 //第16行,第2列限速,第10列轮胎周长微调
                 row = sheet.GetRow(15);
                 row.GetCell(1).SetCellValue(textBox_SpeedLimit.Text + " km/h");
                 row.GetCell(9).SetCellValue(textBox_WheelSizeAdj.Text + " cm");
                 //第17行,第2列下降速度,第10列推行转速
                 row = sheet.GetRow(16);
-                row.GetCell(1).SetCellValue(textBox_Dec.Text + " 级");
+                row.GetCell(1).SetCellValue("Level " + textBox_Dec.Text);
                 row.GetCell(9).SetCellValue(textBox_WalkSpeed.Text + " rpm");
                 //第18行,第2列前齿,第10列俯仰角零偏
                 row = sheet.GetRow(17);
                 row.GetCell(1).SetCellValue(textBox_T_Front.Text + " T");
-                row.GetCell(9).SetCellValue(textBox_Angle_P.Text + " ");
+                row.GetCell(9).SetCellValue(textBox_Angle_P.Text + " °");
                 //第19行,第2列后齿,第10列横滚角零偏
                 row = sheet.GetRow(18);
                 row.GetCell(1).SetCellValue(textBox_T_Tail.Text + " T");
-                row.GetCell(9).SetCellValue(textBox_Angle_R.Text + " ");
+                row.GetCell(9).SetCellValue(textBox_Angle_R.Text + " °");
                 //第20行,第2列限流,第10列姿态传感器
                 row = sheet.GetRow(19);
                 row.GetCell(1).SetCellValue(textBox_MaxCurrent.Text + " A");
-                row.GetCell(9).SetCellValue(comboBox_AstSensor.Text);
+                row.GetCell(9).SetCellValue(comboBox_AstSensor.Text == "不支持" ? "不支持 No" : "支持 Yes");
                 //第21行,第2列温度预警,第10列尾灯模式
                 row = sheet.GetRow(20);
                 row.GetCell(1).SetCellValue(textBox_NTC_Alarm.Text + " ℃");
-                row.GetCell(9).SetCellValue(comboBox_LightMode.Text);
+                row.GetCell(9).SetCellValue(comboBox_LightMode.Text.Replace("模式", "Mode"));
                 //第22行,第2列温度保护,第10列前灯电压
                 row = sheet.GetRow(21);
                 row.GetCell(1).SetCellValue(textBox_NTC_Ptotect.Text + " ℃");
-                row.GetCell(9).SetCellValue(comboBox_HeadLightVol.Text.Contains("随电池") ? comboBox_HeadLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_HeadLightVol.Text);
+                row.GetCell(9).SetCellValue(comboBox_HeadLightVol.Text.Contains("随电池") ? comboBox_HeadLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_HeadLightVol.Text.Contains("硬件") ? "硬件配置 By HW" : comboBox_HeadLightVol.Text);
                 //第23行,第2列码表,第10列后灯电压
                 row = sheet.GetRow(22);
-                row.GetCell(1).SetCellValue(comboBox_NoPBU.Text);
-                row.GetCell(9).SetCellValue(comboBox_TailLightVol.Text.Contains("随电池") ? comboBox_TailLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_TailLightVol.Text);
+                row.GetCell(1).SetCellValue(comboBox_NoPBU.Text == "有" ? "有 Yes" : "无 No");
+                row.GetCell(9).SetCellValue(comboBox_TailLightVol.Text.Contains("随电池") ? comboBox_TailLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_TailLightVol.Text.Contains("硬件") ? "硬件配置 By HW" : comboBox_TailLightVol.Text);
                 //第24行,第2列轮胎周长,第10列启动值
                 row = sheet.GetRow(23);
                 row.GetCell(1).SetCellValue(textBox_WheelSize.Text + " cm");
@@ -742,14 +742,14 @@ namespace MOTINOVA_Motor_Factory_Set
                 if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
                     row.GetCell(9).SetCellValue(textBox_K_Min.Text + " - " + textBox_K_Max.Text);
                 else
-                    row.GetCell(9).SetCellValue("无此项目");
+                    row.GetCell(9).SetCellValue("无此项目 None");
                 //第27行,第2列推行限速,第10列校正系数3
                 row = sheet.GetRow(26);
                 row.GetCell(1).SetCellValue(textBox_Walk_SpeedLimit.Text + " km/h");
                 if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
                     row.GetCell(9).SetCellValue(textBox_K_Min.Text + " - " + textBox_K_Max.Text);
                 else
-                    row.GetCell(9).SetCellValue("无此项目");
+                    row.GetCell(9).SetCellValue("无此项目 None");
                 //第28行,第2列ECO增益,第10列零点值1
                 row = sheet.GetRow(27);
                 row.GetCell(1).SetCellValue(textBox_ECO_Gain.Text);
@@ -760,14 +760,14 @@ namespace MOTINOVA_Motor_Factory_Set
                 if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
                     row.GetCell(9).SetCellValue(textBox_Zero_Min.Text + " - " + textBox_Zero_Max.Text);
                 else
-                    row.GetCell(9).SetCellValue("无此项目");
+                    row.GetCell(9).SetCellValue("无此项目 None");
                 //第30行,第2列NORM增益,第10列零点值3
                 row = sheet.GetRow(29);
                 row.GetCell(1).SetCellValue(textBox_NORM_Gain.Text);
                 if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
                     row.GetCell(9).SetCellValue(textBox_Zero_Min.Text + " - " + textBox_Zero_Max.Text);
                 else
-                    row.GetCell(9).SetCellValue("无此项目");
+                    row.GetCell(9).SetCellValue("无此项目 None");
                 //第31行,第2列NORM加速,第10列骑行历史
                 row = sheet.GetRow(30);
                 row.GetCell(1).SetCellValue(textBox_NORM_Acc.Text);
@@ -775,7 +775,7 @@ namespace MOTINOVA_Motor_Factory_Set
                 //第32行,第2列SPORT增益,第10列骑行历史
                 row = sheet.GetRow(31);
                 row.GetCell(1).SetCellValue(textBox_SPORT_Gain.Text);
-                row.GetCell(9).SetCellValue("无故障记录");
+                row.GetCell(9).SetCellValue("无故障记录 None");
 
                 #endregion
 
@@ -861,7 +861,7 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RatePower.Text = "250";//额定功率
                 textBox_RateSpeed.Text = "1200";//额定转速
                 textBox_Rate_Vol.Text = "36";//额定电压
-                textBox_NC_Current.Text = "1000";//空载电流
+                textBox_NC_Current.Text = "800";//空载电流
                 textBox_GasSpeedTh.Text = "1000";//指拨转速
                 textBox_Zero_Min.Text = "100";//零偏下限
                 textBox_Zero_Max.Text = "2000";//零偏上限
@@ -877,7 +877,7 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RatePower.Text = "250";//额定功率
                 textBox_RateSpeed.Text = "1200";//额定转速
                 textBox_Rate_Vol.Text = "36";//额定电压
-                textBox_NC_Current.Text = "1000";//空载电流
+                textBox_NC_Current.Text = "800";//空载电流
                 textBox_GasSpeedTh.Text = "1000";//指拨转速
                 textBox_Zero_Min.Text = "200";//零偏下限
                 textBox_Zero_Max.Text = "1800";//零偏上限
@@ -893,7 +893,7 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RatePower.Text = "250";//额定功率
                 textBox_RateSpeed.Text = "1200";//额定转速
                 textBox_Rate_Vol.Text = "36";//额定电压
-                textBox_NC_Current.Text = "1000";//空载电流
+                textBox_NC_Current.Text = "800";//空载电流
                 textBox_GasSpeedTh.Text = "1000";//指拨转速
                 textBox_Zero_Min.Text = "200";//零偏下限
                 textBox_Zero_Max.Text = "1800";//零偏上限
@@ -909,7 +909,7 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RatePower.Text = "250";//额定功率
                 textBox_RateSpeed.Text = "1200";//额定转速
                 textBox_Rate_Vol.Text = "36";//额定电压
-                textBox_NC_Current.Text = "1000";//空载电流
+                textBox_NC_Current.Text = "800";//空载电流
                 textBox_GasSpeedTh.Text = "1000";//指拨转速
                 textBox_Zero_Min.Text = "200";//零偏下限
                 textBox_Zero_Max.Text = "1800";//零偏上限
@@ -926,13 +926,13 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RateSpeed.Text = "1600";//额定转速
                 textBox_Rate_Vol.Text = "36";//额定电压
                 textBox_NC_Current.Text = "1000";//空载电流
-                textBox_GasSpeedTh.Text = "1000";//指拨转速
+                textBox_GasSpeedTh.Text = "1400";//指拨转速
                 textBox_Zero_Min.Text = "100";//零偏下限
                 textBox_Zero_Max.Text = "2000";//零偏上限
                 textBox_K_Min.Text = "0.25";//传感器标定值下限
                 textBox_K_Max.Text = "1.20";//传感器标定值下限
-                textBox_Start_Min.Text = "350";//启动值下限
-                textBox_Start_Max.Text = "750";//启动值上限
+                textBox_Start_Min.Text = "280";//启动值下限
+                textBox_Start_Max.Text = "500";//启动值上限
             }
             else if (textBox_Model.Text.Contains("PS"))
             {
@@ -942,13 +942,13 @@ namespace MOTINOVA_Motor_Factory_Set
                 textBox_RateSpeed.Text = "1800";//额定转速
                 textBox_Rate_Vol.Text = "48";//额定电压
                 textBox_NC_Current.Text = "1000";//空载电流
-                textBox_GasSpeedTh.Text = "1000";//指拨转速
+                textBox_GasSpeedTh.Text = "1600";//指拨转速
                 textBox_Zero_Min.Text = "100";//零偏下限
                 textBox_Zero_Max.Text = "2000";//零偏上限
                 textBox_K_Min.Text = "0.25";//传感器标定值下限
                 textBox_K_Max.Text = "1.20";//传感器标定值下限
-                textBox_Start_Min.Text = "350";//启动值下限
-                textBox_Start_Max.Text = "750";//启动值上限
+                textBox_Start_Min.Text = "280";//启动值下限
+                textBox_Start_Max.Text = "500";//启动值上限
             }
             else
             {

+ 2 - 2
ImportForm.cs

@@ -2425,9 +2425,9 @@ namespace MOTINOVA_Motor_Factory_Set
             }
             catch (System.Exception)
             {
-                label_Step.Text = "软件版本信息不完整!";
+                //label_Step.Text = "软件版本信息不完整!";
             }
-            if (string.Equals(FW_Version_Check, FW_Version_Result) == false) //主控版本错误,直接结束
+            if (string.Equals(FW_Version_Check.Trim(), FW_Version_Result.Trim()) == false) //主控版本错误,直接结束
             {
                 richTextBox_TestRecord.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "版本信息错误" + "\r\n";
                 label_Step.Text = "软件版本错误,测试结束!";

+ 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.4.4 Build Time: 2022-07-07 15:02";
+            this.label_Ver.Text = "Ver: V1.4.5 Build Time: 2022-09-14 12:59";
             // 
             // label_NetStatus
             // 

+ 11 - 1
StartForm.cs

@@ -114,6 +114,16 @@ namespace MOTINOVA_Motor_Factory_Set
                         ImportForm1.checkBox_LocalFile.Checked = false;
                         ImportForm1.checkBox_LocalFile.Enabled = true;
                     }
+                    //检查最新版本号,与当前版本对比
+                    string VerInfo = "";
+                    VerInfo = StartForm.myFtp.GetFileNameList(StartForm.myServerCfg.RootPath + "/version/")[0];
+                    string VerInfoCur = label_Ver.Text;
+                    if (VerInfoCur.Contains(VerInfo) == false)
+                    {
+                        MessageBox.Show("最新版本为" + VerInfo + ",请联系管理员!");
+                        this.Close();
+                    }
+
                     myFtp.IsNetConnected = true;
                 }
                 else//服务器连接失败
@@ -304,7 +314,7 @@ namespace MOTINOVA_Motor_Factory_Set
             {
                 string[] Local = System.IO.Directory.GetFiles(localPath);
                 for (int i = 0; i < Local.Length; i++)
-                    Local[i] = Local[i].Substring(Local[i].LastIndexOf("\\") + 1);
+                    Local[i] = Local[i].Substring(Local[i].LastIndexOf("\\") + 1); 
                 string[] Remote = StartForm.myFtp.GetFileNameList(remotePath);
                 for (int i = 0; i < Remote.Length; i++)
                     Remote[i] = Remote[i].Substring(Remote[i].LastIndexOf("/") + 1);

+ 2 - 2
bin/Debug/CheckSerialNum

@@ -1,4 +1,4 @@
 流水号:
-32
+48
 合格计数:
-11
+17

BIN
bin/Debug/FOQC成机参数检验标准_Temple.xls → bin/Debug/FOQC成机参数检验标准_Temple1.xls


BIN
bin/Debug/FOQC成机参数检验标准_Temple2.xls


+ 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>UsKnuOVhfvoA40pStgJjOK6pk4l+sl0keaxC8ZtbUr8=</dsig:DigestValue>
+        <dsig:DigestValue>n4jUGa/PiwOnV8TjNcnOPe9tzsO0CCXmwW+qxKLM2cM=</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="714240">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="715776">
       <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>vP4ks7OZntigyKqUa0TZ0F5nye5mNrl/tL80vMU+piQ=</dsig:DigestValue>
+        <dsig:DigestValue>+GYTIxu6Xn58V/3HG5PLJAK8Y6T1MipKz6jnc2prVBg=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
bin/Debug/MOTINOVA_Motor_Factory_Set.pdb


+ 8 - 8
bin/Debug/Server

@@ -1,3 +1,11 @@
+#内部服务器
+IP=192.168.1.74
+PORT=21
+USER=factory_test
+PASSWD=ttium
+ROOT=MOTINOVA_MC_Factory_Set
+LOCAL=ENABLE
+
 #虚拟机
 IP=192.168.1.246
 PORT=21
@@ -22,14 +30,6 @@ PASSWD=123456
 ROOT=/home/dail
 LOCAL=ENABLE
 
-#内部服务器
-IP=192.168.1.74
-PORT=21
-USER=factory_test
-PASSWD=ttium
-ROOT=MOTINOVA_MC_Factory_Set
-LOCAL=ENABLE
-
 #阿里云
 IP=47.105.122.91
 PORT=21

+ 2 - 2
bin/Debug/TestSerialNum

@@ -1,4 +1,4 @@
 流水号:
-31
+43
 合格计数:
-8
+12

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


BIN
images/read_book_study_icon-icons.com_51077.png


+ 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>UsKnuOVhfvoA40pStgJjOK6pk4l+sl0keaxC8ZtbUr8=</dsig:DigestValue>
+        <dsig:DigestValue>n4jUGa/PiwOnV8TjNcnOPe9tzsO0CCXmwW+qxKLM2cM=</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="714240">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_Motor_Factory_Set.exe" size="715776">
       <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>vP4ks7OZntigyKqUa0TZ0F5nye5mNrl/tL80vMU+piQ=</dsig:DigestValue>
+        <dsig:DigestValue>+GYTIxu6Xn58V/3HG5PLJAK8Y6T1MipKz6jnc2prVBg=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
obj/Debug/MOTINOVA_Motor_Factory_Set.pdb


+ 4 - 0
packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="FreeSpire.XLS" version="12.2.0" targetFramework="net48" />
+</packages>