Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Robot Drive running too slow???? (http://www.chiefdelphi.com/forums/showthread.php?t=101598)

ehlochbr 31-01-2012 00:37

Robot Drive running too slow????
 
Hi,

We've been consistently getting an error that says the loop that contains robot drive is running too slow and it talks about a possible WHILE loop causing the delay.

I've looked everywhere and can't find anything wrong. At first, I thought I could ignore this but it's starting to cause lag with our robot.

I've been getting this error ever since we re-imaged the crio with the 2012 image. I recently started a new project file and was getting this error after I first deployed it so I know it's not something I added.

Has anyone seen this error and figured out what to do about it. Thanks for your help!

Keyreaper 31-01-2012 01:16

Re: Robot Drive running too slow????
 
I've had similar problems with our cRIO a few updates back. Does the diagnostics page on your Driverstation give you the location of where it might possibly be? Or perhaps where resources are being taken up?

Also I'd try removing anything that isn't required, such as the vision processing.vi and camera functions located though out code.

ehlochbr 31-01-2012 01:37

Re: Robot Drive running too slow????
 
No, the error message is very vague. It doesn't specify what vi the problem might be in (which is weird considering all the other errors I've seen do).

I can't take out the vision code because we're going to use it this year. That's why I need to get this problem resolved, so this recurring error doesn't slow down our robot anymore than the vision code already does.

How did you make this problem go away?

Keyreaper 31-01-2012 01:41

Re: Robot Drive running too slow????
 
It was fixed when I had updated all my software of LabView, Driverstation, and cRIO to the latest updates. Although I'm certain back when those updates weren't available, they were still updated to the most recent at the time.

You could attempt disabling the periodic tasks.vi temporarily to see if that accomplishes anything. I know that can eat up a lot of CPU power for the cRIO slowing it down as it has two while loops inside of there, one of which involves the robot drive.

Greg McKaskle 31-01-2012 07:50

Re: Robot Drive running too slow????
 
If you are processing vision, that is likely to be a part of the problem. The vision will use a pretty good amount of CPU for the time it takes to process the image. Higher priority tasks will take cuts, but some tasks could get starved out while that proceeds.

In the game, wen you aren't using the info from the camera, perhaps you should toggle the enable off or slow the frame rate. Also, the loops in periodic do not have to use much CPU. It depends on what is placed in them or how often they are asked to run. Loops that run numerous times with no delay in them are truly what eats the CPU.

Greg McKaskle

Keyreaper 31-01-2012 08:05

Re: Robot Drive running too slow????
 
Quote:

Originally Posted by Greg McKaskle (Post 1116979)
If you are processing vision, that is likely to be a part of the problem. The vision will use a pretty good amount of CPU for the time it takes to process the image. Higher priority tasks will take cuts, but some tasks could get starved out while that proceeds.

In the game, wen you aren't using the info from the camera, perhaps you should toggle the enable off or slow the frame rate. Also, the loops in periodic do not have to use much CPU. It depends on what is placed in them or how often they are asked to run. Loops that run numerous times with no delay in them are truly what eats the CPU.

Greg McKaskle

Ah pardon my mistaken then.

ehlochbr 31-01-2012 09:29

Re: Robot Drive running too slow????
 
Thanks for the replies. I'll look into trimming down the vision code, but please consider this. Yesterday, I edited the code to take all the vision code away and ran a test. The performance was better but we were still getting the error.

So I get this error regardless of if there is vision code or not. I can't figure out where it's coming from.

Greg McKaskle 31-01-2012 11:32

Re: Robot Drive running too slow????
 
To help locate where this is, in Begin, you are probably opening a single RobotDrive with some numbers of motors. You are probably saving that in the registry with a name. You may want to hit Ctl-F and locate all of the places where you are updating the named RobotDrive. One of those locations is sometimes taking more than 100ms between updates -- the default timeout for the Safety watchdog. If you cannot determine which ones, post some images of ones you are unsure of. There are typically not that any updates to RobotDrive.

Greg McKaskle

ehlochbr 31-01-2012 12:38

Re: Robot Drive running too slow????
 
Ok. I'll be working on it tonight so I'll try to grab some images and post them. Thanks so much for the input!

ehlochbr 01-02-2012 11:58

Re: Robot Drive running too slow????
 
Apologies but I did not get the chance to work on this issue last night like I said. I got side tracked trying to fix another issue. No update yet.


All times are GMT -5. The time now is 11:38.

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