Sfoglia il codice sorgente

频繁启停启动运行10s,停止5s,出现电机无法启动时报错28,停止测试

Dail 8 mesi fa
parent
commit
9d305c7981

+ 28 - 5
Core/Src/main.c

@@ -292,7 +292,7 @@ int main(void)
 					PulseCnt = 0;
 			}while(0);
      //轴承测试,运行40s,停5min,100个循环			
-     #else 1
+     #elseif 0
      do
 		 {
 		    static uint16_t PulseCnt = 0, CycleCnt = 0;
@@ -318,7 +318,30 @@ int main(void)
 				{
 				  IsBreakTrig_Flag = TRUE;
 				}
-		 }while(0); 		 
+		 }while(0);
+     //频繁启停启动运行10s,停止5s,出现电机无法启动时报错28,停止测试		 
+     #else
+		 do
+		 {
+			 static uint32_t AutoStartCount = 0;
+			 static uint16_t PulseCnt = 0;
+			 static uint32_t PeriodCnt = 0;
+			 if((HAL_GetTick() - PeriodCnt) > 1000)
+			 {
+			   PulseCnt++;
+			   PeriodCnt = HAL_GetTick();
+			 }				  
+			 if(PulseCnt < 10)
+			   IsBreakTrig_Flag = FALSE;
+			 else if(PulseCnt < 15)
+			   IsBreakTrig_Flag = TRUE;
+			 else
+			 {
+			   PulseCnt = 0;
+				 AutoStartCount++;
+			 }
+			   
+		 }while(0);
      #endif			
 						
 			//续航里程计算
@@ -383,7 +406,7 @@ int main(void)
 			
 			#if 1
 			//故障检测
-			//MC_Fault_Check_Process();
+			MC_Fault_Check_Process();
 			
 			//保护判断
 			MC_Protect_Check_Process();
@@ -404,9 +427,9 @@ int main(void)
 			SpdProportion_calculate();
 			
 			//变速器处理
-            GearBox_Loop();
+      GearBox_Loop();
 
-            //MCU自检
+      //MCU自检
 			STU_TimeBase();
 			STU_DoRunTimeChecks();
 			

File diff suppressed because it is too large
+ 289 - 289
MDK-ARM/QD007A_CTL_APP/QD007A_CTL_APP_CRC.hex


BIN
MDK-ARM/bin/QD007A_CTL_APP.bin


+ 1 - 1
User/Src/motor_control.c

@@ -908,7 +908,7 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
 	#elif 1
 	
 	//ÊäÈë½×Ô¾
-	MC_TorqueProcess_Param.TorqueApp  = 1000;
+	MC_TorqueProcess_Param.TorqueApp  = 300;
 	
 	//̤ƵÉèΪÆô¶¯
 	MC_CadenceResult.Cadence_Dir = MC_Cadence_Forward;

Some files were not shown because too many files changed in this diff