You are here

re-scaling CAN setDUTY CYCLE to -1 to 1 instead of 0 to 1

2 posts / 0 new
Last post
a.dahhak
Offline
Last seen: 6 days 2 hours ago
VESC Free
Joined: 2020-02-27 12:04
Posts: 17
re-scaling CAN setDUTY CYCLE to -1 to 1 instead of 0 to 1

Hi everyone,

I just started using Vesc tool few days ago, and I would like to drive the motor in both senses with same duty cycle CAN frame, so for a 0 payload frame I would like a "-1" duty cycle.

I tried to re-load a custom firmware after modifing the code line in "comm_can":

buffer_append_int32(buffer, (int32_t)(duty * 100000.0), &send_index);

by:   buffer_append_int32(buffer, (int32_t)((duty+1) * 50000.0), &send_index); 

After loading the firmware, I get a message mentioning that I need to update my vesc tool version because the used firmware is newer than it (which is not the case because I downloaded the latest version from website), so I couldn't do motor identification, and the modifications of the function implemented do not seem to be taken into account.

If someone could clarify me a bit on the problem, I would be very grateful.

Thank you :)

(I have a hardware version 60 and I did also defined it on conf_general.h "#define HW_VERSION_60")

 

a.dahhak
Offline
Last seen: 6 days 2 hours ago
VESC Free
Joined: 2020-02-27 12:04
Posts: 17

I just downloaded the new VESC Tool version 2.03 and I don't have the limited interface problem with my custom firmware anymore.

But still can not see my modifications applied to the motor when controlling :( 

Any suggestions please?

Abdelilah