LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop run after elapsed time

Thanks Travs. That's what I thought.

Here's another question.

I would like the user to enter a # of event along with the time for each event to happen.
How to count up each event as it happens in the attach VI?
0 Kudos
Message 11 of 25
(2,607 Views)
Can you take a look at my VI.
I only want the Case structure to work when I turn the on/off button to off when it is running.
how can I wire that to work?
0 Kudos
Message 12 of 25
(2,600 Views)
Hi Kwok2,

All you need to do for "the Case structure to work when I turn the on/off button to off" is to wire the "On/Off" local variable from the upper loop out to the case structure and right-click on the TRUE case and choose "Make this case false".

If you want to act on the choice from the "Do you want to continue" popup window, you should wire the "T button?" output from the "Two Button Dialog" function to a "Not" function and then to the "Loop Condition" terminal.

I hope this helps.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 13 of 25
(2,590 Views)
First off, thanks for the reply Philip.

I wire "case structure after the not on/off local variable from the upper loop.
True case work fine. But false case "cancel" does not return back to the run in progess. it just stops the run. How can i have the false case work properly?
0 Kudos
Message 14 of 25
(2,581 Views)
Hi Kwok2,

Your VI will stop if the "Loop Condition" terminal in the big While Loop receives a boolean TRUE. It will get a TRUE if the AND function receives two TRUE values at the same time. That will be the case is both While loops that it is connected to terminated simultaneously. The choice from the popup message will have no influence on the termination of the VI because you haven't wired the output from the "Two Button Dialog" function to anything.

See the attached image for a suggested solution.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 15 of 25
(2,570 Views)
Philip,

I'm trying to figure out how run the fan time with each event. Resetting the time with each event.
Along with adding a time delay to each beginning fan time?
0 Kudos
Message 16 of 25
(2,555 Views)
Hi Kwok2,

I'm not sure that I understand exactly what you mean, but I have attached an example of what I think you are looking for; a method of resetting the Timer for every iteration of the While Loop. Please see the attached image ResetTimer.JPG.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 17 of 25
(2,534 Views)
thanks Philip.
I had a hard time but came up with an answer to make it work.
Now I need to know how to have complete control on the manual fan override toggle switch once the VI has started?
I mean when I toggle the switch to be off the external fan duration time idle as well. Until I toggle it back on to continue it's count.
Any idea?
0 Kudos
Message 18 of 25
(2,506 Views)
Hi Kwok2,

I'm sorry, but I don't understand what you are trying to accomplish. If you need to pass data between parallel loops, you can use Local Variables like you already do. Just set another Boolean indicator with the "Manual Fan Override" switch and use a Local Variable from the new indicator to control a Case Structure in the parallel loop.

Can you please reproduce the behavior you want in a smaller scale and focus only on the part that doesn't work? It's hard to understand what you are trying to do when you just send a screenshot of the whole VI.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 19 of 25
(2,496 Views)
Sorry for that! I will reduce the image for better focus.
And thanks for your inputs.
Let me see if I can do a better job of explaining my problem.

I'm try to use the manual fan override switch to pause the external fan duration time during a run. But will reassume the duration once it is turn back on.

Give me some ideas?
0 Kudos
Message 20 of 25
(2,490 Views)