FocControlFunction.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**************************** (C) COPYRIGHT 2018 Fortiortech shenzhen *****************************
  2. ******************************************************************************
  3. * @file FocControl.h
  4. * @author Fortior Application Team
  5. * @version V1.0.0
  6. * @date 10-Apr-2017
  7. * @brief define motor contorl parameter
  8. ******************************************************************************
  9. */
  10. #ifndef __FocControlFunction_H_
  11. #define __FocControlFunction_H_
  12. /* Define to prevent recursive inclusion -------------------------------------*/
  13. typedef struct
  14. {
  15. int16 IuOffset; //Iu的偏置电压
  16. int32 IuOffsetSum; //Iu的偏置电压总和
  17. int16 IvOffset; //Iv的偏置电压
  18. int32 IvOffsetSum; //Iv的偏置电压总和
  19. int16 Iw_busOffset; //Iw或Ibus的偏置电压
  20. int32 Iw_busOffsetSum;//Iw或Ibus的偏置电压总和
  21. int16 OffsetCount; //偏置电压采集计数
  22. int8 OffsetFlag; //偏置电压结束标志位
  23. }CurrentOffset;
  24. extern CurrentOffset xdata mcCurOffset;
  25. //extern FaultVarible idata mcFaultDect;
  26. extern void GetCurrentOffset(void);
  27. extern void Motor_Ready (void);
  28. extern void Motor_Init (void);
  29. extern void FOC_Init(void);
  30. extern void Motor_Charge(void);
  31. extern void MC_Stop(void);
  32. extern void Motor_TailWind(void);
  33. extern void TailWindDealwith(void);
  34. extern void Motor_Open(void);
  35. extern void Motor_Align(void);
  36. extern void McTailWindDealwith(void);
  37. extern void BEMFTailWindDealwith(void);
  38. #endif