2024-10-21 08:49 AM
How do I convert the value I get from MC_GetMecSpeedReferenceMotor1() into RPM, similar to how the Motor Pilot reports speed in RPM.
int16_t motorSpeed = MC_GetMecSpeedReferenceMotor1();
2024-10-22 12:46 AM
Hello MMoha.10,
To get your speed in rpm, you can use the MC_GetMecSpeedReferenceMotor1_F() API instead of MC_GetMecSpeedReferenceMotor1().
Generally speaking, you can find the way speed is defined in mc_stm_types.h or in the "Measurement Units used by the firmware" chapter of the MCSDK User Manual : Via WorkBench, you can find it by clicking on About -> Documentations -> Documentation -> in the newly open browser window, click on User Manual.