OK. Your email address is invalid. So let me describe the vi.
Start with a while loop.
Inside that, wire your boolean control switch (the mechanical action of
the switch must be "Switch until Released") to a true/false case structure.
In the true case, put another while loop.
Inside this interior while loop, put a sequence structure.
In sequence 0, OR the output of a local variable of the boolean control
switch with the output of a "= to zero" comparison of the interior while
loop counter, and wire the output of the OR to your valve.
In sequence 1, put your 1 sec delay.
In sequence 2, wire another local variable of the boolean control switch
through the border of the sequence structure to the loop control (Continue
if True) for the interior while loop. Take this same wire outside the
interior while loop to a local variable of the valve control.
Copy the entire structure for each valve.
You should be able to replace the true/false case structure with an event
structure and save cpu time.
Tom
"thoj" wrote in message
news:5065000000050000007DC00100-1079395200000@exchange.ni.com...
> in detail, my problem is this: i have 15 toggle switches, each one
> acting as a switch until released pushbutton. Whenever one of the
> buttons is pushed, it is supposed to trigger one of 15 corresponding
> valves to open for at least 1 second. if the switch is depressed for
> less than 1 sec. then the valve will open for exactly 1 sec. if the
> switch is depressed for 1-2 secs, then the valve will remain open for
> 2 secs, etc. Now, what i need to be able to do is have precision
> timing control over each switch button. For example, if i momentarily
> push switch 1 at t=0 secs and then at t=.3 secs push switch 2 and keep
> it depressed for 1.3 secs (until t=1.6 secs) and finally at t=1.4 secs
> depress switch 3 for .5 secs (until t=1.9 secs), here is what i need
> to happen. Switch 1 opens from t=0 to t=1 sec, valve 2 opens from
> t=.3 secs to t=2.3 secs and valve 3 opens from t=1.4 secs to t=2.4
> secs.
> Here is my problem. in my program i have tried to use while loops for
> each switch with a 1 sec. wait inside of each loop. The problem is
> that labview runs serially, so when switch one is depressed, the
> program enters loop 1 and will not recognize any more of my pushbutton
> commands until t=1 sec when the program exits loop 1. essnentially, i
> am currently forced to have all valves open only at one sec.
> intervals, and this doesn't work for me.
> So, if anyone has any more suggestions, i would love to try them out.
> in the first reply, Tom suggested trying event structures, but
> unfortunately i have not figured out how to put 15 separate switches
> into one event structure, if this was what he was suggesting.
> Thanks again for any help.
> JOe