LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I run totally sperate VI's from a compiled application

Solved!
Go to solution

Hi, I have hit a wall here and am not sure which direction I should be moving in.  A relevant detail, running LV8.2 and application builder on Vista/XP.  Any suggestions on the approach I should be taking would be most helpful.

 

I have a top level application (compiled in the application builder) from there I wish to run other VI's that are elsewhere in my local network file system.  So the top level application gives the user a standard interface, from which they can then run the other VI's which are task specific (but that detail does not matter to the user).

 

As time goes by I will be adding more of the task oriented vi's to the system and I want avoid having to make these task oriented vi's part of the top level application as maintenance will be more painful.  Having the ability to fix or add a new individual task oriented VI's without having to recompile the whole top level application is the aim.

 

On top of this I do need to pass some info to the task oriented VI and obtain some information back from it.

 

Some points that I can't get my head around at this stage are -

 

1.  The task oriented VI's - do I have to compile these with application builder or can I call an uncompiled VI and run it in the top level application(I think not)?

 

2.  How do I call the task oriented VI from the top level application - I have looked at "Open VI Reference" and "Open Application Reference" and am not sure how these apply to this situation.

 

  So any thoughts would be appreciated, otherwise I am stuck with a lot of tedious trial and error to figure this out.

 

  Many Thanks.

 

 

Herbert Niesler
0 Kudos
Message 1 of 7
(2,794 Views)

You can use the concept of "Plug-ins" in your current architecture.

 

I have attched a simple calculator vi which actually lets you know how to use this feature in LabVIEW.

 

I have created an exe for my Main.vi (called calc.exe)which would serve as the standard user interface. There are plugins by name Add, sub,mul and dev.vi

 

These vi are specifically kept in the Plugins directory so that "main" (the calc.exe) knows where to look for these vi's and if present they will get populated to the control called "operations".

 

So your task oriented vi's could be made as plugin vi's

 

Also, the the run time engine in LV can load files with ".vi" extension. so if you are creating a new vi to perform different task, create a seperate vi and then place them in the plugin folder. Please note that the connector pane must be identical for all the plugin vi's and if you think that your plugin vi's have different input and output terminals then create a cluster for all the inputs(or outputs) and flatten them to string or variant so that ou can maintain a same connector Pane pattern. 

Regards
Guru (CLA)
Message 2 of 7
(2,774 Views)

  Hi Guru,

 

        very good suggestion.  I will look at the details of how your suggestion translates to my implementation and get back to you.  I do think it will do the trick.  Had thought of another solution - pass the information through a file and launch the built task VI's using the "System Exec.vi".  Your solution sounds cleaner and better.

 

 

               Thanks  Very Much.

Herbert Niesler
0 Kudos
Message 3 of 7
(2,767 Views)
Solution
Accepted by topic author herbert.niesler@emsolutions.com.au

 

   Hi Guru,

 

            had to download an eval copy of LV to look at your work ( still on LV8.2 Smiley Sad).  I can see how it is done.  Very good.  It is along one line I was thinking, but there are obviously details that would have taken me some time to get on top of.  Thank you very much for putting in the effort to point me in the correct direction, I will use this approach.

 

            Herbert

Herbert Niesler
0 Kudos
Message 4 of 7
(2,734 Views)
welcome
Regards
Guru (CLA)
0 Kudos
Message 5 of 7
(2,715 Views)

 

 

 Hi Guru,

            here's an update.

 

  I came to discover that the suggested approach only worked if the task vi was a simple vi that did not call any other vi's.  The solution then was that the vi of interest and all other vi's that are to be used by the task vi have to be placed into a vi library (.llb) and then the same startup approach can be used, taking into account the path to the task vi has to now include the library name.

 

  The library is created by using a "source distribution" project.

 

         Cheers

Herbert Niesler
0 Kudos
Message 6 of 7
(2,664 Views)
Check out this post on multiple interacting VIs and the link in it to subpanel use.  The code there should point you in the right direction.  Note that VIs can be launched on remote machines as well as local ones, but you will need to use some other sort of communication, such as TCP/IP and/or network shared variables.
0 Kudos
Message 7 of 7
(2,644 Views)