Go to Post Tell them your newfound passion for FIRST as a program, and let them know all you're doing is getting more involved to broaden your FIRST horizon - Dorienne [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 21-02-2011, 17:45
Joseph W. Horth Joseph W. Horth is offline
Registered User
FRC #0280
 
Join Date: Sep 2010
Location: Michigan
Posts: 21
Joseph W. Horth is an unknown quantity at this point
Limit Switches

After a bit of search I couldn't find what I needed to know, so here goes; How should Limit Switches be wired in coding? I have a limit switch on each of the pivot points on our arm but when even one of them is hit it kills every function on the robot. It stores the inputs as I can see them on the driver station however, it won't let me move any of them. I've included both a picture of the Teleop.vi code and a picture of the Begin.vi, thanks for taking the time to read this.
Attached Thumbnails
Click image for larger version

Name:	Code2a.jpg
Views:	60
Size:	128.5 KB
ID:	10260  Click image for larger version

Name:	Code1.jpg
Views:	53
Size:	127.9 KB
ID:	10261  
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2011, 18:11
civ77 civ77 is offline
Registered User
FRC #2521
 
Join Date: Feb 2011
Location: eugene
Posts: 7
civ77 is an unknown quantity at this point
Lightbulb Re: Limit Switches

It appears that you have name them incorrectly, you called it limit in begin and limit1 in teleop.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2011, 18:16
Joseph W. Horth Joseph W. Horth is offline
Registered User
FRC #0280
 
Join Date: Sep 2010
Location: Michigan
Posts: 21
Joseph W. Horth is an unknown quantity at this point
Re: Limit Switches

I fixed that and am still having the problem. Help!
Reply With Quote
  #4   Spotlight this post!  
Unread 21-02-2011, 18:58
benjamin.narin benjamin.narin is offline
Registered User
FRC #2521
 
Join Date: Jan 2009
Location: Eugene
Posts: 3
benjamin.narin is an unknown quantity at this point
Re: Limit Switches

The code for the limit switch itself looks fine to me.

I'd look at the case structures it's wired to, wiring on the robot, broken limit switches. etc...
Reply With Quote
  #5   Spotlight this post!  
Unread 21-02-2011, 23:53
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,112
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: Limit Switches

Quote:
Originally Posted by Joseph W. Horth View Post
I have a limit switch on each of the pivot points on our arm but when even one of them is hit it kills every function on the robot.
I'll bet you a bottle of Mountain Dew that you have your limit switches miswired between ground and the +5 pin of the DIO instead of the signal pin. As soon as a switch is hit, you'll short the Digital Sidecar's power and everything it's controlling will shut down.

Last edited by Alan Anderson : 22-02-2011 at 09:38.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-02-2011, 00:59
bstites82 bstites82 is offline
Registered User
AKA: Blake Stites
FRC #2164 (multiple)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Harrisonville
Posts: 12
bstites82 is an unknown quantity at this point
Re: Limit Switches

I'm not an expert, but from the code I can see you're logic goes true when the limit switch is activated, but you don't have an alternative argument to reverse the motor off the limit switch. I can see why this would disable the arm, but if its killing the whole bot there may be other issues.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-02-2011, 09:22
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Limit Switches

Try deleting those error wires because when you have that error in there and you trip the limit switch it is sending an error out which could potentially stop your whole robot.

Also as for your encoders your begin should have a Config Timer and Start VI in there too. I followed the Motor with Encoder Example
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.

Last edited by j.cole : 22-02-2011 at 09:26. Reason: added the encoder bit
Reply With Quote
  #8   Spotlight this post!  
Unread 22-02-2011, 22:56
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Limit Switches

Quote:
Originally Posted by j.cole View Post
Also as for your encoders your begin should have a Config Timer and Start VI in there too. I followed the Motor with Encoder Example
In Begin.vi
__________________
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


All times are GMT -5. The time now is 09:16.

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