View Single Post
  #2   Spotlight this post!  
Unread 10-02-2015, 16:26
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Flat Sequence Structure autonomous with limit switches

Place a While loop in the frame you want to leave when the switch is pressed. Inside the loop, put a 10 ms Wait so you don't keep things like communication and timed tasks from running. Also inside the loop, read the switch. Wire the value of the switch to the Stop terminal of the While loop.

Now, when the sequence reaches that frame, it will stay there until the switch is activated.

If your switch is active low and reads FALSE when pressed, change the loop's red Stop terminal to a green Continue terminal.
Reply With Quote