Skip to main content
Associate III
Apr 18, 2024 8:32 AM UTC
Solved

Motor setting for B-G431B-ESC1

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 ?

This topic has been closed for replies.
GMA
GMABest answer
ST Technical Moderator
Apr 19, 2024 9:11 AM UTC

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 'Best answer'.Best regards.GMA

4 replies

GMA
GMABest answer
ST Technical Moderator
Apr 19, 2024 9:11 AM UTC

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 'Best answer'.Best regards.GMA
UniRobAuthor
Associate III
Apr 19, 2024 9:19 AM UTC

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 ?

GMA
ST Technical Moderator
Apr 19, 2024 9:36 AM UTC

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 'Best answer'.Best regards.GMA
UniRobAuthor
Associate III
Apr 19, 2024 9:45 AM UTC

Thanks.