2024-04-18 01:32 AM
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 ?
Solved! Go to Solution.
2024-04-19 02:11 AM
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.
2024-04-19 02:11 AM
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.
2024-04-19 02:19 AM
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 ?
2024-04-19 02:36 AM
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.
2024-04-19 02:45 AM
Thanks.