OCCRA   [more] Florida Regional : 109d 05h 39m ...
Go to Post I hate you.... in a graciously professional sort of way. - Uberbots [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
Team 47   CD-Events   CD-Media   CD-Swap   CD-Spy   FRC-Spy   Unsung FIRST Heroes   WFA
portal register members calendar search Today's Posts Mark Forums Read FAQ rules
Innovation First, Inc.
The Chief Delphi Forums are sponsored by Innovation First, Inc.
University of Detroit Mercy
ADVERTISEMENT

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Old 10-27-2009, 07:06 PM
JonesSoda101's Avatar
JonesSoda101 JonesSoda101 is offline
LabView Master
AKA: Cody Jones
FRC #0240 (Tempest)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2008
Location: Monroe MI
Posts: 1
JonesSoda101 is an unknown quantity at this point
Using Switches in Autonomus

How do I, using labView, program switches attached to the drivers station to decide which autonomus mode is used?
Thanks in Advance.
__________________
Cody Jones
All work and no play makes Jack a dull boy and Jill a rich widow.-Evan Esar
Reply With Quote
  #2   Spotlight this post!  
Old 10-27-2009, 08:28 PM
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: 3,169
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
Send a message via AIM to Alan Anderson
Re: Using Switches in Autonomus

As soon as the robot is enabled in autonomous mode, you won't be able to read anything from the Driver Station. So what you need to do is continuously read the switches while the robot is disabled, figure out which autonomous selection that means, and store it in a global variable. When autonomous begins, use the value from that global variable to select the proper actions.

Is that enough to start with, or do you want more detail?
Reply With Quote
  #3   Spotlight this post!  
Old 10-28-2009, 06:46 AM
rwood359 rwood359 is offline
Registered User
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 88
rwood359 is a jewel in the roughrwood359 is a jewel in the roughrwood359 is a jewel in the rough
Re: Using Switches in Autonomus

Just a reminder that the DS inputs do not have pull-up resistors. So, you need to connect a pull-up from +5 to signal and a switch from signal to ground.
Reply With Quote
  #4   Spotlight this post!  
Old 10-28-2009, 08:47 AM
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Manchester NH
Posts: 771
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Using Switches in Autonomus

Quote:
Originally Posted by rwood359 View Post
Just a reminder that the DS'09 inputs do not have pull-up resistors. So, you need to connect a pull-up from +5 to signal and a switch from signal to ground.
Fixed that for ya
Reply With Quote
  #5   Spotlight this post!  
Old 10-28-2009, 10:30 AM
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 540
rsisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant futurersisk has a brilliant future
Send a message via MSN to rsisk
Re: Using Switches in Autonomus

Could you explain what a pull-up resistor is and why you need it in this situation?
Reply With Quote
  #6   Spotlight this post!  
Old 10-28-2009, 01:23 PM
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Manchester NH
Posts: 771
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Using Switches in Autonomus

Quote:
Originally Posted by rsisk View Post
Could you explain what a pull-up resistor is and why you need it in this situation?
A pull-(up/down) resistor weakly pulls an input either high or low. This prevents the input from floating around randomly and gives it a "Unless you dictate otherwise, I am high (or low if it is a pull down)." If you've ever had a digital input "flutter" or be otherwise unreliable, you probably needed a pull-___ resistor.
Reply With Quote
  #7   Spotlight this post!  
Old 11-02-2009, 02:46 PM
Shivang1923 Shivang1923 is offline
I make robot go VROOM VROOM!
FRC #1923 (MidKnight Inventors)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: West Windsor, NJ
Posts: 36
Shivang1923 has a spectacular aura aboutShivang1923 has a spectacular aura about
Re: Using Switches in Autonomus

That being said vdubs you might want to let them know that a 10k resistor works perfectly (at least it did for us).

Dont want them to use a small resistor and end up shorting the DS
Reply With Quote
  #8   Spotlight this post!  
Old 11-06-2009, 10:32 AM
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Registered User
AKA: Marc
FRC #2449 (Out of Orbit)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Hot-as-Heck, Arizona
Posts: 86
Ziaholic will become famous soon enough
Re: Using Switches in Autonomus

I like Alan's recommendation of using a global variable, but why not put the switches on the 'bot instead of the DS?

During the setup time between matches you place your 'bot and set your switches accordingly.

We never actually implemented the full code last year, but we had some switches on the 'bot that we could set based on which starting square we were starting in. This way, the Auto code can know its starting position as soon as it starts up. Regrettably, our autonomous code never got that mature and the switches were left unused ... go figure!
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #2449 - Out of Orbit
Reply With Quote
  #9   Spotlight this post!  
Old 11-06-2009, 12:34 PM
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 382
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Using Switches in Autonomus

Quote:
Originally Posted by Ziaholic
... why not put the switches on the 'bot instead of the DS?
Having done this both ways on the pre-2009 robots, it tends to be an easier location on the driver station, and it eliminates the awkward running back out to the robot to make sure the switches are set correctly. Also last second changes after seeing how other robots are placed.

I think our programmer for 2009 even had a one-line autonomous description on the DS box, which was better than a simple number. Not that his descriptions were, well, descriptive.
Reply With Quote
  #10   Spotlight this post!  
Old 11-06-2009, 02:32 PM
Jon Jack's Avatar
Jon Jack Jon Jack is offline
Couldn't Quite Bring One Home...
AKA: Mentor / Coach
FRC #1538 (The Holy Cows)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2005
Location: San Diego, CA
Posts: 435
Jon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant futureJon Jack has a brilliant future
Send a message via AIM to Jon Jack
Re: Using Switches in Autonomus

Quote:
Originally Posted by Roger View Post
Having done this both ways on the pre-2009 robots, it tends to be an easier location on the driver station, and it eliminates the awkward running back out to the robot to make sure the switches are set correctly. Also last second changes after seeing how other robots are placed.

I think our programmer for 2009 even had a one-line autonomous description on the DS box, which was better than a simple number. Not that his descriptions were, well, descriptive.
Agreed. We had the DS display which autonomous mode we were running all season. Having the ability to switch your autonomous mode after seeing how your opponent is set up is very nice. It's even nicer in a game like Lunacy where a poor autonomous mode could be the difference between a win and a loss.
__________________
Team 1538 - The Holy Cows - Got FIRST?
2007 San Diego Regional - Delphi "Driving Tomorrow's Technology" Award & Semi-Finalists w/ 1852 & 1388
2007 Las Vegas Regional - Imagery Award & Semi-Finalists w/ 1572 & 8
2008 San Diego Regional - Woodie Flowers Award, Imagery Award & Semi-Finalist w/ 1158 & 1671
2008 Los Angeles Regional - Xerox Creativity Award / Engineering Inspiration & Quarter-Finalists w/ 207 & 589
2009 San Diego Regional - Woodie Flowers Award, Finalists w/ 1388 & 1348, Chairman's Award
2009 Las Vegas Regional - Imagery Award, Semi-Finalists w/ 254 & 2339
2009 World Championship - Semi-Finalists w/ 1503 & 1649/176
2009 IRI - Quarter-Finalists w/ 2775, 2056 & 148
2009 Fall Classic - Judges Award, Champions w/ 399 & 980
Reply With Quote
  #11   Spotlight this post!  
Old 11-09-2009, 01:25 PM
Shivang1923 Shivang1923 is offline
I make robot go VROOM VROOM!
FRC #1923 (MidKnight Inventors)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: West Windsor, NJ
Posts: 36
Shivang1923 has a spectacular aura aboutShivang1923 has a spectacular aura about
Re: Using Switches in Autonomus

Having the switched on the controls allows for last minute changes to the code in case of a strategy change - dont know how many times we've changed the auton after a brief stroke of inspiration 5 seconds before the match starts.

As for the DS display, I find that showing the position and the begining movement of the robot allows for the operator/driver/coach to identify the auton being used pretty well.

For example, one of my codes displays: far left to far right, or center away.
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
Using Limit Switches in LabVIEW VeedotJaydot NI LabVIEW 2 02-14-2009 04:01 PM
Toggling boolean using 2 limit switches Quarkster NI LabVIEW 2 02-02-2009 10:43 PM
Using Limit Switches with the Arm iwin2000 Programming 3 02-18-2008 03:52 AM
Using Switches on the Operator Interface CronosPrime1 Programming 41 02-16-2006 11:43 AM
using limit_switch_max/min in autonomus CmptrGk Programming 4 02-11-2005 11:32 AM


All times are GMT -5. The time now is 07:20 AM.

The Chief Delphi Forums are sponsored by Innovation First, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © Delphi and Pontiac Central High School