LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure control from an another VI working in parallel

Hello,
First here is my goal:
I try to control a event structure in a VI with a boolean command from a second VI.
My first goal is to work with 2 VI in parallel, no subvi at all.
Below an simple example: I would like that the VI MyVItwo gives the result of a 2 numbers addition only when the boolean "MyBooléen" value changes in MyVIone.

If possible I would like to use in MyVItwo an Event Structure with the "event selector label" configured with "Value Changed". I have tryed to use the reference of the boolean "MyBooléen" from MyVIone to execute the MyVItwo event structure. I have not succeeded in it.
My questions:
Is there a way to use an Event Structure in my case?
If not how can I do that? (I would like to avoid global variables!)

Thank you very much,
PB
0 Kudos
Message 1 of 2
(2,473 Views)
Since you don't want global variables, you should learn about a type of global variable called "functional global". Basically, it's using a VI with a while loop that runs only once that has an uninitialized shift register. Because the shift register is uninitialized it keeps the data in it from the last time the VI was run and so the data can be accessed from different location. search the site for "functional globals".
You can use the data you pass to create a dynamic user event (in the Application Control>>Events pallete) or use the Value(signaling) property to generate a value change event.
If you don't want to use data transfer at all, you can use the reference to the original VI with a property node, to get the "panel" property which is a reference to the front panel which you can use to get an array of references for all the controls on the front panel of MyVItwo and you can choose one of those and use the Value(signaling) property on that one.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,465 Views)