From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

long time to go through Robot Main loop

I'm helping a team and they're getting a really strange error. Robot Main seems to be taking a Very long time to exectue. We put some code in to time how long it takes from loop iteration to loop iteration and the number was coming out in seconds.

We then went to a simple joystick example (From the example finder) and ran that and the lag was in the seconds for the joystick to respond (so we don't think it's the actual code).

There is the possibilty there was some damage to the cRio ethernet port (1) could that be causing the lag?

I pinged the cRio and all times were the < 1ms.

Since we eleminated the Robot main code and used default example code, could the problem be in the hardware? Is there a selftest we can run to check it out? What can be done?

Thank you

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 1 of 5
(5,698 Views)

Have you tried running or building your code or some example code on another computer to see if the problem is specific to the way that one computer is building it?

Also, was this problem always there or did it start suddenly? I would recommend re-imaging the cRIO as well.

Tanya V

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 2 of 5
(3,010 Views)

We re-imaged the cRio to v28 (I beleive was the version). The example program we ran had been build and run on a different computer and different cRio.

I'm pretty sure it's been happening that way all along, since they started trying to use the cRio and the mecanum drive. I'm not familiar with the mecaum drive and that's why we tried a stock example of a joystick, nice, easy, benign.

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 3 of 5
(3,010 Views)

Hello LockheedJoe,

Does the driver station report an error in the diagnostics window referring to the RT loop execution rate? Or, you are simply seeing overall lag in system response? Are any errors reported in the diagnostics window? Does the lag exist when the system in tethered with a e-net cable? Or, during wireless operation?

Sorry for the barrage of questions. I appreciate your follow up, and any additional information you may provide.

Cheers,

Pat C.

Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

0 Kudos
Message 4 of 5
(3,010 Views)

The driver station was reporting watchdog not fed and something about slow execution in the Robot main (I forget the exact words) in the diagnostics window.

We were tethered during all of our testing (It's the first variable we took out).

I don't mind questions, you're just trying to get to the root of the problem.

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 5 of 5
(3,010 Views)