cancel
Showing results for 
Search instead for 
Did you mean: 

position control randomly stopped working

msingh
Senior

Hi,

I had successfully created a project using the AN5464 application note using the following hardware:

  • NUCLEO-F303RE
  • X-NUCLEO-IHM08M1

I have create the project using MotorControl Workbench 5.4.4 and managed to achieve rotation on the motor, however this doesn't seem to be a reliable code, it works for a while and then suddenly stops working, I have debugged the code and I have realised that it never goes beyond the "while(MC_GetAlignmentStatusMotor1()!=TC_ALIGNMENT_COMPLETED){}" eventhough it has worked for the past week! I have also noticed the motor doesn't take any current (0.01A) which means it doesn't even try to move if I don't power the microcontroller but only the ihm08m1 board it takes 0.04A when I plug in the microcontroller it goes down to 0.01A. Previously it was using 0.045A - 0.4A of current while driving the motor and 0.45A when in locked rotor mode. I cannot understand why did it suddenly stop?! I have checked the encoder and all 3 channels work fine. any help is much appreciated.

Kind regards

Manpreet Singh

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
25 REPLIES 25
msingh
Senior

Good morning,

So here's an update. I have gone back by 2 backups to get motor rotates again. I do not know what happened to my latest backup as it was working fine when I did the back up. However it didn't work straight away but I had to create a new work space, clean the project and built it, while last week I only cleaned and build the project and none of my back ups worked. This week I decided to create a completely new workspace for each version of my backup and one of the backups worked, does anyone know how changing the workspace helped? and it doesn't work with the latest backup but the previous ONLY. (I still don't understand why it stopped in the first place).

Manpreet

Laurent Ca...
Lead II

Dear @msingh​ 

Therefore, you're problem is fixed, isn't it?

Best regards

Laurent Ca...

msingh
Senior

Yes, the basic function works now.

Rajeswari
Associate III

is your code from an5464 working. I'm having the same issue. can you get back as soon as possible. my code stops at "while(MC_GetAlignmentStatusMotor1()!=TC_ALIGNMENT_COMPLETED){}" too

Rajeswari
Associate III

@msingh @Laurent Ca... @KKuma.3 I'm trying to do position control using AN5464. My code stops at "while(MC_GetAlignmentStatusMotor1()!=TC_ALIGNMENT_COMPLETED){}". My hardware setup is all good. any help regarding this would be much appreciated

Hello @Rajeswari,

To ensure the best support from our part and by respect to other users, I recommend creating a new post for your issue, and making reference to the posts / solutions you have already checked or tested. That way, the original poster doesn't get pinged for an issue he already solved, and your issue will have more visibility among the other posts.

Do not forget to follow these basic rules in your new post :

How to write a Motor control post to get a respons... - STMicroelectronics Community

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