Skip to main content
DMeie.2
Associate III
January 29, 2024
Solved

Preserve CubeMX user pins when changing MC Workbench settings

  • January 29, 2024
  • 2 replies
  • 1615 views

My current workflow is as follows:

I use the MC Workbench to create a base IOC file for our custom board, then use the CubeMX to add our own pins, periphery etc.

Now when I need to change some motor-related settings and regenerate the project in the MC Workbench, all my pins are gone in CubeMX and I have to redo everything again.

 

How do I preserve all the user pins, periphery settings etc in this case?

Best answer by cedric H

Hello @DMeie.2,

The IOC generated by the MC Workbench can be also loaded by the Workbench.

When you open your IOC with the workbench, the Workbench UI guarantees that only the motor algorithm can be changed. 

It is important to understand that at this stage, you cannot change anymore the topology (3-shunt /1 shunt). All the hardware parameters are frozen.

This feature has been developed exactly to fulfill the flow you described.

Regards

Cedric

 

2 replies

cedric H
cedric HBest answer
Technical Moderator
January 29, 2024

Hello @DMeie.2,

The IOC generated by the MC Workbench can be also loaded by the Workbench.

When you open your IOC with the workbench, the Workbench UI guarantees that only the motor algorithm can be changed. 

It is important to understand that at this stage, you cannot change anymore the topology (3-shunt /1 shunt). All the hardware parameters are frozen.

This feature has been developed exactly to fulfill the flow you described.

Regards

Cedric

 

Associate III
January 3, 2025

Will the "UPDATE" functionality return to the MC Workbench? 
Previous versions <6.x had this option to perform an UPDATE and not overwrite the complete .ioc file. 

DMeie.2
DMeie.2Author
Associate III
January 29, 2024

Oh, I was not aware I can, or actually have to, load the IOC file.
Thanks, I'll give this a try and report back when there's issues.

A quick follow-up question related to this:
What if I need to change the motor mid-project (maybe to add one with HALL sensors), is it sufficient to load the IOC file as well or do I need the STWB6 file for this?

cedric H
Technical Moderator
January 29, 2024

Well...

If your initial project does not select the Hall sensors as main sensor or auxiliary sensor, then the timer connected to your hall sensors will not be configured in the initial IOC generated by the WB. When you load it back, as only the algo parameters can be changed, there is no way to enable it afterward. Now, if you start by a Hall sensor project, you should be able to disable it afterward. Your timer will still be configured by your initial IOC, but the generated code will not make use of it. So, this way it is doable. Please note that this is not the primary intend of this feature, and you are touching an area that cannot be extensively covered by our test suite... 

Hope it is clear.

Regards

Cedric