浏览代码

增加调试信息,待完善。

Dail 1 年之前
父节点
当前提交
64e1d89b3d

二进制
.vs/MOTINOVA_MC_Test/FileContentIndex/82780458-0955-44cd-9254-1fa3fd3b31f1.vsidx


二进制
.vs/MOTINOVA_MC_Test/FileContentIndex/fc45f047-c2c7-43f8-9942-7e765efb470b.vsidx


二进制
.vs/MOTINOVA_MC_Test/v17/.suo


文件差异内容过多而无法显示
+ 114 - 167
MOTINOVA_MC_Test/Form1.Designer.cs


+ 18 - 8
MOTINOVA_MC_Test/Form1.cs

@@ -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);
         }
     }
 }

+ 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>QuYCkDqU8Vx6GEuaAOPf+0sV7nQ=</dsig:DigestValue>
+        <dsig:DigestValue>fEyjXWdtddt0iG6T6yVDVJFjmnA=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二进制
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="256512">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="257536">
       <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>8H7a6G8FqG+9bi8Tqvpp5XttrS8=</dsig:DigestValue>
+        <dsig:DigestValue>JSyYLv3LicRggXoGaNjQj0SRzrQ=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二进制
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.pdb


二进制
MOTINOVA_MC_Test/bin/Debug/app.publish/MOTINOVA_MC_Test.exe


+ 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>QuYCkDqU8Vx6GEuaAOPf+0sV7nQ=</dsig:DigestValue>
+        <dsig:DigestValue>fEyjXWdtddt0iG6T6yVDVJFjmnA=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二进制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.GenerateResource.cache


二进制
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="256512">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="257536">
       <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>8H7a6G8FqG+9bi8Tqvpp5XttrS8=</dsig:DigestValue>
+        <dsig:DigestValue>JSyYLv3LicRggXoGaNjQj0SRzrQ=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二进制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.pdb


部分文件因为文件数量过多而无法显示