Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ESC faults via CAN #740

Open
drewskoots opened this issue Jul 2, 2024 · 3 comments
Open

Get ESC faults via CAN #740

drewskoots opened this issue Jul 2, 2024 · 3 comments

Comments

@drewskoots
Copy link

Is there a way to get faults from an ESC via the CAN network? It seems that VESC tool is able to do so, but in the VESC CAN documentation, it isn't documented anywhere.

@DovPearX
Copy link

DovPearX commented Jul 8, 2024

You can send a command via CAN to download data and the entire structure along with error codes will be there. Exactly the same way as in the vesc uart libraries.

@manmountain
Copy link

What can command to use for requesting fault codes? I cant find anything like that from datypes.h CAN_PACKET_ID enum

@DovPearX
Copy link

DovPearX commented Jul 15, 2024

When using CAN, fill the receive buffer with the COMM_GET_VALUES command. Of course, you also need to make sure that the device you are sending from can receive the data in the commands.c file.

void comm_can_get_values(uint8_t controller_id) {

    int32_t send_index = 0;

    uint8_t buffer[4];

    buffer[send_index++] = COMM_GET_VALUES;

    comm_can_send_buffer(controller_id, buffer, send_index, 3);

}

It returns the mc_values structure which contains fault code. 133-164 and 1308-1332 line in datatypes.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants