LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening new VI and pass some Data

Solved!
Go to solution

I was able to open a new window VI using the VI reference. The problem is when I build an executable I have the error: "LabVIEW: (Hex 0x5A5) Open VI Reference no longer matches VIs in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning libraries." If I run directly from Labview, it runs okay.
I am building a path using the application directory with a build path, and as I mentioned if I run from Labview it runs okay, but if the executable gives that error mentioned.

I am sending data to the new VI using the VI Invoke Node, with the set Value. Is another better way to perform this task?

0 Kudos
Message 1 of 21
(3,055 Views)

If the VI you're trying to open with a reference is compiled into the .exe, then the path to it will include the .exe name as a path element.

e.g: "C:\My App Folder\My App.exe\My Module.vi".

You can use this paul_cardinale_0-1582211053515.png to determine whether you are running from the dev environment or from the compiled app; then construct the path appropriately.

 

As an alternative, load the VI dynamically.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 21
(3,032 Views)

Place an indicator on the screen of the filename that you are sending to open the vi reference and then rebuild your executable. I believe that this will give you a clue as to what the problem is.

0 Kudos
Message 3 of 21
(3,029 Views)

@paul_cardinale wrote:

You can use this paul_cardinale_0-1582211053515.png to determine whether you are running from the dev environment or from the compiled app; then construct the path appropriately.


Use the Diagram Disable Structure instead.  You can use the RunTime Engine == True case for when you are running in an executable and the Default case for running in the IDE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 21
(3,020 Views)

I suggest using static VI reference.

 

Static VI References will also include the VI in the build automatically. When a ref is opened by name or path, you have take care of that.

 

Even if you have to open a reference (to create a clone), I use a Static VI Reference, and then get the name or path from it to open the reference. The VI is always included, the name will always be in memory.

0 Kudos
Message 5 of 21
(3,017 Views)

I will do what in order to check what is happening. Thank you

0 Kudos
Message 6 of 21
(2,965 Views)

Thank you. I will try to figure out how to work with this property.

0 Kudos
Message 7 of 21
(2,964 Views)

I am new at Labview, sorry...
This feature is very nice. But I think I might find my problem. I am trying to check if the new VI is opened in a new window, so I use something like the attached files.

PMSilva_0-1582547764463.png

 

 

When I am running under Labview, I get from "idle" to "tun top level". When I am using the executable i always get "bad".

Download All
0 Kudos
Message 8 of 21
(2,917 Views)

So if I use something like this:

 

PMSilva_0-1582548479112.png

 

 

I can get access to the new VI, and don't get errors with the paths.
I will try to use this, approach. thank you

0 Kudos
Message 9 of 21
(2,915 Views)

Using Static VI Reference solvess my problem. However, if I press the button to stop the app (the typical one), when I push-it it will stop the app, but the next time that I start running the program I cheking for the "VI > Exec.State" and get "Run top level". If I close the labview and perform everything by hand I get "idle". So my question is, how I can stop the new VI to be loading or something like that?

 

 

PMSilva_0-1582561484898.png

 

0 Kudos
Message 10 of 21
(2,900 Views)