Skip to main content
Associate III
April 18, 2024
Solved

Motor setting for B-G431B-ESC1

  • April 18, 2024
  • 2 replies
  • 1797 views

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

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.

2 replies

GMA
GMABest answer
Technical Moderator
April 19, 2024

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
UniRobAuthor
Associate III
April 19, 2024

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
Technical Moderator
April 19, 2024

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
UniRobAuthor
Associate III
April 19, 2024

Thanks.