Go to Post I think that in general people should worry more about what they are doing, and less about what others are doing. That goes for a lot more than FIRST. - pfreivald [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 02-20-2010, 05:36 PM
ygd ygd is offline
Registered User
FRC #3341 (Manhattan Project)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: San Diego
Posts: 26
ygd is an unknown quantity at this point
Question Programming the Limit Switch?

We have the AutomationDirect.com AAP2T51Z11 limit switch. What I understand is that it keeps the robot from exceeding a certain speed. What I don't know is where to mount it, how to connect it to the cRIO/Digital Sidecar, and how to program it. Any help is appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-20-2010, 09:14 PM
imcmahon01 imcmahon01 is offline
Registered User
FRC #1143
 
Join Date: Feb 2010
Location: Scranton, PA
Posts: 8
imcmahon01 has a spectacular aura aboutimcmahon01 has a spectacular aura aboutimcmahon01 has a spectacular aura about
Re: Programming the Limit Switch?

We have used that particular limit switch on our robot. To clarify why you would use one, it's purpose is to stop the motor from turning past a set point. In our setup, we have 2 limit switches. One prevents our grapple arm from extending too far forward by clicking, and the other prevents it from retracting too far into our robot.

First, I'd unscrew the casing on the AAP2T51Z11 limit switch to become familiar with the two possible switch configurations: NC and NO. You only need two wires (signal and ground, no +5V) coming into this box despite the fact that there are 4 terminals. The top 2 terminals are for NO operation and the bottom 2 are for NC. NC means that the switch is Normally Closed (signal wire connects to the ground wire) unless it is pushed to the "clicking" position, at which point the circuit is open (signal and ground are disconnected). NO means Normally Open, and is the exact opposite: Clicking means the circuit closes, neutral position means the circuit is open. The choice of configuration is up to your team's robot and programming needs.

There are two ways that I am aware of to connect these switches to your robot. The first, and easiest by far, is to connect them directly to your Jaguar speed controller's limit switch ports for a particular motor. See page 13 of the Jaguar Getting Started pdf which can be found at http://www.luminarymicro.com/index.p...7&Itemid=59 1 for an external schematic of the limit switch jumpers. Connect the signal and ground wires coming directly from the limit switch to either the Forward jumpers or Reverse jumpers depending on your switch needs. When using this setup, the NC terminals must be used on your limit switch because you are replacing jumpers that are in fact Normally Closed. This setup does not require any coding since the Jaguar handles it all for you.

The second method is to allow the cRIO to handle any input generated from the limit switch. This can be achieved by routing a PWM wire to the limit switch, but splitting the cable on the switch end and trimming off then electrical taping the red +5V wire. Then place the other female-end of the PWM wire on, say Digital I/O slot 1. As this is the Java forum, will also direct you to the JavaDoc for DigitalInput. There you can find limitSwitch.get() to return a boolean value telling whether the limit switch was pressed (this is assuming you have declared a Digital Input limitSwitch).

I think that should be enough info to get you on the right track. Hope this helps!
Reply With Quote
  #3   Spotlight this post!  
Unread 02-21-2010, 01:06 AM
ygd ygd is offline
Registered User
FRC #3341 (Manhattan Project)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: San Diego
Posts: 26
ygd is an unknown quantity at this point
Talking Re: Programming the Limit Switch?

Thank you. I can't express how much I appreciate this, being the only programmer for a rookie team.
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
Limit Switch Twisted eric Programming 8 02-22-2010 11:56 AM
Limit Switch Programming Help (Have almost all of it figured out) LavaEagle Electrical 4 02-22-2010 12:23 AM
What is the essay for the Limit Switch? reader_girl932 Kit & Additional Hardware 0 02-11-2008 04:55 PM
Using a limit switch to limit motion ManicMechanic Programming 16 12-20-2007 12:54 AM
limit switch wedellm Electrical 4 02-16-2007 01:01 PM


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

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