I'm building a project where I use an Arduino to control a single HAL-sensored outrunner motor through a VESC. The interface program I wrote sends a number of 'moves' to my device, which are then supposed to be executed one by one.
These 'moves' consist of a start-time, end-time, up-ramp-time, a down-ramp-time, a top speed in RPM, and a final tachometer position (the destination). Additionally, my program is aware of the minimum RPM I need to send to make the motor move. I also have access to current tachometer position and current RPM.
While the interface with the VESC is going well, as it dutifully runs at the RPM I tell it to run at. I'm having a lot of trouble writing a function that ends the movements at (or really close to) the destination tacho.
Is there a standard function I can find for this or does anyone have an idea about how to approach this?
I think you are looking for position mode with velocity control
I personally tested this https://github.com/raess1/vesc-FW version of position with velocity and it kinda works
but it still don't have the ramp up ramp down implementation