01-27-2014 03:58 PM
Anyway Aristos, it was kind to give it a try !
I think this should be possible since a double click on a subvi opens a clone. I mean this subvi instance and this clone are linked somewhere... but this is not accessible to "simple" LabVIEW users...
01-29-2014 03:34 AM
Emmanuel,
not really being sure I understood your problem correctly I'd suggest a small SubVI (my solution is named 'curpath_advanced.vi') within your SubVI. Curpath_advanced itself can access some properties of its caller (AKA your instanced SubVI) by using the callchain node and some VI-server actions.
This way it can return the actual instance's name and could return the reference as well.
Here's the BD:
My library is still in LV7.11, but this was opened in LV2013. I also replaced a subVI with its relevant content. But I think this is easy to rebuild and to adapt to your requirements.
HTH and
Greetings from Germany!
--
LuI
01-29-2014 04:55 AM
Lul, thanks for your help but it won't help... your VI deals with VI refnum... here, we're talking about subVI refnums...
Greetings from France
01-29-2014 06:09 AM
Ha, got you!
Put the obove mentioned code in a NEW subVI that is placed into YOUR subVI. Than the first element of the array returned by the call_chain node is the instance the new SubVI is sitting in - which is what I understood you wanted to achieve. Give it a short try, it works in several projects I have done so far using multiple instances of given vit's.
With this technique you can retrieve the Ref of your SubVI and return it its callers.
--
LuI
01-29-2014 06:25 AM
Sorry Lul, what your code get is only VI refnum... not at all subVI refnum... those a re completely different objects...
You're speaking of the VI instance of a VI (yes, it's a subVI) and I am speaking of a diagram object subVI...
01-29-2014 06:37 AM
So it seems the naming conventions for scripting objects seems to be not that specific.
Sorry for my wrong understanding...
01-29-2014 06:54 AM
Please don't be sorry... it was so kind from you to take time on my problem.
To resume, in terms of typing, we could say (sorry this is from French LabVIEW) :
01-30-2014 10:53 AM
I don't believe it is possible from G code to get this info. I searched through all of our public (and not so public) properties and methods to see if there would be any tricky way to do this. I also talked to some of the compiler/execution guys but did not find anything useful for you. LabVIEW obviously has this information internally so that it can have a first rate debugger. However, that information is not exposed to G code.
There might be some interesting/tricky way to gather this info, but I cannot think of a way to do it and could not find anyone who could.
01-30-2014 12:00 PM
It seems that a VI express can do that (just take a look of a VI express) ... Am I wrong ?
02-05-2014 04:04 AM
Finally... if your VI is VI express then you can achieve this... what a mess !