Hi all,
I would like to do something fairly simple -- I think! I have attached the relevant code below.
I have 2 parallel while loops in the mainVI. An event structure is in one of those loops. What I want is to have an event that fires only when the subVI is active. When the subVI is active, I will add code to the corresponding event which I want to happen when that subVI is active (i'll expand on this part below).
Thus far... I think this is definitely reasonable... the next part - I'm not so sure about.
when subVI is active, this what I want the corresponding code to do. I want to create(or open??) a reference to an indicator (an array in the example) in the subVI. Every time there is a change to the indicator in the subVI, I want have a value(signaling) event occur in mainVI which can be handled by a separate case in the event structure.
I know that last part is a bit confusing, and I know there are other ways to do it. i.e. I could just pass a control refnum for an array containted in the mainVI to the subVI and have that update accordingly, but I'm experimenting with getting data from a subVI without explicitly creating a local control and wiring a ctrl refnum to the subVI.
ideas...? suggestions?
thanks
-z
p.s. - the code posted below does not work b/c I couldn't figure out how to wire a reference of subVI to the register event case because subVI isn't open until it is called from mainVI.