|
@@ -1338,6 +1338,8 @@ namespace MOTINOVA_MC_Test
|
|
|
c.Visible = true;
|
|
|
}
|
|
|
}
|
|
|
+ if (c is TabControl)
|
|
|
+ c.Visible = true;
|
|
|
}
|
|
|
button_ReadAll.Visible = true;
|
|
|
label1_Welcom.Visible = false;
|
|
@@ -1735,7 +1737,10 @@ namespace MOTINOVA_MC_Test
|
|
|
DataTemp = (ushort)(binary_data_1[32]);
|
|
|
textBox_Sensor3.Text = Convert.ToString(DataTemp) + " N.m";
|
|
|
Class_Sensor3Data.String = textBox_Sensor3.Text;
|
|
|
- Class_Sensor3Data.Data = DataTemp;
|
|
|
+ Class_Sensor3Data.Data = DataTemp;
|
|
|
+ //变速器状态
|
|
|
+ DataTemp = (ushort)(binary_data_1[33]);
|
|
|
+ textBox_GearBox.Text = Convert.ToString(DataTemp, 16).PadLeft(2, '0').ToUpper();
|
|
|
|
|
|
//计算传感器均值和标准差
|
|
|
TorqueArray[TorqueArray_Index] = binary_data_1[13];
|
|
@@ -2470,7 +2475,7 @@ namespace MOTINOVA_MC_Test
|
|
|
//电机运行信息清除
|
|
|
private void MC_RunInfo_Clear()
|
|
|
{
|
|
|
- foreach (Control c in groupBox3.Controls)
|
|
|
+ foreach (Control c in tabPage1.Controls)
|
|
|
{
|
|
|
if (c is TextBox)
|
|
|
{
|
|
@@ -2985,7 +2990,7 @@ namespace MOTINOVA_MC_Test
|
|
|
if (checkBox_ReadTorqueData.Checked == true)
|
|
|
{
|
|
|
#if true
|
|
|
- foreach (Control c in groupBox3.Controls)
|
|
|
+ foreach (Control c in tabPage1.Controls)
|
|
|
{
|
|
|
if (c is TextBox)
|
|
|
{
|
|
@@ -3033,7 +3038,7 @@ namespace MOTINOVA_MC_Test
|
|
|
if (checkBox_Savedata.Checked == true)
|
|
|
{
|
|
|
//判断是否显示运行信息
|
|
|
- foreach (Control c in groupBox3.Controls)
|
|
|
+ foreach (Control c in tabPage1.Controls)
|
|
|
{
|
|
|
if (c is TextBox)
|
|
|
{
|
|
@@ -3093,7 +3098,7 @@ namespace MOTINOVA_MC_Test
|
|
|
return;
|
|
|
}
|
|
|
string SaveData = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "_")+" ";
|
|
|
- foreach (Control c in groupBox3.Controls)
|
|
|
+ foreach (Control c in tabPage1.Controls)
|
|
|
{
|
|
|
if (c is TextBox)
|
|
|
{
|
|
@@ -3128,7 +3133,7 @@ namespace MOTINOVA_MC_Test
|
|
|
}
|
|
|
}
|
|
|
//判断是否显示运行信息
|
|
|
- foreach (Control c in groupBox3.Controls)
|
|
|
+ foreach (Control c in tabPage1.Controls)
|
|
|
{
|
|
|
if (c is TextBox)
|
|
|
{
|
|
@@ -3949,6 +3954,9 @@ namespace MOTINOVA_MC_Test
|
|
|
}
|
|
|
textBox_Torque_Start.Text = "---";
|
|
|
SendCmd((ushort)0x751, (byte)0x11, (ushort)0x3500, null);
|
|
|
+ //查询单力矩零点和校正系数
|
|
|
+ SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2000, null); //单力矩零点值
|
|
|
+ SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2900, null); //单力矩校正系数和启动值
|
|
|
//查询用户参数1
|
|
|
MC_Config_Clear();
|
|
|
SendCmd((ushort)0x751, (byte)0x11, (ushort)0x1A00, null);
|
|
@@ -4057,7 +4065,7 @@ namespace MOTINOVA_MC_Test
|
|
|
//选择单力矩
|
|
|
private void radioButton_SingleSensor_CheckedChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- checkBox_Sensor2.Checked = true;
|
|
|
+ checkBox_Sensor1.Checked = true;
|
|
|
|
|
|
label5.Visible = false;
|
|
|
textBox_Sensor2_Avg.Visible = false;
|
|
@@ -4075,7 +4083,7 @@ namespace MOTINOVA_MC_Test
|
|
|
checkBox_Sensor3.Visible = false;
|
|
|
checkBox_Sensor3.Checked = false;
|
|
|
|
|
|
- //this.BackColor = Color.White;
|
|
|
+ this.BackColor = System.Drawing.Color.FromArgb((int)0, (int)192, (int)192);
|
|
|
}
|
|
|
|
|
|
//选择三力矩
|
|
@@ -4098,6 +4106,8 @@ namespace MOTINOVA_MC_Test
|
|
|
textBox_Sensor3_K.Visible = true;
|
|
|
checkBox_Sensor3.Visible = true;
|
|
|
checkBox_Sensor3.Checked = true;
|
|
|
+
|
|
|
+ this.BackColor = System.Drawing.Color.FromArgb((int)46, (int)193, (int)144);
|
|
|
}
|
|
|
}
|
|
|
}
|