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

1 ACCEPTED SOLUTION

Accepted Solutions
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

View solution in original post

25 REPLIES 25
Laurent Ca...
Lead II

Dear @msingh​ 

You wrote " it works for a while and then suddenly stops working".

By that, do you mean that it is a regular behavior (systematically this is what happens) or do you mean that it works for several weeks and suddenly it does not work at all?

Best regards

Laurent Ca...

It doesn't work at all now!!! According to the application note AN5464 the "MC_startMoro1" is supposed to "performs an auto-start of the driving with both the encoder alignment procedure and the encoder zero reset" however nothing is actually moving and then obviously the code remains stuck in the" while(MC_GetAlignmentStatusMotor1()!=TC_ALIGNMENT_COMPLETED){} ". This was all working yesterday and this morning nothing works I am really confused about what's going on here.

Laurent Ca...
Lead II

Dear @msingh​ 

If you haven't changed the code, and if it worked for a while and suddenly it doesn't work at all, then you probably have an HW problem.

Therefor I suggest you to:

  • 1. check your connections
  • 2. check your power board
  • 3. and check your motor (by the way,what is the motor you use?)

Best regards

Laurent Ca...

I had tried to implement the printf function which is when I noticed this issue. Then, I went back to the previous version of the code and it still didn't work.

1) Connections are fine

2) I checked some voltages according to the ihm08m1 schematic and it looks good.

3) Maxon EC-I 40 50 Watt

Laurent Ca...
Lead II

Dear @msingh​ 

And did you check your motor is still working and with the same characteristics?

Best regards

Laurent ca...

msingh
Senior

I do not see any PWM signals being generated I'm guessing that's the reason for it not to move? can the debugger configurations affect this? I had changed them to try implement printf. Here's what they look like now.

0693W000004KQSbQAO.jpg

I had 2 motors, I had tried both of them and them left one on the side. Neither of them works with the set up I have anymore. I can try driving them with the maxon controller but I'm 95% sure they'll both work. If anything was happened yesterday then I'd think the motor is burnt or any other issue but yesterday it was working all good.

Laurent Ca...
Lead II

Dear @msingh (Community Member)​ 

Did you try:

  • 1. to come back to the previous configuration of the debugger (just in case of)
  • 2. and to run you board without physical connection to the debugger

 ?

Best regards

Laurent ca...