How to use profiled motor in WB project? (saved json is dismissed by WB)
I am now trying to use MCSDK 6.2, as, while getting anything to work at all was much more straightforward in 5.4.8, that one gives me, on code generation, weird java xml parsing errors (from MCSDK-installed XMLs).
In MCSDK5, a profiled motor, once saved, would turn up in the WorkBench as a selectable motor for a new project.
That's not the case in 6.2. So I saw the "import motor" button - but it dismisses the previously saved profiled motor .json file (with Profiler of 6.2) as wrong format.
According to what I can glean from here:
https://wiki.st.com/stm32mcu/wiki/STM32MotorControl:STM32_MC_Motor_Pilot_-_Start-up_guide
This is how it should have worked, except I did not perform a Hall test, as I have no hall sensors.
Apparently not.
The saved .json from the 6.2 Profiler looks like this:
{
"BEmfConstant": 1.4652035236358643,
"compatibility": [
"FOC",
"sixStep"
],
"description": "maxon PMSM motor",
"friction": 6.5,
"hardwareFamily": "MOTOR",
"id": "maxon_with_ihm16m1#2_mcsdk6",
"inertia": 23.98,
"label": "maxon_with_ihm16m1#2_mcsdk6",
"ls": 0.12,
"magneticStructure": {
"type": "SM-PMSM"
},
"maxRatedSpeed": 3624,
"nominalCurrent": 1.4849716424942017,
"nominalDCVoltage": 9.05810546875,
"polePairs": 8,
"rs": 0.8064583539962769
}
Btw, my motor is also not listed in the selection of stock motors after restarting WB.
So, how am I supposed to use a motor profile in a WB project?
Side note: I find it odd that I'm supposed to generate a project, where I have to select _some_ motor, to make myself a firmware to do first profiling (that's then going to differ from the selected _wrong_ motor anyway).
I ended up searching and finding the .hex files for the different driver board / Nucleo board combinations as they were (then, automatically) used in MCSDK 5.x, and flashed that (correct board combo .hex from 6.2 installation) manually with CubeProgrammer - so I was able to profile without this oddity. I assume this has no bearing on the problem here, which seems to be about file formats.
