|
@@ -27,7 +27,7 @@ namespace Welling_Motor_Debug_Tool
|
|
|
{
|
|
|
#region 变量定义
|
|
|
//版本号
|
|
|
- public static string Version = "2.5.4";
|
|
|
+ public static string Version = "2.5.5";
|
|
|
//串口实例
|
|
|
Serial_Process mySerialProcess = new Serial_Process();
|
|
|
string PortNumSave = "";
|
|
@@ -6978,13 +6978,14 @@ namespace Welling_Motor_Debug_Tool
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- catch (System.Exception)
|
|
|
+ catch (System.Exception ex)
|
|
|
{
|
|
|
label_FacModeStatus.Text = "存在故障!";
|
|
|
label_FacModeResult.BackColor = Color.Red;
|
|
|
label_FacModeResult.Text = "标签格式错误";
|
|
|
button__FacMode_Start.Enabled = true;
|
|
|
textBox_FacModeScan.Enabled = true;
|
|
|
+ System.Windows.Forms.MessageBox.Show(ex.Message);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -7010,13 +7011,14 @@ namespace Welling_Motor_Debug_Tool
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- catch (System.Exception)
|
|
|
+ catch (System.Exception ex)
|
|
|
{
|
|
|
label_FacModeStatus.Text = "存在故障!";
|
|
|
label_FacModeResult.BackColor = Color.Red;
|
|
|
label_FacModeResult.Text = "标签格式错误";
|
|
|
button__FacMode_Start.Enabled = true;
|
|
|
textBox_FacModeScan.Enabled = true;
|
|
|
+ System.Windows.Forms.MessageBox.Show(ex.Message);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -10048,13 +10050,14 @@ namespace Welling_Motor_Debug_Tool
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- catch (System.Exception)
|
|
|
+ catch (System.Exception ex)
|
|
|
{
|
|
|
label_CheckModeStatus.Text = "存在故障!";
|
|
|
label_CheckModeResult.BackColor = Color.Red;
|
|
|
label_CheckModeResult.Text = "标签格式错误";
|
|
|
button_CheckModeStart.Enabled = true;
|
|
|
textBox_CheckModeScan.Enabled = true;
|
|
|
+ System.Windows.Forms.MessageBox.Show(ex.Message);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -10580,6 +10583,7 @@ namespace Welling_Motor_Debug_Tool
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + key + "读取成功" + "\r\n");
|
|
|
//比较当前指令,读取的配置文件和返回数据比较
|
|
|
string ParamWrite = ConfigCmd[key].Substring(24, ConfigCmd[key].Length - 40).Trim();
|
|
|
string ParamRead = "";
|
|
@@ -10598,10 +10602,11 @@ namespace Welling_Motor_Debug_Tool
|
|
|
CheckMode_Stop(false);
|
|
|
return;
|
|
|
}
|
|
|
+ richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + key + "返回指令正确,比较参数" + "\r\n");
|
|
|
if (string.Compare(key, "[其它传感器参数]") == 0)
|
|
|
ParamRead = CmdRevStrTemp.Substring(90, CmdRevStrTemp.Length - 90).Trim(); //去掉命令字、力矩传感器标定参数
|
|
|
else if (string.Compare(key, "[力矩传感器参数]") == 0)
|
|
|
- ParamRead = CmdRevStrTemp.Substring(6, CmdRevStrTemp.Length - 6 - 36).Trim(); //去掉命令字、其它传感器参数
|
|
|
+ ParamRead = CmdRevStrTemp.Substring(36, CmdRevStrTemp.Length - 6 - 30 - 36).Trim(); //去掉命令字、零点、其它传感器参数
|
|
|
else if (string.Compare(key, "[控制参数]") == 0)
|
|
|
ParamRead = CmdRevStrTemp.Substring(18, CmdRevStrTemp.Length - 18).Trim(); //去掉命令字、位置零点
|
|
|
else
|
|
@@ -10627,9 +10632,9 @@ namespace Welling_Motor_Debug_Tool
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- catch (System.Exception)
|
|
|
+ catch (System.Exception ex)
|
|
|
{
|
|
|
- richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "参数检验失败" + "\r\n");
|
|
|
+ richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "参数检验失败,错误原因:" + ex.Message + "\r\n");
|
|
|
label_CheckModeStatus.Text = "存在故障!";
|
|
|
label_CheckModeResult.BackColor = Color.Red;
|
|
|
label_CheckModeResult.Text = "测试异常";
|