FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

CPU jumps to 100% at start of match

Team 222 has a nagging problem:

At the start of some matches our CPU % goes to 100% and prevents the team from controlling the robot. The problem seems to be more frequent when there is a field delay or reset and is consistent with 2 connections without rebooting. We have been unable to determine what code or condition is triggering the CPU usage. Help is appreciated!

Download All
0 Kudos
Message 1 of 3
(4,611 Views)

First place to look is at any code that runs in a loop.  Check your while loops and try some wait timers in them. 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 2 of 3
(3,328 Views)

I agree with pallen, try placing wait timers in your loops so they do not iterate at full speed. Also make sure there are no while loops in your teleop VIs. Since this VI executes repeatedly to communicate with the driver station, there is no need for while loops. If all else fails, you can try using the "diagram disable structure" found in the programming >> structures palette to comment out sections of code and identify the portions that use excessive CPU power.

0 Kudos
Message 3 of 3
(3,328 Views)