cancel
Showing results for 
Search instead for 
Did you mean: 

Motor setting for B-G431B-ESC1

UniRob
Associate III

Hello eveybody.

Before try to uss a motor with encoder drive by B-G431B-ESC1 board, need some setting ?

 

Examples:

Encoder A and B sequence respect to motor rotation CW or CCW ?

Encoder phased to electrical motor phase ?

Any Other ?

1 ACCEPTED SOLUTION

Accepted Solutions
GMA
ST Employee

Hello @UniRob,

Please refere to "Quadrature Encoder sensor feedback processing" chapter in STM32 Motor Control SDK User Manual available in Workbench Tool "About>Documentations>Documentation>User Manual".
There is a description about rolling direction setup with encoders.

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

View solution in original post

4 REPLIES 4
GMA
ST Employee

Hello @UniRob,

Please refere to "Quadrature Encoder sensor feedback processing" chapter in STM32 Motor Control SDK User Manual available in Workbench Tool "About>Documentations>Documentation>User Manual".
There is a description about rolling direction setup with encoders.

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

Aftert do this, for creating a position trajectory profile can be done Motor Pilot or a C code is needed ?

I found this example:

 

while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
MC_ProgramPositionCommandMotor1(3.14/2,0.1);
HAL_Delay(2000);
MC_ProgramPositionCommandMotor1(-3.14/2,0.1);
HAL_Delay(2000);
}
/* USER CODE END 3 */

but if I need to move not for angle but for example 10 motor revolutions ?

Hello,

According to an5464 position control application note, first MC_ProgramPositionCommandMotor1 function parameter fTargetPosition is expressed in radians, in your case fTargetPosition=10*2*3.14.

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

Thanks.