Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   robot drive isn't running fast enough... (http://www.chiefdelphi.com/forums/showthread.php?t=102376)

JP Carlin 09-02-2012 15:26

robot drive isn't running fast enough...
 
we are getting an error that "the loop that contains robotdrive is not running fast enough." we program in labview and this error even occured when we made a fresh project with only the drive code we still get this error. could it be the two year old jaguars we are using?? plz help

Tom Line 09-02-2012 16:02

Re: robot drive isn't running fast enough...
 
The error messages you are seeing are not related to the actual 'speed' of your drive. They refer to how often new data is sent to the motor controllers.

This can be the result of running the robot on a congested network, clicking the run button rather than permanently deploying the code, or having time consuming loops in your teleop.

If you are developing on your driverstation computer, it can be a result of having 2 accounts running at the same time (driver station and developer), or having too many programs open.

Pirate programe 16-02-2012 19:20

Re: robot drive isn't running fast enough...
 
1 Attachment(s)
Quote:

Originally Posted by Tom Line (Post 1123211)
This can be the result of running the robot on a congested network, clicking the run button rather than permanently deploying the code, or having time consuming loops in your teleop.

Loops? We don't have any loops in our teleop code, just case structures and select functions. But we still seem to be getting this error. Do case structures actually have the same overhead as a For/While loop, or what?

Greg McKaskle 16-02-2012 21:05

Re: robot drive isn't running fast enough...
 
Neither case structures nor the loop have much overhead. But if you add code that delays teleop you will see this. If this happens using a loop, it isn't actually the loop that is the problem.

In this case, the issue is that the Mecanum is only called when button 1 is pressed. I can't see the code in the other case, but assume it is not calling the Mecanum Update. If you call teleop but it doesn't call Update for 100ms, that will still result in the safety mechanism halting the motors.

Greg McKaskle

CRLS97 16-02-2012 21:42

Re: robot drive isn't running fast enough...
 
Quote:

Originally Posted by Greg McKaskle (Post 1128411)
Neither case structures nor the loop have much overhead. But if you add code that delays teleop you will see this. If this happens using a loop, it isn't actually the loop that is the problem.

In this case, the issue is that the Mecanum is only called when button 1 is pressed. I can't see the code in the other case, but assume it is not calling the Mecanum Update. If you call teleop but it doesn't call Update for 100ms, that will still result in the safety mechanism halting the motors.

Greg McKaskle

Quick question when you say it doesn't update the Mecanum (for the code above)- just to clarify, you mean it has to update it in any way possible and it won't matter if in one case statement I have Arcade Drive and another Tank Drive? but they're still coming from the same Drive Ref.? As long as the Drive Ref gets some sort of update within every 100ms it's good, correct?

Pirate programe 17-02-2012 15:23

Re: robot drive isn't running fast enough...
 
Quote:

Originally Posted by CRLS97 (Post 1128427)
As long as the Drive Ref gets some sort of update within every 100ms it's good, correct?

I don't see any reason why that wouldn't be true, but keep in mind that updating the same drive train with two different VIs could possibly cause conflicts.

Greg McKaskle 17-02-2012 20:40

Re: robot drive isn't running fast enough...
 
I'm pretty sure that is correct. The various drive options just do a bit of math and update the motor group. The RobotDrive refnum returned from the Open is the thing that has the timer associated with it. So, update the drive every 100ms or turn off the safety feature or you will receive a message and the robot motors will be zeroed in the timeout case.

Greg McKakle


All times are GMT -5. The time now is 00:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi