From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-17-2012 12:58 AM
error 1390 states: "You attempted to open a VI Server reference to an out-of-scope VI. A VI can open VI Server references only to other VIs that it could call as subVIs. After the reference is opened, that VI can return the reference to other VIs that could not normally open the reference. "
I am trying to programatically run a VI i copy, while the original VI is belonging to a library.
Error occures when i try to open the reference by VI address.
Obviously, after copy, the VI is still belonging to a library, therefore there is an invoke node to disconnect it from library before running, but im unable to acquire the reference in the first place.
I should note that removing the source VI from a library is not an option at this point.
In this topic was a similar error, back from 2009, but a solution was never posted.
http://forums.ni.com/t5/LabVIEW/Creating-VI-file-programmatically-still-owned-by-LVLIB/m-p/863050
What is preventing the reference from being acquired? and is there a workaround?
Solved! Go to Solution.
07-17-2012 03:12 AM
@UFOslava wrote:
[..]I should note that removing the source VI from a library is not an option at this point.[..]
"source VI" refers to the original VI in the library or does it refer to the copy you created?
Either way, i suggest to remove the copy from the library since it seems the easiest solution for the issue....
Norbert
07-17-2012 06:50 AM - edited 07-17-2012 06:54 AM
I've got a present. Its the piece of code that causing the problem.
"Source VI" i refered to is the VI that being copied and is a part of a library.
"Target VI" is the copied VI, that i try to run programatically.
The .rar i attached includes a piece of project that causing the error. The project is based around several libraries, containing VIs with matching names among libraries. I am required to copy them to a new location and to run them. I am unable to add all of them into project because of the matching names. Only solution is libraries.
Now, ever since i use the libraries (instead of files outside of the project), I am unable to copy and run them.
To reproduce the error, just run the "Run me.vi" in the project. It will attempt to copy a VI that is a part of a library, and open its reference. Upon opening the reference the error #1390 will be generated.
Is there a way to work around this?
07-17-2012 07:03 AM
Only 3 attachments per message...
Here are the rest.
07-17-2012 07:20 AM
Your approach is the reason for failing. You simply copy a VI out of context, but do not update anything else.
You have to duplicate the whole lvlib:
or you have to manage the new copy within the existing lvlib:
hope this helps,
Norbert
07-17-2012 09:40 AM
The piece of code i provided is incomplete. I tried to use the method to remove the VI from the lib, but couldnt acquire a reference in the first place.
About your examples, how do i acquire a library reference?
Managing my library from within labview may just be a solution...
07-17-2012 09:46 AM
You can use VI Server to load the library.
Norbert
07-18-2012 02:54 AM
After playing around with property nodes i've got a solution...
The VI seems to run ok if you save it via LabView property nodes and not via plain file copy. Then, i "befriended" the new copied VI with the original library, so it could use its contents (not sure if necesary). The whole thing seems to work ok.
Thanks for all your help.
Adding the solution VI and a screenshot.