Bug(?) with sending BLDC-Tool and UART commands simultaneously?

General topics and discussions about the VESC and its development.
[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
Jackl
Posts: 10
Joined: 12 Mar 2017, 22:23
[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

Bug(?) with sending BLDC-Tool and UART commands simultaneously?

Postby Jackl » 26 Jun 2017, 08:14

Hi all!

I think I just encountered a Bug/non-documented-/strange behaviour of the VESC.

I have a VESC connected to an STM32 MCU that sends torque (==motor current) commands via UART to my VESC. Refresh rate is around 100Hz.
If the vehicle is "disabled" by a switch on my MCU, the STM32 sends 0Nm (==0A) commands to the VESC.

Now if I am trying to do some new settings for the VESC in BLDC tool everything works fine. But if I try to move the motor by the arrow keys for example, I get really strange motor behaviour. The motor does not actually spin but just stutters a few degrees. Sounds really nasty :shock:
As soon, as I disconnect the UART, manual control via BLDC-Tool works fine again.

I suppose it is due to two different commands (UART and BLDC-Tool) hit the VESC and give 0A and xA in fast alternating order? As far as I remember, BLDC-Tool also uses UART?

Can anyone confirm this behaviour?
Wouldnt it be a good idea, to implement some kind of override in BLDC-Tool against all other commands?

Cheers!

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[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: Bug(?) with sending BLDC-Tool and UART commands simultaneously?

Postby rew » 26 Jun 2017, 08:55

The VESC accepts "commands" from several different sources. If your UART keeps sending "and now stop" commands, then that's what the VESC will do. If you want to be able to override this in BLDC_TOOL, you can disable the UART app in BLDC_TOOL. Or you can modify your application: "if (last_command != 0 OR this_command != 0) send_command_to_vesc ();" this will skip sending the repeated "shutdown" commands to the VESC, allowing you to easily override the other source-of-commands when it is idle.

Jackl
Posts: 10
Joined: 12 Mar 2017, 22:23
[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: Bug(?) with sending BLDC-Tool and UART commands simultaneously?

Postby Jackl » 26 Jun 2017, 17:18


rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[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: Bug(?) with sending BLDC-Tool and UART commands simultaneously?

Postby rew » 26 Jun 2017, 18:59


Jackl
Posts: 10
Joined: 12 Mar 2017, 22:23
[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: Bug(?) with sending BLDC-Tool and UART commands simultaneously?

Postby Jackl » 27 Jun 2017, 07:36



[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 “General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest