2024-07-23 07:04 AM
[VERSION]: MCSDK 6.2.1, 6.3.0 (CubeMX 6.11.0, STM32G4 FW V1.5.1)
[TOOL]: Motor control WorkBench
[DETAILS]: When creating a project that has the Hall sensor of a motor selected as the main sensor and also the Open Loop debug feature enabled, the resulting project can't be built due to missing defines and variables.
[EXPECTED BEHAVIOR]: I expect the tool to create buildable and working code.
[HOW TO REPRODUCE]: Create a configuration like mentioned under DETAILS. I renamed and attached a MCWB configuration made with preset hardware (I-PMSM 24V motor, B-G431B-ESC1 inverter).
Generate code from project.
When importing the project in CubeIDE and trying to build it, following Errors pop up:
- undeclared defines OPEN_LOOP_VOLTAGE_d, OPEN_LOOP_VF, OPEN_LOOP_OFF, OPEN_LOOP_K for the OpenLoop_ParamsM1 typedef in mc_config.c
- 'VirtualSpeedSensorM1' undeclared, used in various places in mc_tasks.c
Solved! Go to Solution.
2024-07-23 09:07 AM
Hello @DMeie.2,
Thank you for your problem report.
Open loop is considered as a debug mode dedicated to Sensor less algorithm, then it is only available with "Speed Sensor Mode" set to "Observer + PLL" or "Observer + Cordic".
"Speed Sensor Mode" set to Hall sensor with OPENLOOP mode, as in your case, is not supported.
A ticket in open on our side and in the meantime, please select one of sensor less setting.
2024-07-23 09:07 AM
Hello @DMeie.2,
Thank you for your problem report.
Open loop is considered as a debug mode dedicated to Sensor less algorithm, then it is only available with "Speed Sensor Mode" set to "Observer + PLL" or "Observer + Cordic".
"Speed Sensor Mode" set to Hall sensor with OPENLOOP mode, as in your case, is not supported.
A ticket in open on our side and in the meantime, please select one of sensor less setting.
2024-07-24 12:47 AM
Thanks for the feedback.
I'll remove the offending Open loop code from my project.
A recommendation: Usability of the motor library would be greatly improved if features like that, or configurations like main/aux sensor would be handled with defines or other software switches instead of relying on a code generation tool that might stop working at any point in time, or, like in my case, when changes to the codebase are made beyond a certain point.