Thread: Switch help
View Single Post
  #12   Spotlight this post!  
Unread 23-01-2014, 10:41
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: Switch help

I attached a VI snippet of the sort of thing I was talking about. It goes in Periodic Tasks as its own loop, not inside anything else.

It will not work in its current form. Both of the limit switch while loops are configured to continue while the switch value is true. Depending on whether the switch is normally open or normally closed, one or the other of the loops needs to be changed to terminate when the switch value is true instead.

You will also need to use the appropriate Refnum names on the left side, and set the motor output to the proper value to make it run in the direction and at the speed you want.
Attached Thumbnails
Click image for larger version

Name:	loop-de-loop.png
Views:	26
Size:	65.8 KB
ID:	15934  
Reply With Quote