Can not get CAN Communication to work!

General topics and discussions about the VESC and its development.
Posts: 10
Joined: 12 Mar 2017, 22:23

Can not get CAN Communication to work!

Postby Jackl » 31 Jul 2017, 14:44

Hi Everyone!

I have two VESC connected to an Arduino DUE via CAN.
Reading the status messages of the two VESC (different controller IDs) at 10 Hz is no problem, everything seems fine.

I do however have some trouble sending CAN Commands to the vesc. Documentation on this seems to be quite limited online. Also I am not really knowing how to do it from the code in comm_can.c:

Heres what I know:
- I need to send the Message to 0x901 for Controller ID 1
- first byte should be a 01 for Current Control (0 for dutycycle, 2 for brake current, and so on)
- following bytes should be the "payload" eg. current in A*1000?

Tried it, doesn't work!
Does anyone have a "template" for the can message?

Also one more thing about the status message: Am I right about the following:
first 4 Bytes: RPM
next 2 Bytes: Current
last 2 bytes: Duty Cycle

Any Help is highly appreciated!

Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests