Get fault code over CAN

Support for creating custom user applications on the VESC.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
h.ehlers
Posts: 2
Joined: 12 Apr 2017, 07:49
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Get fault code over CAN

Postby h.ehlers » 12 Apr 2017, 08:14

Hello,
First of all, thank you benjamin for this great open source project. It helps me a lot for my graduation work. I'm a student of mechanical engineering, so forgive my poor skills in c...
I've got two VESC's for controlling two direct driven wheels. One of them is running my custom application which reads the two external ADCs and calculates setpoints for PID-speedcontrol of both VESCs. Then it sets the setpoint for itself by using the "mc_interface_set_pid_speed()" and the other via CAN by using "comm_can_set_rpm()". The second VESC isn't running a any application, and is only controlled by CAN. That's running well ...
So far so good, now I want to catch errors. For the VESC thats running the application, I would use something like "if(mc_interface_get_fault()== FAULT_CODE_NONE)", but I've got no Idea how to get the fault code of the other VESC.
Maybe someone can give me an example how to "ask" the other VESC for it's fault code and to receive the fault code to use it in my application.

Looking forward to your answers, thank you!

h.ehlers
Posts: 2
Joined: 12 Apr 2017, 07:49
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Get fault code over CAN

Postby h.ehlers » 13 Apr 2017, 07:33



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Custom Applications”

Who is online

Users browsing this forum: No registered users and 2 guests