09-24-2010 02:26 PM
I have a sub-vi with an event structure which is being called from a main vi through Call by Reference. I can change the values of the controls on the sub-vi but the sun-vi does not recognize the Value Change in the event structure. Is there any way to send a value change signal to the sub-vi from the main vi? My goal is to not have to make changed to the sub-vi. I have attached a pseudo-example to show you what I am trying to accomplish:
This is the main vi with a call by ref to the target vi
This is the target vi. A Value Change is not recognized when the control value is changed from Main vi. Is there any way to do this?
Solved! Go to Solution.
09-24-2010 03:28 PM
You need to use the Value (Signaling) property on the control reference.
One way to get the control reference is to get the Panel property of the VI reference, then the Controls[] Property of the panel. Then loop through the controls looking for one with the proper name.
09-24-2010 05:04 PM
I knew Value(signal) would work but I didn't know how or if it was even possible to get to the reference. Getting the control references from VI refnum did the trick. Thanks.
10-25-2011 10:58 AM - edited 10-25-2011 11:01 AM
Sorry for bringing up this old topic again, but this is the closest i could find about it.
I have a situation much like the original poster, and the solution given here works great in principle.
In my program, the button i want to trigger is inside a tab control page. This makes it not appear in the "Controls[]" array that i can get from the VI reference.
The tab control itself of course is part of Controls[] (and has a array of its members similar to Controls[]), but i do not know how to access that from the generic control reference i get out of the VI.
Is there a way to hard-cast the reference to a Tab Control reference or something like that?
Thanks in advance,
Oskar
e: I'm using LabView 8.6 if that is important.
10-25-2011 11:07 AM
Use To More Specific Class to change it to a Tab Control.
10-25-2011 11:16 AM
I also just found that one, but thanks alot anyways! 🙂