2025-03-24 5:00 AM - last edited on 2025-03-25 6:47 AM by mƎALLEm
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
}
Solved! Go to Solution.
2025-04-03 8:58 AM
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.
2025-04-03 8:58 AM
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.