You are here

Requesting fault codes over UART

2 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
Requesting fault codes over UART

I'm currently using the UART continuously to show me my speed, battery remaining, amps drawn...  I do this via bluetooth and display it on an LCD display on my remote.  I also log the values that are returned from a COMM_GET_VALUES command.  My question is this... How can I capture fault codes?  I see there's an "mc_fault_code fault_code;" in the mc_values struct.  Does that mean it will return the most recent fault code?  What if there are multiple faults?  Do I have to clear a fault in order to see the next one in the list?

Thanks very much for any tips.

Pimousse
Offline
Last seen: 10 months 5 hours ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

The fault included in the COMM_GET_VALUES is the current fault if one.

If no fault, it sends 0 (zero).

You have to play with COMM_TERMINAL_CMD and decode the output for retrieving past faults.