LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Signaling a value change through VI Server

Solved!
Go to solution

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

Main example.JPG

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?

Target example.JPG

0 Kudos
Message 1 of 6
(3,378 Views)
Solution
Accepted by Citabria

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.

0 Kudos
Message 2 of 6
(3,361 Views)

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.

0 Kudos
Message 3 of 6
(3,350 Views)

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.

 

0 Kudos
Message 4 of 6
(3,090 Views)

Use To More Specific Class to change it to a Tab Control.

Message 5 of 6
(3,082 Views)

I also just found that one, but thanks alot anyways! 🙂

0 Kudos
Message 6 of 6
(3,076 Views)