Go to Post hmm..."give the gift of ChiefDelphi"? "This holiday season, send some Pontiac cheer to someone you love"? "Don't forget to put The Chief under your tree!" The possibilities are endless. - Jessica Boucher [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
  #2   Spotlight this post!  
Unread 09-10-2014, 09:36
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: Parallel loops vs. One loop?

It is more efficient to combine them into one loop, but not significantly. If they are affecting Teleop at all then you need to rethink your code design.

Before doing anything I'd suggest measuring the rates of all your loops to see how they are affecting overall timing.
One or more of your loops may not be running as fast as 20ms and that would impact Teleop worst of all.

Look under Support Code" in your project and you will see Elapsed Times.vi
Drop a copy of this vi into each of your loops, and into teleop, and give them unique names so they can be told apart.
Open the front panel of Elapsed Times and run your code in debug from Robot Main. Elapsed Times will tell you how long each loop is actually taking.
Each of your loops should be taking just a few ms longer than 20ms. If you see any that are taking significantly longer than that, then you will need to slow down the loop to a more reasonable time or you will need to streamline your code more.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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 08:49.

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