Go to Post Yes, this year's championships could be decided by cheesecake. - MrJohnston [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 31-03-2010, 00:02
Albo Albo is offline
Registered User
AKA: Al Vigland
FRC #2408 (Shrapnel Sergeants)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: St. Louis
Posts: 7
Albo is an unknown quantity at this point
1s Delay Affecting Driver Controls (FTC)

We are experiencing a long delay (1 sec) in responding to our driver station controls. We have been reading a lot of posts about managing parallel loops to keep periodic actions (e.g. shooting) from interferring with high response actions like driving, and we have tried to implement that with a separate, parallel iteration linked using a global variable.

Even so, something is interferring with our responsiveness. If feels like all control actions are delayed by 1 sec. If we command rapid movements, they all happen in rapid succession ... but don't start until about 1 second after we command the operations.

Would having too much going on in our main driving iteration cause this?

We also have a lot of constants and motor / servo references inside our iteration. Would it help to pull all of those static references outside the loop?

I have included a .zip with our main loop, with the motor configurator files.

We had a lot better responsiveness with our FRC program and are wondering what we are missing with this FTC program.

Thanks!
Attached Files
File Type: zip Team 2408 LabView Code.zip (61.1 KB, 21 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 31-03-2010, 09:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,731
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: 1s Delay Affecting Driver Controls (FTC)

Not many of us have the correct LabVIEW version to view your FTC files and comment on them.

I didn't want you to think we were ignoring you...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 01-04-2010, 03:00
Albo Albo is offline
Registered User
AKA: Al Vigland
FRC #2408 (Shrapnel Sergeants)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: St. Louis
Posts: 7
Albo is an unknown quantity at this point
Re: 1s Delay Affecting Driver Controls (FTC)

No problem! Here is a doc with some screen shots. This is kind of ugly because in our latest attempt, we pulled all of the references out of the loop. We also nest case statements about 5 levels deep. Is that a source for excessive delay (it doesn't seem like it should be)?
Attached Files
File Type: doc 2408 program screenshots.doc (262.5 KB, 21 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 01-04-2010, 08:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,731
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: 1s Delay Affecting Driver Controls (FTC)

You should add a timer to each of your two parallel While loops to prevent one or the other from hogging the CPU. One loop could be starving the other loop. Add a 50ms Wait to the outer part of each While loop and that will periodically release the CPU to process other tasks.

Other than the obvious "Fire? = false" case causing a half second delay in that parallel loop, I don't see anything unusually slow in your code. Because it's parallel it shouldn't slow down the first loop.

The nested Cases aren't a problem unless something time consuming happens in one of the hidden ones. Can't see where the first Tick Count goes off to, but I don't imagine you're doing anything unusual with that either.
Attached Thumbnails
Click image for larger version

Name:	loopdelay.jpg
Views:	29
Size:	5.7 KB
ID:	8960  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 01-04-2010 at 09:31.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-04-2010, 08:56
Albo Albo is offline
Registered User
AKA: Al Vigland
FRC #2408 (Shrapnel Sergeants)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: St. Louis
Posts: 7
Albo is an unknown quantity at this point
Re: 1s Delay Affecting Driver Controls (FTC)

Hmmm. I thought the timer would add more delay (i.e. wait) ... but now that you mention releasing the cpu, I think you may be on to something. We will give that a try. Thanks!
Reply With Quote
  #6   Spotlight this post!  
Unread 01-04-2010, 09:34
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,731
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: 1s Delay Affecting Driver Controls (FTC)

The timer will run in parallel with the other tasks inside the While loop, so you don't lose the full 50ms.
At most you'll lose 50ms.

If that helps then you can experiment with shortening the time to 20ms or so. It really just needs to release long enough to allow the other loop to get a chance to run, so the time just has to be a little greater than how long the other code within the loop takes to execute.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 01-04-2010 at 10:29.
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
Driver Station Delay alex42 FRC Control System 2 09-02-2010 20:14
[FTC]: Toggle controls nate15810 FIRST Tech Challenge 17 17-02-2009 11:13
Bad Weather Affecting Teams Tonya Scott 476 General Forum 77 15-02-2007 14:02
pic: 383`s controls and driver Manoel Robot Showcase 13 03-03-2005 00:57
Ramp Affecting Robot Movement Yan Wang Rules/Strategy 6 26-02-2003 08:27


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

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