You are here

Understanding FOC Wizard Innerworkings

3 posts / 0 new
Last post
gravity99
Offline
Last seen: 1 year 6 months ago
Joined: 2022-08-18 21:47
Posts: 2
Understanding FOC Wizard Innerworkings

While setting up 2 motors via serial + can forwarding I noticed that during the last stage of Setup Motors Foc's Run Detection the motors seem to turn very smoothly and slowly. I have tried to replicate this via RPM, Duty, Current and Pos control and have been unable to do so. Looking through the code I similarly failed to find what commands this magical wizard uses. Furthermore I have modified the code to print all commands sent to serial via vescinterface.cpp and nothing is sent during these movements. If anyone knows what commands the wizard actually runs or how it runs them it would be extremely helpful for my project. I'd be happy to provide more info if needed.

Thanks in Advance!

notahorse
Offline
Last seen: 4 months 5 days ago
VESC Free
Joined: 2021-05-19 06:06
Posts: 7

Hello, I'm going to be honest, I do not understand your question. Please elaborate on what you mean by replicating the motor detection phase? Replicate it on what?

gravity99
Offline
Last seen: 1 year 6 months ago
Joined: 2022-08-18 21:47
Posts: 2

For simplicity sake lets say I want to replicate the motor movements done during the motor detection phase so I can program the motors to makes those movements whenever I want. I can not find the code in the vesc_tool nor the serial commands that describe these movements. So my question is what are the commands that run during motor detection that cause the motors to spin?