Latency of Vint and Motor Controllers

Comments & issues
Post Reply
Tom
Fresh meat
Posts: 1
Joined: Mon May 31, 2021 11:11 pm
Contact:

Latency of Vint and Motor Controllers

Post by Tom »

Hello,

I am a mechatronics engineer building a differential drive robotic platform. I have built my own motor drive system for the robot using a Stm32 but was looking at changing to the 4a Dc motor controller to drive the motors. We are looking at using other Phidgets in the robot so integrating everything into the Phidget ecosystem made sense.

Initial testing looked good but there was some response issues when trying to control the robot. I put together a quick test using c# on windows where it measures the time it takes from starting a move (BeginSetTargetPosition()) to seeing the position change. The results were in the 100ms - 300ms range.

In my own system using usb coms the latency with the same test was less then 5ms.

The latency is an issue because it uses external sensors to find its real world position and the motors speed needs to be updated to keep the rover on track.

Is there anyway to speed up this response time?

I haven't isolated exactly where in the system the delays are coming from but I thought I would ask here to see if there was anything obvious before digging in with more testing or going back to my own drive.
jdecoux
Labview Developer
Posts: 161
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: Latency of Vint and Motor Controllers

Post by jdecoux »

It looks like your are using asynchronous function calls (BeginSetTargetPosition), which will queue up if you are calling them faster than they can be dealt with.

Simple solutions could be to either use synchronous calls (myMotor.TargetPosition = x), or ensure you are limiting asynchronous calls to what the system can handle.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 26 guests