|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
It appears that you have name them incorrectly, you called it limit in begin and limit1 in teleop.
|
|
#3
|
|||
|
|||
|
Re: Limit Switches
I fixed that and am still having the problem. Help!
|
|
#4
|
|||
|
|||
|
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... |
|
#5
|
|||||
|
|||||
|
Re: Limit Switches
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. |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
|||
|
|||
|
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 Last edited by j.cole : 22-02-2011 at 09:26. Reason: added the encoder bit |
|
#8
|
||||
|
||||
|
Re: Limit Switches
In Begin.vi
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|