Motor does not run after running successfully

Now i am really struck the motor was running successfully for several days, but now it is back to square one, the motor does not run at all, then i changed the command to torque ramp then it runs for some time and then stops, the pwm signals keep coming the motor strucks up and creates noise. What is wrong? Is it with hardware software or both? Please help.

Can it be a mechanical problem - if using a magnetic sensor, people often have problems with the magnet becoming loose and slipping… if you have a loose magnet or encoder disc, then the alignment of the motor will be lost and you will have the type of error that you describe.

Thank you for replying, I analysed the CAN data I am finding that the PI loop is having problem the error between the iq reference and iq actual is going to very high values and IQ actual not becoming equal to IQ reference. Could this be the reason? I have to test it by changing the KP and KI values.

I found that a low IQ value is given when high IQ value given it runs but need to check consistency.