2015-10-14 02:54 PM
Hi,
I am running the STM32 PMSM FOC LIBv4.2, using encoder and I am trying to visualize the variables values through the STM Studio.The variable names used here are the default used in the
STM32 PMSM FOC LIBv4.2
I didn't have problems to visualize current values and speed reference like: MCIpool[0].Vars_str.hFinalSpeed and FOCVars[0].Iqdref.qI_Component1. I haven't found the variable that represents the current rotor speed value. I thought that would be MCTpool[0].Vars_str.MCTuningInitStruct.oSpeedSensorMain, but this variable does not change its value when the speed is changed. It Doesn't matter the value of the rotor speed shown by the ST Motor Control Workbench (That changes correctly when I change the speed reference), the MCTpool[0].Vars_str.MCTuningInitStruct.oSpeedSensorMain keeps its value in 536872924.My question is: Is the variable MCTpool[0].Vars_str.MCTuningInitStruct.oSpeedSensorMain the one that shows the current rotor speed?Regards. #stm32-pmsm-foc-set-speed-in-rpm #pmsm #foc-4.2 #stm-studio2015-10-19 10:11 AM
It worked,
speed = (int32_t)(MCI_GetAvrgMecSpeed01Hz(oMCI[0]) * 6); // speed in rpm
thanks.
2021-06-27 08:59 PM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards