Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Teleop Limit Switch Firing Sequence (http://www.chiefdelphi.com/forums/showthread.php?t=115323)

nickcvet89 23-03-2013 21:12

Teleop Limit Switch Firing Sequence
 
Hey everyone, currently our robot has an arm that when a button is pressed, a sequence of shooting in cocking for next shot occurs. This has worked....... at times, during some of our matches at Mt. Olive District Event, we noticed that if the arm got jammed on a frisbee, it was unable complete this sequence and our robot would not be able to shoot. We would like to know if anyone has a suggestion on improving this code so that it would exit the sequence structure if this would happen. I posted what we currently have. Thanks

Greg McKaskle 23-03-2013 22:04

Re: Teleop Limit Switch Firing Sequence
 
1 Attachment(s)
The way it is written, the first loop will run at full speed until the limit switch is triggered.

You may want to combine the exit condition with a timeout. OR the limit switch and either a loop counter or a time since the loop began. You may also want to throttle the loop by putting a delay in it.

The attached image shows the sort of thing you might do.

Greg McKaskle

nickcvet89 23-03-2013 22:19

Re: Teleop Limit Switch Firing Sequence
 
Ahh thanks Greg, why should this be done in the first loop and not in the second or should I do this also in the second loop?

Greg McKaskle 23-03-2013 22:38

Re: Teleop Limit Switch Firing Sequence
 
If I were you, I'd do something similar in the second loop as well. I was just giving an example.

Greg McKaskle

nickcvet89 23-03-2013 22:41

Re: Teleop Limit Switch Firing Sequence
 
Ohh ok, thanks, will try this in the AM!


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

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