LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data between subVIS using Event structures.

Dear Mr/Mrs:
I am working in a program where each button is handled by an Event structure (there is a subVI inside every event)
When the program is running, a subVI must be executed when a button is pressed. The problem is other options are blocked (even if I am using the unlock option) until the subVI is done.
If I want to pass data from one subVI to another subVI (Just in time) I have to wait until the actual running aplication is finished.
Do yo know how to solve it?

Thanks
0 Kudos
Message 1 of 3
(2,856 Views)
> I have to wait until the actual running aplication is finished.
> Do yo know how to solve it?
>


This sequential behavior will happen with or without the event structure
if you keep all of your code in one loop. If you break the tasks that
you want to be in parallel out to be in their own loop, or in their own
top level VI, then you can accomplish this.

I'll cover the parallel loop case. Take your subVI calls that you make
currently and place them in parallel loops. In the event structure
where you were calling them, bundle the parameters together and use a
notifier to send the structure. In the parallel loop, you will have the
matching read notification that takes the structure apart and wires to
the subVI, then loops and waits again. If you
want for multiple
executions to be queues, then use a queue instead of a notifier. You
will also need a way to abort all of the waiting parallel tasks, so it
would be a good idea to have a standard part of the cluster passed to
them to be an abort/execute parameter. When you want them to abort,
fire all the notifiers telling them to abort rather than execute.

Greg McKaskle
0 Kudos
Message 2 of 3
(2,856 Views)
You have posted this question twice:

Look also here:
Pass data between subVIS using Event structures
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 3
(2,856 Views)