Chief Delphi

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

JakeE 05-03-2014 21:47

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

mgerber 05-03-2014 22:47

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.

JakeE 05-03-2014 22:49

Re: Sequence Structure Using Limit Switch
 
Thank you so much! I'll give that a try! :)

mgerber 05-03-2014 23:08

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.


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

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