You are here

Can I change control mode on the fly through the UART port?

3 posts / 0 new
Last post
spork
spork's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2018-11-26 06:55
Posts: 29
Can I change control mode on the fly through the UART port?

I'm running two VESC's with two motors in regular PPM mode (current, no_reverse, with braking).  I currently send PPM to the PPM port from a standard receiver.  I am however logging data from the UART port while I ride.  What I'm wondering is whether I can change my mode via the UART port from PPM_CTRL_TYPE_CURRENT_NOREV_BRAKE to PPM_CTRL_TYPE_CURRENT so that I can manually engage reverse from my controller.  Is this possible while controlling it via the PPM port?  If not, can I do it by doing all control through the UART port?

 

Thanks very much for any tips.

benjamin
Offline
Last seen: 3 days 1 hour ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

That is possible, but the motor will stop for a second or so when you update the configuration. Best is to skip PPM entirely, and use UART only. You can use COMM_SET_CHUCK_DATA (which should be renamed btw). It will reach all VESCs on the CAN-bus, and also enable traction control if configured.

spork
spork's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2018-11-26 06:55
Posts: 29

Thanks.  That sounds great!  The idea of using only UART sounds interesting.