Go to Post Blame it on the programmer. - colt527 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2009, 16:28
Anne_droid's Avatar
Anne_droid Anne_droid is offline
Registered User
AKA: Anne Mitzel
FRC #0451 (The Cat Attack)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Milan, Michigan
Posts: 9
Anne_droid is an unknown quantity at this point
cRIO low execution rate

My programmers have asked me to post the following question, since they don't have their own CD account:

Right now as we run the cRIO we have 3 diffrent tasks one for Autonomous one for Teleop and one for the camera information, the camera information is put on to global variable so that the other 2 tasks can read the information. We noticed while running the cRIO that the input between the joysticks and the movement was laging some, so we found out the Hz that the cRIO was running at was around 13 per sec. We fixed up and cleaned up the code so that we only had the three tasks mentioned above and we increased the Hz to around 130. However when we run our turret and move and attemt to track the target we fall back down to around 30. when we delete the camera task from running the cRIO speed is still at around 300-500Hz. We are at a loss on what to do, testing on blank code it runs at 150KHz. And then with that blank code we put our camera task and camera stuff in, then it still ran at 55KHz. We cannot figure out what is causing these masive slowing in our code.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2009, 17:38
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,750
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: cRIO low execution rate

Maybe I don't understand the results being posted, but ideally the rates of each task would be limited to a known rate rather than running all out.

As an example, since motors updates for victors have a 10ms window, it really doesn't make sense to update them faster, I believe servos are 20ms, and jags are 5ms. The camera task can be limited to whatever you want, but doesn't need to be less than 33ms per frame.

If you do this for even some of the tasks, it seems like the variability will go way down. Having three tasks all expecting to run as fast as possible just seems to be asking the magic eight ball of OS scheduling for way too much.

Greg McKaskle
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
TrackTwoColors execution time Tom Bottiglieri C/C++ 18 17-02-2009 14:43
Single button function execution RonStoppable102 Programming 2 05-01-2007 09:45
User Processor Execution Time Andrew Blair Programming 1 12-02-2006 21:52
Actual execution time measurement Dan Technical Discussion 5 24-03-2003 11:36


All times are GMT -5. The time now is 17:32.

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