Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Limit Switches (http://www.chiefdelphi.com/forums/showthread.php?t=92597)

Joseph W. Horth 21-02-2011 17:45

Limit Switches
 
2 Attachment(s)
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.

civ77 21-02-2011 18:11

Re: Limit Switches
 
It appears that you have name them incorrectly, you called it limit in begin and limit1 in teleop.

Joseph W. Horth 21-02-2011 18:16

Re: Limit Switches
 
I fixed that and am still having the problem. Help!

benjamin.narin 21-02-2011 18:58

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...

Alan Anderson 21-02-2011 23:53

Re: Limit Switches
 
Quote:

Originally Posted by Joseph W. Horth (Post 1028594)
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.

bstites82 22-02-2011 00:59

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.

j.cole 22-02-2011 09:22

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

DavidGitz 22-02-2011 22:56

Re: Limit Switches
 
Quote:

Originally Posted by j.cole (Post 1029065)
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


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi