LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How/best-way to share data between event cases?

Solved!
Go to solution

...additionally, what would be the best way to disable one event case if another event case hasn't executed yet?

0 Kudos
Message 1 of 6
(3,925 Views)
There are many ways to share data between event cases. I am not sure there is a best way. People have their preferences. You can use queues or you can register events and use generate events or the least favorite way by many is to use local variables.
Tim
GHSP
0 Kudos
Message 2 of 6
(3,923 Views)
Can you be more specific?  The simplest way to share data between event cases would be a shift register on the outside of your while loop, but I'm not sure that's what you're asking.  Similarly, you could easily disable an event case by putting a case structure inside that event case, and wiring the selector to a shift register containing a boolean.  Initially it would be false, and then once the appropriate event had occurred you would set it to true.  A more complex approach would be to use dynamic event registration, and have the first event register for the second event.
Message 3 of 6
(3,917 Views)
...say an event case has taken place and the data in an array was updated...whats the best way to immediately make that data availble in a different event case?
0 Kudos
Message 4 of 6
(3,903 Views)
Solution
Accepted by topic author KSU Flyer

I'd store the array in an shift register in a while loop that encloses the event structure, then your data is easily available to any event.  However, you will need to wire the array data in and out of every event case, which can be done easily with linked tunnels.  If you need to display the array data as well, put an indicator inside the while loop but outside the event structure, connected to the shift register.

Message 5 of 6
(3,901 Views)
That is the way I would do it too.
Tim
GHSP
Message 6 of 6
(3,889 Views)