Bläddra i källkod

V7.2.0.0.0_20220714
1 力矩模式和指拨模式增加PCB温度系数限制,PCB温度从80度开始限制;
2 软件版本改为:V7.2.0.0.0_20220714;

white.xu 3 år sedan
förälder
incheckning
57b142dca8
5 ändrade filer med 1647 tillägg och 1634 borttagningar
  1. 13 4
      J-scope.jscope
  2. 1625 1625
      MDK-ARM/QD007A_CTL_APP/QD007A_CTL_APP_CRC.hex
  3. BIN
      MDK-ARM/bin/QD007A_CTL_APP.bin
  4. 8 4
      User/Src/motor_control.c
  5. 1 1
      User/Src/var.c

+ 13 - 4
J-scope.jscope

@@ -19,7 +19,7 @@
         </Windows>
         <SelectedSymbols>
             <Symbol>
-                <Options Name="SpeedSetReal" Address="0x20000118" Type="short" TypeID="11" Size="2" GraphColorRed="255" GraphColorGreen="215" GraphColorBlue="0" YMinSampled="0" YMaxSampled="1200" YAvgSampled="1141" Offset="4" ShowInGraph="1" YOffset="200" IsAutoConfig="0" YResolution="200" MaxValue="2000" File="..\User\Src\motor_control.c" Scope="0" DrawStyle="0" />
+                <Options Name="SpeedSetReal" Address="0x20000118" Type="short" TypeID="11" Size="2" GraphColorRed="255" GraphColorGreen="215" GraphColorBlue="0" YMinSampled="0" YMaxSampled="1200" YAvgSampled="1142" Offset="4" ShowInGraph="0" YOffset="200" IsAutoConfig="0" YResolution="200" MaxValue="2000" File="..\User\Src\motor_control.c" Scope="0" DrawStyle="0" />
             </Symbol>
             <Symbol>
                 <Options Name="MotorSpeed" Address="0x200011DE" Type="short" TypeID="11" Size="2" GraphColorRed="0" GraphColorGreen="255" GraphColorBlue="0" YMinSampled="0" YMaxSampled="0" YAvgSampled="0" Offset="6" ShowInGraph="0" YOffset="200" IsAutoConfig="0" YResolution="200" MaxValue="2000" File="..\User\Src\log_save.c" Scope="0" DrawStyle="0" />
@@ -28,13 +28,22 @@
                 <Options Name="Ref_Speed" Address="0x20001208" Type="short" TypeID="11" Size="2" GraphColorRed="0" GraphColorGreen="0" GraphColorBlue="176" YMinSampled="0" YMaxSampled="0" YAvgSampled="0" Offset="8" ShowInGraph="0" YOffset="200" IsAutoConfig="0" YResolution="100" MaxValue="1000" File="..\User\Src\log_save.c" Scope="0" DrawStyle="0" />
             </Symbol>
             <Symbol>
-                <Options Name="IqFdb" Address="0x20000018" Type="short" TypeID="11" Size="2" GraphColorRed="160" GraphColorGreen="32" GraphColorBlue="240" YMinSampled="-7" YMaxSampled="18" YAvgSampled="1" Offset="10" ShowInGraph="0" YOffset="200" IsAutoConfig="0" YResolution="10" MaxValue="20" File="..\User\Src\MC_FOC_Driver.c" Scope="1" DrawStyle="0" />
+                <Options Name="IqFdb" Address="0x20000018" Type="short" TypeID="11" Size="2" GraphColorRed="160" GraphColorGreen="32" GraphColorBlue="240" YMinSampled="-3" YMaxSampled="14" YAvgSampled="7" Offset="10" ShowInGraph="0" YOffset="200" IsAutoConfig="0" YResolution="10" MaxValue="20" File="..\User\Src\MC_FOC_Driver.c" Scope="1" DrawStyle="0" />
             </Symbol>
             <Symbol>
-                <Options Name="UqVoltFlt" Address="0x20000010" Type="int" TypeID="12" Size="4" GraphColorRed="255" GraphColorGreen="0" GraphColorBlue="0" YMinSampled="-51200" YMaxSampled="5677138" YAvgSampled="290828" Offset="12" ShowInGraph="1" YOffset="200" IsAutoConfig="1" YResolution="10000000" MaxValue="20000000" File="..\User\Src\MC_FOC_Driver.c" Scope="0" DrawStyle="0" />
+                <Options Name="UqVoltFlt" Address="0x20000010" Type="int" TypeID="12" Size="4" GraphColorRed="255" GraphColorGreen="0" GraphColorBlue="0" YMinSampled="-51200" YMaxSampled="12638553" YAvgSampled="6589" Offset="12" ShowInGraph="0" YOffset="200" IsAutoConfig="1" YResolution="10000000" MaxValue="20000000" File="..\User\Src\MC_FOC_Driver.c" Scope="0" DrawStyle="0" />
             </Symbol>
             <Symbol>
-                <Options Name="qV_Component1" Address="0x20000020" Type="short" TypeID="11" Size="2" GraphColorRed="0" GraphColorGreen="191" GraphColorBlue="255" YMinSampled="0" YMaxSampled="31128" YAvgSampled="2276" Offset="16" ShowInGraph="0" YOffset="200" IsAutoConfig="1" YResolution="20000" MaxValue="40000" File="..\User\Src\MC_Globals.c" Scope="0" DrawStyle="0" />
+                <Options Name="qV_Component1" Address="0x20000020" Type="short" TypeID="11" Size="2" GraphColorRed="0" GraphColorGreen="191" GraphColorBlue="255" YMinSampled="-20" YMaxSampled="31128" YAvgSampled="28" Offset="16" ShowInGraph="0" YOffset="200" IsAutoConfig="1" YResolution="20000" MaxValue="40000" File="..\User\Src\MC_Globals.c" Scope="0" DrawStyle="0" />
+            </Symbol>
+            <Symbol>
+                <Options Name="K_ByTemperature_Result" Address="0x20000138" Type="ushort" TypeID="7" Size="2" GraphColorRed="0" GraphColorGreen="100" GraphColorBlue="0" YMinSampled="0" YMaxSampled="1024" YAvgSampled="1023" Offset="18" ShowInGraph="1" YOffset="200" IsAutoConfig="0" YResolution="500" MaxValue="66800" File="..\User\Src\motor_control.c" Scope="1" DrawStyle="0" />
+            </Symbol>
+            <Symbol>
+                <Options Name="K_ByTemperature_Result" Address="0x20000124" Type="ushort" TypeID="7" Size="2" GraphColorRed="205" GraphColorGreen="133" GraphColorBlue="63" YMinSampled="0" YMaxSampled="0" YAvgSampled="0" Offset="20" ShowInGraph="1" YOffset="200" IsAutoConfig="1" YResolution="10000" MaxValue="66800" File="..\User\Src\motor_control.c" Scope="1" DrawStyle="0" />
+            </Symbol>
+            <Symbol>
+                <Options Name="K_ByTemperature_Result" Address="0x2000011E" Type="ushort" TypeID="7" Size="2" GraphColorRed="255" GraphColorGreen="215" GraphColorBlue="0" YMinSampled="0" YMaxSampled="1024" YAvgSampled="1023" Offset="22" ShowInGraph="1" YOffset="200" IsAutoConfig="0" YResolution="200" MaxValue="66800" File="..\User\Src\motor_control.c" Scope="1" DrawStyle="0" />
             </Symbol>
         </SelectedSymbols>
     </Project>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1625 - 1625
MDK-ARM/QD007A_CTL_APP/QD007A_CTL_APP_CRC.hex


BIN
MDK-ARM/bin/QD007A_CTL_APP.bin


+ 8 - 4
User/Src/motor_control.c

@@ -436,7 +436,7 @@ MC_CalParam_Struct_t MC_AssistRunMode_Gas_Process(uint16_t SensorData, MC_GearSt
 	static uint16_t K_ByVoltage_Set_Old = 1024;
 	uint16_t K_ByVoltage_Set;
 	static uint16_t K_ByVoltage_Result;
-	uint16_t K_ByTemperature_Set;
+	uint32_t K_ByTemperature_Set, K_ByTemperature_Set1, K_ByTemperature_Set2;
 	static uint16_t K_ByTemperature_Result;
 
 	//根据电压调节输出
@@ -445,7 +445,9 @@ MC_CalParam_Struct_t MC_AssistRunMode_Gas_Process(uint16_t SensorData, MC_GearSt
   K_ByVoltage_Result = MC_DataSet_Linear_Process(K_ByVoltage_Set, K_ByVoltage_Result, 1, 1); //设定值与给定值线性处理
 	
 	//根据温度调节输出
-	K_ByTemperature_Set = MC_Cal_K_ByTemperature(MC_RunInfo.T_Coil, MC_ConfigParam1.TempTH_Alarm); //根据温度计算衰减比例
+	K_ByTemperature_Set1 = MC_Cal_K_ByTemperature(MC_RunInfo.T_Coil, MC_ConfigParam1.TempTH_Alarm); //根据温度计算衰减比例
+	K_ByTemperature_Set2 = MC_Cal_K_ByTemperature(MC_RunInfo.T_PCB, (MC_ConfigParam1.TempTH_Alarm-15)); //根据温度计算衰减比例
+	K_ByTemperature_Set  = (K_ByTemperature_Set1 * K_ByTemperature_Set2)>>10;		
 	K_ByTemperature_Result = MC_DataSet_Linear_Process(K_ByTemperature_Set, K_ByTemperature_Result, 1, 1); //设定值与给定值线性处理
 	
 	#else
@@ -1116,7 +1118,7 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
 	static uint16_t K_ByVoltage_Set_Old = 1024;
 	uint16_t K_ByVoltage_Set;
 	static uint16_t K_ByVoltage_Result;
-	uint16_t K_ByTemperature_Set;
+	uint32_t K_ByTemperature_Set, K_ByTemperature_Set1, K_ByTemperature_Set2;
 	static uint16_t K_ByTemperature_Result;
 
 	//根据电压调节输出
@@ -1125,7 +1127,9 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
   K_ByVoltage_Result = MC_DataSet_Linear_Process(K_ByVoltage_Set, K_ByVoltage_Result, 1, 1); //设定值与给定值线性处理
 	
 	//根据温度调节输出
-	K_ByTemperature_Set = MC_Cal_K_ByTemperature(MC_RunInfo.T_Coil, MC_ConfigParam1.TempTH_Alarm); //根据温度计算衰减比例
+	K_ByTemperature_Set1 = MC_Cal_K_ByTemperature(MC_RunInfo.T_Coil, MC_ConfigParam1.TempTH_Alarm); //根据温度计算衰减比例
+	K_ByTemperature_Set2 = MC_Cal_K_ByTemperature(MC_RunInfo.T_PCB, (MC_ConfigParam1.TempTH_Alarm-15)); //根据温度计算衰减比例
+	K_ByTemperature_Set  = (K_ByTemperature_Set1 * K_ByTemperature_Set2)>>10;	
 	K_ByTemperature_Result = MC_DataSet_Linear_Process(K_ByTemperature_Set, K_ByTemperature_Result, 1, 1); //设定值与给定值线性处理
 	
 	#else

+ 1 - 1
User/Src/var.c

@@ -499,7 +499,7 @@ void Var_Init(void)
 		
 	//MC版本信息初始化,Mode和SN从EEPROM读取
 	strncpy(MC_VerInfo.HW_Version, (char*)"TTKZ010D.       ", 16);
-	strncpy(MC_VerInfo.FW_Version, (char*)"V7r2r0_20220713C", 16);
+	strncpy(MC_VerInfo.FW_Version, (char*)"V7r2r0_20220714C", 16);
   #if NormalWork
 	MC_VerInfo.FW_Version[15] = '.';
   #endif

Vissa filer visades inte eftersom för många filer har ändrats