Go to Post We like to help, otherwise they put us back in our cages. - Matt Krass [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 18-10-2011, 19:50
stem2015preiman stem2015preiman is offline
Registered User
FTC #5178
 
Join Date: Sep 2011
Location: Edgewater MD
Posts: 1
stem2015preiman is an unknown quantity at this point
Labview-using timers to control motors

We are using Labview and are trying to do an autonomous program using timers with four wheel tank drive but if we use timers there is a time delay between the start of each side.
Reply With Quote
  #2   Spotlight this post!  
Unread 18-10-2011, 22:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Labview-using timers to control motors

Without knowing what you're doing, it's hard to tell what is going on. Can you post a picture of your code? That would be a big help in getting you some useful advice.

Just a wild guess -- are you connecting your motor drive functions in series? That'll require each one to finish before the next one can start. Instead, connect them in parallel after the timer function so they all run at the same time. I don't know FTC well enough to have any idea whether what I'm saying makes sense for what you need.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-10-2011, 16:59
Sconrad Sconrad is offline
Registered User
AKA: Connor Young
FRC #0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Yorktown
Posts: 40
Sconrad is an unknown quantity at this point
Re: Labview-using timers to control motors

Like Alan said, more info would be appreciated.

First thing to keep in mind: Autonomous is in a loop. If you want the code to pause at the end of each iteration (although I don't know why you would want to do that) just place the wait (Programming >> Timer) vi and set the time to wait in ms. If you want to case the code to wait for a time in between tasks, I would suggest using a flat sequence structure. Do one task (i.e. Set Motor Speed) and the put a wait vi in that frame and tell it to wait as long as you wish to continue performing that task. Note: do not use loops, it can push your compile time upward of a half-hour due to Labview having a problem with nested loops.

Hope this helps!
Reply With Quote
  #4   Spotlight this post!  
Unread 20-10-2011, 07:30
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,751
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: Labview-using timers to control motors

If you have a VI that you can send to me that shows nested loops causing a 30 minute or even a 30 second compile of a single VI, please send it. In 20 years of using and writing LV, I've never seen this.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 20-10-2011, 22:59
Sconrad Sconrad is offline
Registered User
AKA: Connor Young
FRC #0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Yorktown
Posts: 40
Sconrad is an unknown quantity at this point
Re: Labview-using timers to control motors

Quote:
Originally Posted by Greg McKaskle View Post
If you have a VI that you can send to me that shows nested loops causing a 30 minute or even a 30 second compile of a single VI, please send it. In 20 years of using and writing LV, I've never seen this.

Greg McKaskle
I can't say I have any vis with nested loops because our team has avoided programming with them for the past several years due to a noticeable improvement in compile when they stopped using them. After doing some research(post-posting the previous post, say that five times fast ), it seems that this could have been a result of a trigger happy watchdog who wasn't being fed. I was not personally on the team, so I am spurting out secondhand information and it is possible that whatever was causing our problems has been fixed in more recent versions of LabView. I apologize if I am spreading false info on these forums and I realize I should have put a qualifier on that statement. However, our team has never had much of a problem avoiding nested loops, thanks to the ingeniousness of the folks at NI who added in a flat-sequence structure . Labview is my personal language of choice for frc regardless of whether or not nested loops are an issue because of its easy-to-learn interface and built-in tools and help.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-10-2011, 23:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Labview-using timers to control motors

Quote:
Originally Posted by Sconrad View Post
...I am spurting out secondhand information...
I think your information has probably been mangled in the retelling at some point. Much of what you've been saying has obvious errors in terminology, so it's possible that when you say "nested loops" or "compile time" you don't mean the same thing most of us understand by those words. It seems likely to me that your team's programmers were talking about long-running loops in the Teleop VI causing control lag or watchdog errors, and you simply misunderstood.
Reply With Quote
  #7   Spotlight this post!  
Unread 21-10-2011, 07:50
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,751
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: Labview-using timers to control motors

I looked on snopes and it agrees, nested loops in LV do not contribute to long compile times --totally a legend . Glad to have this one behind us.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 21-10-2011, 18:50
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,770
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Labview-using timers to control motors

Alan and Greg,
The poster appears to be talking from an FTC standpoint.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #9   Spotlight this post!  
Unread 21-10-2011, 20:07
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,751
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: Labview-using timers to control motors

FTC usage was definitely not something I'd picked up on, yet you would still need lots and lots of nesting to impact the compile time. I am happy to look into VIs that show otherwise.

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


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

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