Go to Post From what I've seen in FIRST, teams that copy generally always learn something from it, and if they don't, the copy they produce is of much lower quality than the original. - TheOtherGuy [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-03-2011, 20:01
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Labview code overwhelming cRIO

Today I made use of a few LabVIEW utilities - the real time manager (which shows CPU and memory usage) and the profiler. This was because I noticed our robot running slowly when vision was enabled (runs smoothly and responsively unless we're doing image processing), and figured something was being pushed to a limit.

1) The cRIO, running the default competition code (out of the box), uses about 60% of it's available CPU time. Understandable - there's a lot of stuff going on just to get things running

2) Our code, which uses motors/sensors/relays/solenoids/servos/PID pushes this up to 100%. I can see why adding vision on top of that would slow things down.

I expected we might have to simplify some of our control code in order to accomodate more processing. However, I then ran the profiler. Keep in mind that the profiler itself has a pretty severe performance impact, so the following information isn't guaranteed to be 100% accurate.

After running the profiler, I examined the code running in Periodic Tasks - for our team, this vi contains all the logic related to sensing (except camera) or moving anything, so it's the workhorse of our code.

1) The robot spent 60% of its Periodic Tasks time in the WPI library VI's that set speed, do safety checks on motors, set the state of solenoids, do safety checks on solenoids, set relays, etc...

2) Even though we were running PID and other operations all over the place, these operations were chump change compared to setting a motor speed.

What is going on here? Are other teams seeing this as well? Is there a way to mitigate this?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi