annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Signaling a value change through VI Server

Risolto!
Vai alla soluzione

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
Messaggio 1 di 6
4.173Visualizzazioni
Soluzione
Accettato da 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
Messaggio 2 di 6
4.156Visualizzazioni

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
Messaggio 3 di 6
4.145Visualizzazioni

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
Messaggio 4 di 6
3.885Visualizzazioni

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

Messaggio 5 di 6
3.877Visualizzazioni

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

0 Kudos
Messaggio 6 di 6
3.871Visualizzazioni