cancel
Showing results for 
Search instead for 
Did you mean: 

Tools and software for STM32 (positioning)?

VRavi.1
Associate II

Hi. ST MC Workbench is a PC software which reduces the design effort and time in the STM32 PMSM FOC firmware library configuration. Is there any similar software for positioning?

1 ACCEPTED SOLUTION

Accepted Solutions

Dear RPate.1,

The position control mode is accessible from MC Workbench:

Control Unit> Firmware Drive Management> Drive Setting 

Also I copied below some extract from the release note:

"Using the Position Control feature

The position control feature can be activated on any configuration that uses an Encoder for speed and position feedback. To activate it, open the Drive Settings dialog from the main configuration panel of the workbench, and select the Position Control item from the Control mode combo box. Dual drive configurations are also supported; the position control can then be activated on any motor equipped with an Encoder.

A set of new APIs is provided to exercise the feature. Among these, the most important ones are the following:

  • void MC_ProgramPositionCommandMotor*(float fTargetPosition, float fDuration)
  • to set the mechanical angle the rotor is to reach and the duration of the movement to reach it
  • float MC_GetCurrentPosition1( void )
  • to retrieve the current rotor position
  • float MC_GetTargetPosition1( void )
  • to get the target rotor position
  • float MC_GetMoveDuration1( void )
  • to get the duration of the programmed movement.

The

MC_ProgramPositionCommandMotor*

functions work as the other ramp functions of the API. For a complete description of this API, refer to the reference documentation of the Motor Control SDK.

Note that when the Position Control is activated on a motor, the speed and torque control mode cannot be used.

The Position Control feature uses floating point arithmetic. It may require a lot of CPU power on STM32F0 and STM32G0 devices that do not have an FPU."

We are also preparing a specific application note on this topic.

Thanks and best regards,

Claire

View solution in original post

19 REPLIES 19

https://www.st.com/en/embedded-software/x-cube-gnss1.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I'm talking about the position of the PMSM shaft

Claire O.
ST Employee

Hello VRavi.1,

Did you tried the position control feature available from MCSDK5.4.3?

It may help you,

Best regards,

Claire

I am seeking same feature to Control Accurately angular position. My applications currently running in Speed Control Mode with Encoder configured with MCWB 5.4.1. It works great but Application Demands position control feature.

I have downloaded MCSDK 5.4.3 and reconfigured my project with MCWB 5.4.3. But I am unable to find any thing related to Position Control!! It seems all similar to me. Am I missing something?

Please point me in correct direction to avail such feature. Please provide me any sort of related material that can help me in developing.

Thank You.

Dear RPate.1,

The position control mode is accessible from MC Workbench:

Control Unit> Firmware Drive Management> Drive Setting 

Also I copied below some extract from the release note:

"Using the Position Control feature

The position control feature can be activated on any configuration that uses an Encoder for speed and position feedback. To activate it, open the Drive Settings dialog from the main configuration panel of the workbench, and select the Position Control item from the Control mode combo box. Dual drive configurations are also supported; the position control can then be activated on any motor equipped with an Encoder.

A set of new APIs is provided to exercise the feature. Among these, the most important ones are the following:

  • void MC_ProgramPositionCommandMotor*(float fTargetPosition, float fDuration)
  • to set the mechanical angle the rotor is to reach and the duration of the movement to reach it
  • float MC_GetCurrentPosition1( void )
  • to retrieve the current rotor position
  • float MC_GetTargetPosition1( void )
  • to get the target rotor position
  • float MC_GetMoveDuration1( void )
  • to get the duration of the programmed movement.

The

MC_ProgramPositionCommandMotor*

functions work as the other ramp functions of the API. For a complete description of this API, refer to the reference documentation of the Motor Control SDK.

Note that when the Position Control is activated on a motor, the speed and torque control mode cannot be used.

The Position Control feature uses floating point arithmetic. It may require a lot of CPU power on STM32F0 and STM32G0 devices that do not have an FPU."

We are also preparing a specific application note on this topic.

Thanks and best regards,

Claire

Thank You Very Much ...

I had opened my project in MCWB and rebuild it. But never looked in drop box for third option. Although when I start Monitor in MCWB, In advanced tab, there is not option for Position control. That is may be because one can not use Position Control while using Speed or Torque Controls.

Anyway thanks a lot for this feature. Give me some time to test and explore this feature. I will surely comeback with my queries.

Thanks.

Thanks,

and please do not hesitate to add your comments/ questions/ improvement idea in this forum.

FYI, we plan to improve current motor control toolset this year. The position control option in the monitor will be added then.

Best regards,

Claire

Thanks for the help. I look forward to the announcement and update instructions.

Although I was successful to turn motor in new Position Control mode, It was not up to satisfaction of motion. Reason for that is PID Tuning. New setup needs to be tuned properly for expected result. Since MCWB doesn’t have any user interface to change variables via serial interface, its quit difficult to achieve by hard coding every possible combination. I have to wait till ST updates MCWB for position control but have time limit. Is there any work around to send serial data manually to board as per protocol format and PID Position constants can be updated? Please look if it is possible.

Is there any way by which I will be notified when there is new release of MCSDK and MCWB?

Thank You.