|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Sequence Structure Using Limit Switch
I want a sequence structure go to the next sequence in autonomous as soon as a limit switch returns true, but I don't know how to do this. I can't figure this out even after days of thinking and trial and error, and I would really appreciate any help.
![]() Last edited by JakeE : 05-03-2014 at 22:24. |
|
#2
|
||||
|
||||
|
Re: Sequence Structure Using Limit Switch
I'm going to assume that by sequence structure you mean either a flat sequence or stacked sequence. The code our team uses is loosely based off of Team 358's Variations on Autonomous, except using While loops inside the frames instead of timing. Attach the output of the limit switch to the loop condition and the program will pause at that point until the limit is pressed. I don't have Labview on this computer but I'll see if I can whip up a picture as an example.
|
|
#3
|
||||
|
||||
|
Re: Sequence Structure Using Limit Switch
Thank you so much! I'll give that a try!
![]() |
|
#4
|
||||
|
||||
|
Re: Sequence Structure Using Limit Switch
Here's a quick mock-up with a turret motor and a limit switch.
![]() You can do similar simple things with ultrasonics, pots, gyros, etc. Drive forward till you reach a certain distance, then turn motor off. Rotate until you reach a certain measurement. You get the idea. Much easier (and simpler) than a PID loop in many cases. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|