View Single Post
  #2   Spotlight this post!  
Unread 02-03-2011, 21:24
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Labview code overwhelming cRIO

You should design your code to probably use no greater than 80% of the available cRIO CPU.
That leaves a little room for future code modifications and we really shouldn't be pushing the maximum. Operating systems need some space too, to be efficent.

We noticed our cRIO CPU utilization getting up towards 100% too and purposely drove it back down to around 55%. It takes a little attention and sometimes measurements of individual loops.

We designed our code to hit the motors and other actuators only when they need changing, and choose to disable the Safety VIs to eliminate those unnecessary repetitive actions.

Another common issue I've seen is unrestricted loops.
By now most of us know that loops, especially infinite ones, need to be throttled down a bit by a Wait vi just to allow other parallel tasks time to run.
What many don't realize is that the Wait should be as long as practical. I've seen quite a few dutiful Waits that in use actually take less time than the execution of complicated code inside the loop itself. What that means is the loop is really unconstrained and will proceed to suck the life out of your cRIO.

Any errors displayed on the Diagnostics tab should be quickly dealt with as well.
Error processing drastically consumes available CPU and slows our programs.
Eliminate any and all errors as soon as possible.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-03-2011 at 22:19.
Reply With Quote