cancel
Showing results for 
Search instead for 
Did you mean: 

Torque command sequence

STUser34
Associate III

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
}
1 ACCEPTED SOLUTION

Accepted Solutions
GMA
ST Employee

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

View solution in original post

1 REPLY 1
GMA
ST Employee

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