Skip to main content
N_1
Associate III
January 13, 2020
Solved

Count rotation circles during motor rotation

  • January 13, 2020
  • 3 replies
  • 1200 views

Hy dear helpers,

I am using STM32G431CB, I generated code with the help of motor control workbench. Everything works fine, but I can not count how many circles the motor rotated. 

I would like to do the following: Start the motor, do 5 whole circles, then stop.

I have sensorless mode, and I have to do this not by calculating the time, but by the actual mechanical statement of the motor.

Can you tell me how can I do this? Thank you all

This topic has been closed for replies.
Best answer by Fred V.

Hello,

What you are trying to do looks like position control. the current motor control SDK does not support this feature for sensorless configurations. However, starting with version 5.4.3 of the motor control SDK, an encoder based position control example is provided. May be you can build on that for your application. However, it requires that you use a quadrature encoder for position detection.

Best Regards,

Fred V.

3 replies

Fred V.
Fred V.Answer
ST Employee
January 15, 2020

Hello,

What you are trying to do looks like position control. the current motor control SDK does not support this feature for sensorless configurations. However, starting with version 5.4.3 of the motor control SDK, an encoder based position control example is provided. May be you can build on that for your application. However, it requires that you use a quadrature encoder for position detection.

Best Regards,

Fred V.

N_1
N_1Author
Associate III
January 15, 2020

Thank you Fred. And is it possible to change the rotation direction of the motor immediately? (without any stop, just cyclic cw/ccw)

Thank you!

N

Laurent Ca...
Senior III
October 6, 2020

Dear @NN.2y​ 

As it is a new question, please open a new post if you still need to solve this question.

Best regards

Laurent Ca...