View Single Post
  #7   Spotlight this post!  
Unread 18-06-2013, 12:08
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,813
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Trouble with limit switches

Quote:
Originally Posted by tyler34 View Post
The 5V light was lighting up like it should be.



Everywhere I've looked says to connect ground to signal, so I'm not sure that is correct. Connecting the power to signal doesn't do anything either anyways.



We have other IO pins being used with encoders that are working perfectly fine. Whenever we try to use a limit switch on any of the pins, it doesn't work. I can try a new ribbon cable later today and see if that works.
Some thoughts:
1. Double and triple check the code to make sure you aren't assigning something else to that pin as well.
2. Try creating a whole new software project that has nothing in it but the limit switch code, to make sure you aren't running into any issues with other stuff interfering.
3. Unplug your limit switch and verify it's working as intended - use a multimeter to measure resistance between the two pins on the PWM connector - you should see the resistance value switch between infinite and 0 ohms when pressing the switch (as for which one is which, that's up to how it's wired - normally connected or normally open).
4. Check the LED's on the DSC - all three should be brightly lit (5V, 6V and Power), and you should see the RSL working correctly.
5. Take spares of other parts (DSC, DSC-cRIO cable, etc) and swap them out to make sure the problem isn't in one of them.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA