LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About Event

HI!
I got a question about Event structure,Attached is a simple example, there 's one VI in each of these two event.Is it possible to make the two VI(VI 1,VI 2) run at the same time? because when i run Example.VI,i can only make one of the VI run,if i want to run the other one,i have to close the current one,any suggestion? thanks!
0 Kudos
Message 1 of 7
(3,422 Views)
If you right click one of the cases and select Edit Events..., you can click the blue + in the top left area to add events to trigger a specific case. Then, put both VIs in the same case.

___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,398 Views)
If you want the subVIs to still run one at a time, but be able to open both, you'll have to call the subVIs by reference using property/invoke nodes.

Calling them as subVIs halts the diagram until they are finished executing, so you can't select another button to open the second one.


Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 7
(3,384 Views)
If I understand correctly this is the scenario that you're looking at. The user presses the vi1 button and vi1 begins running. This vi continues operating until the Stop button is pressed in vi1. You want the user to be able to press the vi2 button and have vi2 begin running also.

One possible solution is to use notifiers in your event structure instead of putting the vis there. You can then put the vis in parallel loops triggered by the notifier. I have attached a quick example to show how this would work. This approach allows each of the vis to be started and stopped as many times as you like in any order.

I would also recommend that you use a reference to the Stop button on the main vi to allow you to stop the subvis.

Message Edited by John Rich on 06-10-2005 11:59 AM

Message 4 of 7
(3,369 Views)
Hellow! I like to see your modified VI very much,but my Labview is 7.0,could you please make a 7.0 version VI?
0 Kudos
Message 5 of 7
(3,355 Views)
Here it is in 7.0. There were some errors, but I don't think that this will matter in what you need to see.
Message 6 of 7
(3,343 Views)
That works! thank you so much!
0 Kudos
Message 7 of 7
(3,340 Views)