Go to Post IRI: Where the Egos Go to Tie. :ahh: - Ian Curtis [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 01-04-2009, 20:37
jph399's Avatar
jph399 jph399 is offline
Programming
FRC #2500 (Herobotics)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Minneapolis, MN
Posts: 27
jph399 is an unknown quantity at this point
Cool Autonmous switching questions

I am trying to wire 3 different autonomous routines to the first 3 digital Inputs on the Driver Station. I was wondering how do I wire the "get digital input VI" output to a case structure where the 3 different autonomous routines will be.

I plan on being able to throw a jumper on the 1st,2nd or 3rd digital input on the driver station and thus choosing which of the 3 routines I want right before the match.
I am also wondering what the value will be on the Input when I attach a jumper.( 1-8?, or boolean maybe)
and do i attach the jumper to +5v and Signal? or something else

Please Help
__________________
"Think Outside the BUN"
"If it doesn't fit - Make it Fit"
Reply With Quote
  #2   Spotlight this post!  
Unread 02-04-2009, 10:38
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,809
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: Autonmous switching questions

As always there are several ways to do this.
Here's one that uses all 8 digital inputs. The values from the "Boolean Array to Number" will return case numbers 1, 2, & 4 for what you described.

There's more to the DS side than moving a jumper however.
Without any jumper in place, the DS Digital inputs will float around returning random values.
A switch would be handier, but if you do use jumpers, then you'll need
-- one that jumpers signal to 5v
-- another that jumpers signal to ground

Never leave any of the DS pins you are using without a jumper of one type or another in place.
Attached Thumbnails
Click image for larger version

Name:	DS_switch_case.jpg
Views:	65
Size:	9.7 KB
ID:	7773  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-04-2009 at 10:46.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-04-2009, 11:12
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,113
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: Autonmous switching questions

Quote:
Originally Posted by Mark McLeod View Post
A switch would be handier, but if you do use jumpers, then you'll need
-- one that jumpers signal to 5v
-- another that jumpers signal to ground
A jumper from signal to ground is not trivial. The +5 pin is in the way. If you try to put a standard jumper on the ground pin, you'll short the DS power supply.

Using a servo PWM connector to bring out the signal, power, and ground connections to a SPDT switch is probably the simplest reliable way to control the DS digital inputs.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-04-2009, 09:23
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: 38
Shivang1923 has a spectacular aura aboutShivang1923 has a spectacular aura about
Re: Autonmous switching questions

For three different routines, you really only need a DPDT switch (it should go in three ways...we found a weird type in radio shack that said DPDT but only went left and right...) connected to two DIG Input on the Driver Station.

You just 'flip' the wire colors for each side of the switch.

[G]-1k to 100k resistor-[S] [+5V] Dig In 1
[+5V] [S]-1K to 100K resistor-[G] Dig In 2

use pwm cable:
[b]-1k to 100k resistor-[W] [R] Dig In 1
[R] [W]-1k to 100k resistor-[b] Dig In 2

We use a 10k between the Signal and Ground. Basically KwikByte messed up so to say, and make the values float when the pins aren't connected to anything. So if you have the switch in the middle position, then the values would be random causing issues. The Resistor acts as sort of a jumper making a teeny tiny connection between the ground and signal, so when the DPDT is in the center position, both digital in's will get a false signal.

it saves the need for 3 switches, and avoids code confusion if two or three switches are left in the on position by mistake.
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
Joystick value in autonmous XXShadowXX NI LabVIEW 4 08-03-2009 21:16
Switching Accumulator RoboGeek99 Pneumatics 4 18-01-2008 18:26
autonmous corner or center dan da' geekman Rules/Strategy 55 09-01-2006 14:48
Need autonmous? the_undefined Programming 0 21-04-2005 22:28
switching joysticks ten3brousone Control System 1 06-03-2005 20:51


All times are GMT -5. The time now is 18:06.

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