BLDC motor turns 20 degrees and stops

Hi, I have a code working perfectly with a outrunner motor, controlled with field oriented control(FOC). My task is to run a inrunner motor with the same code as a baseline, but the inrunner motor will only turn 20 degrees and then stop, draining 0.6A constantly. Have tried to solve this for several days now and cant find the problem. They have different encoders. The only signals I have from the motor is incremental outputs A and B from the encoder. Unfortunately I cant share any code due to contract with a company. Of course I don't expect anyone to solve the problem right away with so little info, but I will be very grateful if anyone have an idea of what could be causing this behavior.

thanks

Do you have different ESC controllers? Some ESC's require an "arming sequence" and won't run until that is done. The 20 degree rotation is just it's way of telling you that it has power and it's time for you to start arming.

MorganS: Do you have different ESC controllers? Some ESC's require an "arming sequence" and won't run until that is done. The 20 degree rotation is just it's way of telling you that it has power and it's time for you to start arming.

You clearly have no idea about field oriented control - this is a custom controller the poster is developing.

lmfao: Hi, I have a code working perfectly with a outrunner motor, controlled with field oriented control(FOC). My task is to run a inrunner motor with the same code as a baseline, but the inrunner motor will only turn 20 degrees and then stop, draining 0.6A constantly. Have tried to solve this for several days now and cant find the problem. They have different encoders. The only signals I have from the motor is incremental outputs A and B from the encoder. Unfortunately I cant share any code due to contract with a company. Of course I don't expect anyone to solve the problem right away with so little info, but I will be very grateful if anyone have an idea of what could be causing this behavior.

thanks

You need to explain your hardware and what you have got working already. For instance can you spin the motor open-loop? Can you get sensible values from the encoder? Are you able to convert encoder values to electrical phase for the motor? If so you should be able to see the phase error between the drive phase and encoder read back while turning the motor open-loop?