cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

VI self-reference

Hi!

I work with LabView 6.02 and would like to get a reference to the current VI inside it
(like "this" pointer in C++). Is there some built-in way to do it or do I need to open reference
to the VI itself using it's path ?

Sincerely,
Sergey.
0 kudos
Mensaje 1 de 6
3.445 Vistas
If you drop a VI invoke or property node on the diagram leaving the ref input unwired, the node will implicitely apply to "this" VI.

Jean-Pierre


LabVIEW, C'est LabVIEW

Mensaje 2 de 6
3.445 Vistas
A little bit of caution, however. If you intend to open a self-reference in order to keep the VI running Top Level in background, use an explicitly opened reference. Implicit refnums are different from explicit refnums as thay do not keep a VI in memory if its panel is closed.

Jean-Pierre


LabVIEW, C'est LabVIEW

0 kudos
Mensaje 4 de 6
3.445 Vistas
> A little bit of caution, however. If you intend to open a
> self-reference in order to keep the VI running Top Level in
> background, use an explicitly opened reference. Implicit refnums are
> different from explicit refnums as thay do not keep a VI in memory if
> its panel is closed.
>

I've tried it, but got a "Not a refnum" error message. I saw this solution in DejaNews
archives of 1999, but then it was related to LabView 5. Maybe it's different in 6i ?
Do you have a working example ?

Thank you,
Sergey.
0 kudos
Mensaje 5 de 6
3.445 Vistas
Ooops, now it does work !


"Sergey Rosenblum" wrote in message news:9s9go6$q3l$1@news.huji.ac.il...
> > A little bit of caution, however. If you intend to open a
> > self-reference in order to keep the VI running Top Level in
> > background, use an explicitly opened reference. Implicit refnums are
> > different from explicit refnums as thay do not keep a VI in memory if
> > its panel is closed.
> >
>
> I've tried it, but got a "Not a refnum" error message. I saw this solution in DejaNews
> archives of 1999, but then it was related to LabView 5. Maybe it's different in 6i ?
> Do you have a working example ?
>
> Thank you,
> Sergey.
>
>
>
>
>
0 kudos
Mensaje 6 de 6
3.445 Vistas
As Jean-Pierre said, just drop a property or invoke node on the diagram. You just need to make sure you change the "VI Server Class" from "Application" to "VI" by selecting "Select VI Server Class>>VI" from the pop-up menu.

Brian
0 kudos
Mensaje 3 de 6
3.445 Vistas