Go to Post If it wasn't for 47, none of us would be here. - Taylor [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-04-2012, 17:20
Wendy Holladay's Avatar
Wendy Holladay Wendy Holladay is offline
Registered User
FRC #1912 (Team Combustion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Slidell, la
Posts: 183
Wendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond repute
Loop Timing on Robot Drive

We have been doing some experimenting with an issue we have put off for a while. We read our joysticks in teleop and then set global variables. We actuate the motors, including drive in periodic.

This works well and our robots drives just fine. However when we set our loop time to 100ms, setting our Drive vi, we get the following error/message at the diagnostic tab of the driver's console.

Robot drive is running too fast or being starved due to too much code.

When we set that loop for 10ms, no diagnostics error/message.

The performance of the robot does not change. The setting of the drive is the only action in the loop. This error does not seem to hurt us, but I have wondered for a while why we get it and was hoping for some help from the community.
__________________
http://www.team1912.com

2013, 2012, 2011, 2010 Regional Chairman's Award, Bayou Regional
2013 Woodie Flower's Award, Bayou Regional
2012 Dean's List Winner (Rachel Holladay)
2015, 2014, 2013, 2012, 2011, 2010 Beta Test Labview/Hardware
2012, 2011 Best Website, Bayou Regional
2011, 2009, 2006 Gracious Professionalism
2007 Bayou Regional Winner
Reply With Quote
  #2   Spotlight this post!  
Unread 08-04-2012, 17:36
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Loop Timing on Robot Drive

The error you're experiencing ("the loop that contains RobotDrive is not running fast enough...") occurs when the default safety timers within the drive code trip. Whenever the drive motors go >100ms without an update, the motors will be disabled. This prevents things like runaway robots.

When you set the wait on your loops to be 100ms, you're cutting this threshold very close. The Wait VI is not extremely precise (it's good enough for our purposes but there are ways to do it with more accuracy), and it's possible that your loop times could differ by a little bit, thus tripping the safety.

If you reduce the wait on your loop (~20ms is usually pretty good - that's the speed at which new packets are received by the robot), you should eliminate this problem. Times greater than 20ms often occur some control lag, since new data is being sent faster than the robot can process it, and you want your loops throttled somewhat to be nice to the CPU. 20ms is a pretty good number for this.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #3   Spotlight this post!  
Unread 09-04-2012, 21:35
rachelholladay's Avatar
rachelholladay rachelholladay is offline
Registered User
FRC #1912 (Team Combustion)
 
Join Date: Dec 2010
Rookie Year: 2006
Location: Slidell, Louisiana, USA
Posts: 540
rachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond repute
Re: Loop Timing on Robot Drive

Alright, thank you very much! We changed it to wait to 20 milliseconds and that fixed the problem. Its alwasy nice to know why solution works, so thanks for explaining.
__________________
Carnegie Mellon School of Computer Science Class of 2017
2012 Dean's List Winner, 2011 NWCIT Award of Aspirations in Computing National Winner

2014 - : FIRST Team 3504 Girls of Steel (Mentor)
2014 Engineering Inspiration

2006 - 2013: FIRST Team 1912 Combustion (Webmaster / Controls Capt / Beta Test Lead / Drive Capt / JrFLL Coach)
2013 Woodie Flowers Finalist for Wendy Holladay. 2010 - 2013 Regional Chairman's Award at the Bayou Regional. 2011 - 2012 Best Website at the Bayou Regional. 2010 - 2013 Beta Test Team for Hardware and LabVIEW. 2012 JrFLL State Expo Coordinator.
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


All times are GMT -5. The time now is 04:05.

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