Go to Post Who said you'll WANT to avoid other robots in auto mode this year?:yikes: (Look at, say, 2006, 2007, 2004, 2003...) - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-11-2006, 20:21
JWSnedden's Avatar
JWSnedden JWSnedden is offline
Profundity Escapes Me...
AKA: Le Comte de Rien
FRC #1646 (Precision Guessworks)
Team Role: Webmaster
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Lafayette
Posts: 33
JWSnedden is an unknown quantity at this point
Limit Switch Basics

How do you program limit switches?
__________________
Behold the Awesome Power of my 16M Jump Drive!!!!!
  #2   Spotlight this post!  
Unread 27-11-2006, 20:36
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Limit Switch Basics

Quote:
Originally Posted by JWSnedden
How do you program limit switches?
I am not the programmmer, but I am the electrician on our team. A limit switch plugs into a digital I/O port on the controller. The switch is closed when the negative is applied (or so I believe and please correct me if I'm wrong). As far as the programming, I have no idea. So it uses the black and white wires of a PWM cable. When the switch is closed, the program is supposed to respond.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #3   Spotlight this post!  
Unread 27-11-2006, 20:40
JWSnedden's Avatar
JWSnedden JWSnedden is offline
Profundity Escapes Me...
AKA: Le Comte de Rien
FRC #1646 (Precision Guessworks)
Team Role: Webmaster
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Lafayette
Posts: 33
JWSnedden is an unknown quantity at this point
Re: Limit Switch Basics

Quote:
Originally Posted by RyanN
I am not the programmmer, but I am the electrician on our team. A limit switch plugs into a digital I/O port on the controller. The switch is closed when the negative is applied (or so I believe and please correct me if I'm wrong). As far as the programming, I have no idea. So it uses the black and white wires of a PWM cable. When the switch is closed, the program is supposed to respond.
yes, we knew that. We need to program it. Thank you, though.
__________________
Behold the Awesome Power of my 16M Jump Drive!!!!!
  #4   Spotlight this post!  
Unread 27-11-2006, 20:49
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Limit Switch Basics

JWS,

When the switch is closed, you will read a 0 and then the switch is open, you will read a 1...

Code:
if (rc_dig_in15 == 0)  
  {
   // This will execute when the signal on input 15 is grounded.
  }
  else		   
  {
   // This will execute otherwise (when the switch is open).
  }

Does this make sense?

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #5   Spotlight this post!  
Unread 27-11-2006, 21:34
JWSnedden's Avatar
JWSnedden JWSnedden is offline
Profundity Escapes Me...
AKA: Le Comte de Rien
FRC #1646 (Precision Guessworks)
Team Role: Webmaster
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Lafayette
Posts: 33
JWSnedden is an unknown quantity at this point
Re: Limit Switch Basics

Yes Thanks very much!
__________________
Behold the Awesome Power of my 16M Jump Drive!!!!!
  #6   Spotlight this post!  
Unread 30-11-2006, 18:58
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: Limit Switch Basics

#define leftLS rc_dig_in15
#define rightLS rc_dig_in14

if(leftLS == 0)
//the left limit switch is on
//dont turn left any more
if(rightLS == 0)
//the right limit switch is on
// dont turn right any more


//this post made more since before the nevermind
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
  #7   Spotlight this post!  
Unread 30-11-2006, 19:48
JWSnedden's Avatar
JWSnedden JWSnedden is offline
Profundity Escapes Me...
AKA: Le Comte de Rien
FRC #1646 (Precision Guessworks)
Team Role: Webmaster
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Lafayette
Posts: 33
JWSnedden is an unknown quantity at this point
Re: Limit Switch Basics

Thanks anyway!
__________________
Behold the Awesome Power of my 16M Jump Drive!!!!!
Closed Thread


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
Limit switch in easy c? chadbarbe Programming 6 02-02-2006 09:51
How do you wire a limit switch? JMH Electrical 1 16-02-2005 17:44
gyro/accelecometer/limit switch help needed Anton Programming 4 04-02-2005 16:39
sample limit switch code??? tml240 Programming 5 17-02-2004 17:13
Controlling Arm travel - Limit Switch or Mechanical Stop? archiver 2001 8 23-06-2002 23:55


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

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