Go to Post Uhh... we were supposed to be building a robot? *looks at giant wooden Trojan Rabbit in the corner that was built instead for the past 6 weeks* Whoops... - Adam Richards [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-03-2014, 21:47
JakeE's Avatar
JakeE JakeE is offline
Shut up and program.
FRC #4127 (LoggerBots)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Vernonia, OR
Posts: 3
JakeE is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-03-2014, 22:47
mgerber's Avatar
mgerber mgerber is offline
Shoddy Programmer
AKA: Max Gerber
FRC #0223 (Xtreme Heat)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: New Jersey
Posts: 21
mgerber is on a distinguished road
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-03-2014, 22:49
JakeE's Avatar
JakeE JakeE is offline
Shut up and program.
FRC #4127 (LoggerBots)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Vernonia, OR
Posts: 3
JakeE is an unknown quantity at this point
Re: Sequence Structure Using Limit Switch

Thank you so much! I'll give that a try!
Reply With Quote
  #4   Spotlight this post!  
Unread 05-03-2014, 23:08
mgerber's Avatar
mgerber mgerber is offline
Shoddy Programmer
AKA: Max Gerber
FRC #0223 (Xtreme Heat)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: New Jersey
Posts: 21
mgerber is on a distinguished road
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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