Skip to main content
fpaga.1
Associate II
February 18, 2022
Question

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

  • February 18, 2022
  • 1 reply
  • 854 views

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 

This topic has been closed for replies.

1 reply

GMA
Technical Moderator
November 15, 2023

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