![]() |
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.
|
Re: Limit Switches
It appears that you have name them incorrectly, you called it limit in begin and limit1 in teleop.
|
Re: Limit Switches
I fixed that and am still having the problem. Help!
|
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... |
Re: Limit Switches
Quote:
|
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.
|
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 |
Re: Limit Switches
Quote:
|
| 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