cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Pilot lags a lot with target speed execution

MMoha.10
Associate III

I just started testing the Motor Control API ,such as the ones below for initializing the motor control

  MC_ProgramSpeedRampMotor1(0, 0);

  MC_StartMotor1();

Followed by this command which gets executed every 10 seconds. 

if (speed>0){
  // sets a given speed to the motor
  MC_ProgramSpeedRampMotor1_F(speed*20, 0);
  HAL_Delay(100);
}
else{
  // stops the motor
  MC_ProgramSpeedRampMotor1_F(0, 100);
  HAL_Delay(100);
}

While the commands work and are able to control the motor. I'm noticing a lag of several seconds between when the target speed is set and when the motor actually starts moving. Please see the video below for reference. You can see how the "Speed Reference" moves first followed by several seconds of delay before the motor starts moving.

Any idea as to what maybe causing it and how I can get rid of that delay?

 

0 REPLIES 0