LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building App with Call by reference node

Hello,

I just recently received my LV 7.1 upgrade.. so I am now able to build applications. Now I have built apps in the past when all the SubVIs are within the main VI. but in one instance I have a VI that will call another VI of choice. if I build the Main VI and install it on a PC without LabVIEW, will it still be able to call the VI VIA the reference Node??

the Main VI basically allows the user to select which Assembly needs to be tested and calls the respective test VI. I have 4 different main test VIs that are called. each main test vi has multiple subVIs (embedded with the diagram, not called by reference) Once a main test is called it runs until the user 'quits' which returns back to the Main VI.

So I guess the question is when I build an executable for the Main VI, do I include all the Main test Vis as well?
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 1 of 5
(3,101 Views)
Here is the directory structure as it is currently

x:\Board tests
Main.vi
Main Config.txt
x:\Board tests\Main test 1
Main test 1.vi
x:\Board tests\Main test 1\subvis
sub1.vi
sub2.vi
(etc)
x:\Board tests\Main test 2
Main test 2.vi
x:\Board tests\Main test 2\subvis
sub1.vi
sub2.vi
(etc)
x:\Board tests\Main test 3
Main test 3.vi
x:\Board tests\Main test 3\subvis
sub1.vi
sub2.vi
(etc)
x:\Board tests\Main test 4
Main test 4.vi
x:\Board tests\Main test 4\subvis
sub1.vi
sub2.vi
(etc)
x:\Board tests\Common VIs
common1.vi
common2.vi
(etc)


the Main Vi is the selector for the Main Test VIs..

the Common VIs folder has common vis shared between the 4 Main test Vis.
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 2 of 5
(3,088 Views)
Yes, everything needs to be included. Vi's that are only called by reference are not included automatically by the builder, thus you need to explicitly included them (e.g.using "Add dynamic VI").

Alternatively, you can "hide" them on the main diagram, forcing the builder to include them automatically. Have a look at this old fitting example, which either fits a lorentzian or a gaussian line and the proper model function is called by reference node. See the comments in the upper left of the diagram.
0 Kudos
Message 3 of 5
(3,081 Views)
When you build an application with dynamic calls, you have a couple of options for the dynamic VIs. You can add them to the build on the Source Files tab and clicking the Add Dynamic VIs button. This is the easiest way to get the dynamic VIs and their subVIs included. If the dynamic VIs are stable and you don't need to option to add or remove them, this is the way to go. If you want the ability to add new tests with having to do another build, you can exclude them from the build and distribute the dynamic VIs in an llb (along with all of their subVIs). There's a shipping example called Plug In Example that you can look at. In either case, you might need to change the way you are specifying the path to the dynamic VI. If you use the function Current VI's Path, it will return a different path when building an executable.
Message 4 of 5
(3,077 Views)
Thanks!!

I did find that I needed to add them as Dynamic files.. I built my app and all is good so far. I just need to move it to a machine without LV installed and test it. The nice thing is having the installer so I can have everything set to my liking.

if I have to add more Main tests I will need to rebuild it anyway, but all I will need to do is add the new VIs..

I feel like a kid on Christmas since I now finally have upgraded from 6.0.1 FDS to the 7.1 Dev Suite.

thanks again
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 5 of 5
(3,066 Views)