LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open VI Reference Error in the executable version only

Solved!
Go to solution

as the linked page says:

Yes, this function does work for LLBs and only for LabVIEW executables built using LabVIEW 8.0 and lower.

I'm using Labview 2014 so the function is not working 😞

I tried with the .exe file and i cannot list anything (just to be sure i tried with some path combinations like file.exe/myllb.llb or file.exe/includedvi.vi )

 

0 Kudos
Message 11 of 26
(3,782 Views)

When you build your exe, to troubleshoot only, try checking or adding llb to always include file for the exe build. If it works, you know that LV cannot open/find/map llb.

0 Kudos
Message 12 of 26
(3,777 Views)

uhmm not that easy.. in order to add the llb to the "always include" section, the llb is supposed to be part of the project. unfortunately when i try to insert the llb it automatically opens it and asks me to choose which file to add (or i can add them to the project inside a folder)..

0 Kudos
Message 13 of 26
(3,771 Views)

@cassaniti wrote:

uhmm not that easy.. in order to add the llb to the "always include" section, the llb is supposed to be part of the project. unfortunately when i try to insert the llb it automatically opens it and asks me to choose which file to add (or i can add them to the project inside a folder)..


Well I wonder if that your problem, the llb is not part of the project? As a trouble shoot manual add just the VI to "always include" see what happens, find out if the file not part of project because llb is not part of project.

 

Rich J

0 Kudos
Message 14 of 26
(3,764 Views)

The VIs are already included, what i do not know is the path of the VIs once the exe is compiled...

0 Kudos
Message 15 of 26
(3,761 Views)

The way you build the path is likely incorrect. Before you build exe the path name is (WorkingDir)\Anw.Name.vi\... after the build maybe your VI name is an exe (you named in the build) say its TopRunVI.exe. Now way to navigate to an exe path. In fact I'm uncertain how your path works because its in some other language.

 

Let me add...

Remove the VI name property in your path then recompile exe.

 

Also try adding your llb as a folder not file (but you've done this already).

0 Kudos
Message 16 of 26
(3,750 Views)

It's weird.. i thought what I've been doing with Dynamic VI Load and "Always include VIs" was kind of a standard but it seems like it's not... I try to be more exaustive with the information I have:

The MainVI and the LLB (with all the VIs that i want to load) are both in D:\LabVIEW Data\com_lv_sequenzer\trunk

In my project file I added the whole LLB as a folder (named Sequenzer_Functions) which includes all the VIs that i want to dynamically load

When i compile the MainVI i select each single VI that i want to dynamically load from the Sequenzer_Functions project folder and I add it to the "always include" list.

I run my exe and I want to dynamically load one of the Vis but i cannot locate their path 😞

0 Kudos
Message 17 of 26
(3,719 Views)

Hi people! After a few busy week i finally had time to create a small playground that I can share with you and that reproduces exactly the situation.

I am attaching a zip file with the Labview source code, which includes an LLB with two VIs (Sum.vi and Substract.vi), a Main.vi that calls dynamically one of the two VI according to the Enumerate selection and a LabviewProject file which includes the Main.vi and the two VIs inside a folder (created through right click-add-Data and by choosing the LLB file. The executable in the project is configured in order to include the files Sub.vi and Substract.vi

 

The Labview Environment mode runs flawless, while the compiled version is not working because the path is wrong. I tried the following combinations without success:

C:\..\DynamicLoad.exe\MyLLB\Sum.vi

C:\..\DynamicLoad.exe\Sum.vi

C:\..\DynamicLoad.exe\MyLLB.llb\Sum.vi

 

And I'm running out of ideas... I really hope you will be able to help me because this is driving me crazy!

Download All
0 Kudos
Message 18 of 26
(3,622 Views)

I see that you did not enable debugging on the executable, this allow you to debug the executable and not developement code. Open your Main build properties, under Advanced tab, select Enable Debugging. OPen/Run the exe, leave its FP open, go back to development FP under menu Operate\Debug Application or Shared Library to start debugging exe.

 

(I would put a break on Open Ref  VI cus VI will error at input wire). Probe the path.

 

On second thought, go to the build properties, click Preview, Generate Preview. It shows you the path where the files are going but less detailed.

 

After doing above immediately, files Sum.vi should go here to run, in a folder "builds\DynamicLoad\Main\DynamicLoad.exe\Sum.vi. But here's the catch, your using the Call By Reference Node (do Help) that takes only Strictly Typed Refnums (not compiled code). So to use it you can manually put the VI in the same folder as exe or use the Open VI Reference which is compiled code.

 

Rich J

 

Edit: because its a compiled exe, you can't library in same folder to make it work...

0 Kudos
Message 19 of 26
(3,607 Views)
Solution
Accepted by topic author cassaniti

Why are you not using the Current VI's Path function and build from there?  You should really only use the Application Directory for external files (like configuration files).

 

This code worked for me in both the development environment and the executable.


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
Message 20 of 26
(3,599 Views)