View Single Post
  #2   Spotlight this post!  
Unread 29-12-2012, 03:47
Fifthparallel Fifthparallel is offline
Registered User
AKA: Sam Chen
FRC #1410
 
Join Date: Dec 2012
Rookie Year: 2011
Location: Denver, CO
Posts: 65
Fifthparallel is an unknown quantity at this point
Re: Beta test teams: Has base processor utilization decreased?

Just out of curiosity -- were you reading the analog channel during any set time intervals? I had a problem like this while working on a videogame in C# where I would get the states of around 500 sprites individually in the main game loop and would starve the game's resources.

Labview specific, however, we always read information from the Digital Sidecar (and assorted sensors) in the 100ms or 10ms timed loops, which you can find in the Timed Tasks vi in Robot_Main.vi outside of the case statement which contains all of the various robot states and just 'under' Begin.vi.

A quick solution/troubleshoot (since I don't have our code handy) is to:

1. Make sure you aren't recursively getting values from that sensor inside of an indefinite while loop (keeping in mind that the case statement for the robot state is itself in a while loop, and Labview is a dataflow language).

2. Read the value in one of the Timed Task vi's (vi that contains 2 loops that run every X ms, typically 100 or 10), store it in a Global variable (grr, scope), then use that variable in whatever you need to do (i.e. have it output to the Dashboard in Teleop)

3. While LV can be rather heavy at times, just running the base Joystick+Arcade drive 2012 Robot Project had me hovering at around 30-60% processor utilization on an 8-Slot cRio. Given the parity that WPIlib has, I wouldn't expect much else from C++ or Java deploys.

4. See if there's anything extraneous running, look in your error messages (inside the Diagnostics tab of the Driver Station) for things about Robot Main running slow, and if it says anything about not finding a camera. Chances are, it's throwing so many errors (and tying up resources) because of the camera code that is part of the default project. Try removing it, see if that helps?
__________________
sudo chmod u+x helloworld.sh
gotta start somewhere.

Last edited by Fifthparallel : 29-12-2012 at 17:54. Reason: misinformation