This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F280041C:MotorControl SDK Lab07如何正确重新启动电机

Guru**** 2330830 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1510968/tms320f280041c-motorcontrol-sdk-lab07-how-to-properly-restart-the-motor

器件型号:TMS320F280041C
主题:C2000WARE 中讨论的其他器件

工具/软件:

您好! 我想使用 Lab07作为工程的基础。 所以我把2个周期分为1个独立的->

while(1)
{
     while(motorVars.flagEnableSys == false)
     {
     
     }
    
    //turning loop
    while(motorVars.flagEnableSys == true)
      {
      }
      
      HAL_disablePWM(halHandle);
}

当我启用该代码(motorVars.flagRunIdentAndOnLine=true 且 motorVars.flagEnableSys = true)时、电机旋转正确。 它响应我的命令、依此类推。 但是、当我关闭电机(motorVars.flagEnableSys=false)并尝试重新启用电机(motorVars.flagEnableSys=true)时、我收到了故障。 我试图在转回环之后调用一些初始语句(svgenHandle = SVGEN_init (&svgen、sizeof (svgen))、setupControllers ();、trajHandle_spd = traJ_init (&traj_spd、sizeof (traj_spd )); 等等),但运气。 n`t 在停止电动机后应该重置一些东西、但我找不到。

我检查了这些标志、并与初始状态相同。  

您能提出解决方案吗? 如何在电机旋转后再次启动电机?

谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请查看 \ti\c2000\C2000 Ware_Motor Control_SDK_下的实验用户指南 \solutions\common\sensorless_foc\docs

    您只需设置或清除"motorVars.flagRunIdentAndOnLine"即可启动/停止电机。