Timeouts on serial line when moving two motors at once

General discussion of using Roboclaw motor controllers
Post Reply
cengh
Posts: 7
Joined: Tue Jun 13, 2017 11:17 am
Timeouts on serial line when moving two motors at once

Post by cengh »

We're using the 2x7a (firmware version 4.1.24) to drive two motors. We noticed when sending a command to move both motors at the same time in a somewhat aggressive motion we get timeouts on commands that come immediately afterward. Usually there will be a command that times out followed by a few commands that just take a long time (30 - 100ms). Our app requires us to read the encoders' position as fast as possible and this causes delays of up to 300ms after the motion before we can get an encoder reading.

This doesn't happen when we move one motor at a time or when we move both motors very slowly.

We have reproduced this on Windows 10 and on a Raspberry Pi running Raspbian, using both the Roboclaw's micro USB port as well as its TTL serial to USB. The code we're using is based on the latest version of your C# library.

We've suspected possible brownouts but we haven't been able to find any hardware voltage drops on the RC board itself or on the power rails. If you have suggestions of what traces can be probed we can probe them and post an update. We can also supply some sample code that reproduces the problem.
cengh
Posts: 7
Joined: Tue Jun 13, 2017 11:17 am
Re: Timeouts on serial line when moving two motors at once

Post by cengh »

A few more details. We're using 12-volt, 1-amp motors. We tried using a separate logic power supply and it didn't change the outcome.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Timeouts on serial line when moving two motors at once

Post by Basicmicro Support »

I'll need to see your code. Please email it to support@ionmc.com. Try to make the simplest example that reproduces the problem so I can run tests on it.

Post Reply