cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a pmsm using C-functions of mc_api.c?

fpaga.1
Associate II

I tried to run my motor (PMSM) bit it doesn't run.

I used like reference the document:

https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/48/e6/91/f4/66/ea/48/a1/DM00490980/files/DM00490980.pdf/jcr:content/translations/en.DM00490980.pdf

I use:

  • STEVAL ESC001V1
  • Motor Control Workbench 5.4.8
  • Motor Profiler 5.4.8
  • STM32CubeIDE 1.8.0
  • STM32CubeMX

Firstly, I generated a code in Motor Control Workbech. In this code, I wrote the next code to run my motor but it didn't work. I don't know why because it didn't have any errors.

At the same time, I used "MC_GetSTMStateMotor1();" which showed me that I have 2 faults.

I need help pls!!

Kind regards

My code:

0693W00000KZfSaQAL.png 

You

Currocan see the state motor here:

0693W00000KZfSkQAL.png 

1 REPLY 1
GMA
ST Employee

Dear fpaga,

Firstly, we would like to sincerely apologize for the delay in replying to your post.
If your point is still pertinent, if motor state reports FAULT state, you can use MC_GetOccurredFaultsMotor1() api to get the error ID (definitions are in mc_type.h file). According to this error ID, please have a look to our FAQ page in order to handle it.

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