2024-02-06 07:07 AM
I need help with the code generated by the workbench.
I am using the STEVAL-CTM01xV1 shunt code with the STEVAL-CTMo11V1A development board and the STLINK/V3 with the isolator adapter.
Following the instructions that appear in the comments of mc_api.c, I added the three routines before the main while:
MC_ProgramSpeedRampMotor1(1000,250);
MC_ProgramTorqueRampMotor1(935,200);
MC_SetCurrentReferenceMotor1();
In the last routine, it is not clear what the parameters, units, etc. are like.
Documentation is missing or at least I can't find it, I need more information to be able to continue with the development.
2024-02-12 08:49 AM
Hello,
You can find implementation details on mc_api.c MC_ProgramTorqueRampMotor1 function header that mention that this function sets Iq current value.
Using MC_SetCurrentReferenceMotor1 function, you have to set a "qd_t Iqdref" parameter that represents Iq and Id.