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!

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.

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?

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.

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.

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.

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

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!

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.