Go to Post Not gonna lie, I wanna marry the person over at #254 who does their wiring... I have admired it for years. :) - Lightfoot26 [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-04-2009, 17:55
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
How to force break a loop

Not a problem, just a question:
In my autonomous independant VI, I use a while loop, and have the "false" constant tied to the conditional terminal. (It's set to stop if true)
From what I can tell, the robot should be stuck in Disable once the DS switches to teleop, because the code should be stuck in autonomous (it doesn't look like there's anything to stop the autonomous code and allow Teleop to proceed).

How does Labview force that loop to break execution?
Or am I using a very inefficient coding technique in that Labview doesn't actually stop the autonomous code, it just ignores it?

I'm not running into any problems, it just seems like a very useful thing to know.
__________________
-- Marshal Horn
Reply With Quote
  #2   Spotlight this post!  
Unread 11-04-2009, 17:58
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: How to force break a loop

if you look at the get robot mode virtual instrument you can find where it switches between modes. before it switches out of autonomous it uses a labview control vi to stop the independant vi execution.

[edit]
the loop itself isn't stopped nor paused, the whole independant.vi is closed/stopped.
[/edit]
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award

Last edited by Burmeister #279 : 11-04-2009 at 18:39.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-04-2009, 18:24
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: How to force break a loop

normally to "pause" a loop without terminating it (which would imply that you cant start it up again), youd use a sync vi to have the loop constantly waiting for that vi to return something (like a semaphore). the reason the loop "pauses" is because a loop is programmed to not continue until all inner vi's have outputted something
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY

Last edited by Uberbots : 11-04-2009 at 18:25. Reason: i r caveman
Reply With Quote
  #4   Spotlight this post!  
Unread 11-04-2009, 19:28
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: How to force break a loop

Quote:
Originally Posted by Burmeister #279 View Post
if you look at the get robot mode virtual instrument you can find where it switches between modes. before it switches out of autonomous it uses a labview control vi to stop the independant vi execution.

[edit]
the loop itself isn't stopped nor paused, the whole independant.vi is closed/stopped.
[/edit]
So that's why Begin.vi requires a VI reference to the autonomous mode?
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 11-04-2009, 19:30
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: How to force break a loop

basically yes.
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award
Reply With Quote
  #6   Spotlight this post!  
Unread 12-04-2009, 08:14
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,748
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: How to force break a loop

The puzzle has been solved. I'll just add that aborting running VIs is not something you should do on a regular basis. We are doing it here to make the framework simpler to use. The normal way of exiting a loop is for the code in the loop to say "I'm done". It can include info from anywhere else in the program to make that decision.

Using the Run and Abort methods on a VI is a way for you to spawn and kill a task similar to an OS thread.

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
How to tune a PID loop? steve d Programming 3 11-02-2007 20:49
Need a little help with how to break out of the box amateurrobotguy Programming 6 16-01-2006 12:56
How long is one stamp loop yangotang Programming 3 23-01-2003 20:36
How much force to push the ramp? archiver 2001 1 23-06-2002 22:44
How Can You Make A Closed Loop System???? GRR_340 Pneumatics 6 21-03-2002 12:27


All times are GMT -5. The time now is 03:45.

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