View Single Post
  #4   Spotlight this post!  
Unread 14-02-2009, 04:16
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: LabView button for a double-acting cylinder

You keep track between loops which one was the last one to fire. You can have something like the code I posted before keep inverting a boolean value, and depending on that value, power the solenoid (in a case statement).

Like, if value is true, power A and not B. If value is false, power B not A.

And then you use the button code to change the value back and forth between true and false.

It hard part it wrap your mind around is using a momentary button as a latching switch..
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
Reply With Quote