10-25-2006 11:12 AM - edited 10-25-2006 11:12 AM
Message Edited by zskillz on 10-25-2006 11:12 AM
10-25-2006 11:14 AM
10-25-2006 11:28 AM
10-25-2006 12:12 PM
10-25-2006 12:54 PM
10-25-2006 05:29 PM
@Dennis Knutson wrote:
the attachment still didn't make it but there are a couple of ways you can do it without closing the subVI and using the wire. You can write to a global vairable in the subVI and read it in the main. You can create a control reference of an indicator of the main VI, wire this to the subVI and write to the reference's value property. You can start the subVI with an invoke node (run method) and then in the main, read the subVI's indicators with a Get Control Value (Variant) method. See this very recent post on the same subject for examples of the first two techniques.
10-26-2006 09:00 AM
I can't open your code because my eval version of 8.2 just expired.
I would agree that regular globals make code harder to follow and that's also true to some extent with control references. A few comments scattered on the diagrams could help. Have you looked at what is called LV2 Style Functional Globals? Basically, they are VIs with unitialized shift registers. Also, if you want, you can write to the shift register in the subVI the same way you are doing now and also write to a control reference. You can even pass data back though a wire from the subVI in the same manner when the subVI finishes.