cancel
Showing results for 
Search instead for 
Did you mean: 

How to stay in speed control mode

JELLY.1
Associate II

Greetings Tech Gurus,

I have a Nucleo STM32G431 driving an IHM16M1.

Code is Generated by MC Workbench 5.4.8

I am using serial communication for control from my application.

I want to operate in variable speed mode.

I also want to be able to adjust current limit.

Everything works fine until I send a Set current references frame command.

It seems like it switches to torque control mode and accelerates to max rpm.

If I send an Execute ramp frame after that, it switches back to speed mode and

resumes running at speed set in the Execute ramp frame.

Is it supposed to switch to torque mode?

Is there any way to prevent it from doing so?

Thank you,

-Jim

3 REPLIES 3
GMA
ST Employee

Hello,

According to User manual UM2392, on "Motor control API" chapter "Which control mode is active depends on the last programmed reference", then using a current reference API, "torque mode" is selected.

You can handle the current limit via the "Over Current Protection" box on Motor Control WorkBench.

Best regards.

GMA

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

Greetings GMA,

Thank you for your response.

I'm using the serial UI motor control protocol defined in user manual UM1052 to control the motor from my application. My question would be, is there a way to change the current limit in speed control mode thru the serial UI during run time?

Thank you,

-Jim

GMA
ST Employee

Hello,

From my point of view, there is no easy way to handle it in a dynamic way.

To sum up, MC_SetCurrentReferenceMotor1 sets the used current, and then torque mode is used.

If you want to limit the current on acceleration phase for example, you can use a lower value of "nominal current" on motor definitions side or use a longer acceleration period.

Hope that it helps...

Best regards.

GMA

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