Skip to main content
Associate III
March 24, 2025
Solved

Torque command sequence

  • March 24, 2025
  • 1 reply
  • 425 views

I want to confirm if the below 3 commands 1,2,3 can be given sequentially or any delay

required between them. These 3 commands i am giving when a key is pressed.

if(IDLE == MC_GetSTMStateMotor1())
{
 g_qdreference_s.q = 1000;
 MC_SetCurrentReferenceMotor1(g_qdreference_s); - command 1
 MC_ProgramTorqueRampMotor1(g_qdreference_s.q ,1000); - command 2
 (void)MC_StartMotor1(); - command 3
}
Best answer by GMA

Hello @STUser34,

Refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>Files", "Src>COMMON>mc_api.c" link and click on MC_ProgramTorqueRampMotor1 function for more detail. 
MC_SetCurrentReferenceMotor1() is redundant with MC_ProgramTorqueRampMotor1(), and a delay of 1000 ms is necessary after MC_StartMotor1() command.

1 reply

GMA
GMABest answer
Technical Moderator
April 3, 2025

Hello @STUser34,

Refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>Files", "Src>COMMON>mc_api.c" link and click on MC_ProgramTorqueRampMotor1 function for more detail. 
MC_SetCurrentReferenceMotor1() is redundant with MC_ProgramTorqueRampMotor1(), and a delay of 1000 ms is necessary after MC_StartMotor1() command.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA