LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically choosing the dll and function within the dll

LabVIEW 2013

I have a top-level UI application, basically a test executive, from which I want to execute external VIs, the tests, that are identified at run-time.  I think that means compiling my test VIs into DLLs and then accessing the test VIs from the DLLs.  The problem I have is that I do not know how to specify the VI to the Call Library Function at run-time.

Also, since all of this is LabVIEW code, is there an easier way than using the DLLs?  Maybe an llb or packed library?  And how would I use these?

0 Kudos
Message 1 of 24
(3,668 Views)

ave you looked into "Dynamic Load" or "dynamic dispatch" (search for dynamic, in LabVIEW Help:Find Examples)?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 24
(3,659 Views)

It sounds like you are trying to create a plug-in type system, where you can load a VI at run-time. You do not need to compile the VIs into a DLL if you plan to load them in a LabVIEW application. Instead you can load the VIs themselves. See the Plug In Example included with LabVIEW - open the example finder and search for "plugin".

0 Kudos
Message 3 of 24
(3,657 Views)

At run-time, the main app cannot load a vi, as a vi.  The vi will need to be in some compiled form.

If I make a dll, then I have no way of making the prototype for the dll call with the labview types I am using.

I have not found any way to use a llb or lvlib or lvlibp, programmatically.

0 Kudos
Message 4 of 24
(3,612 Views)

@hartzde wrote:

[..] The vi will need to be in some compiled form.

[..]

 

Default VIs include the compiled code.

Maybe you should also take a look into TestStand.

 

That being said, "Plug In" is (as already stated several times) the keyword you have to look for using Example finder, ni.com and even google.com (referring lavag.org and similar sites).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 24
(3,609 Views)

@hartzde wrote:

At run-time, the main app cannot load a vi, as a vi.  The vi will need to be in some compiled form.


Yes, it can. Again, see the plug-in example provided with LabVIEW, and try building it into an application to prove it works.

0 Kudos
Message 6 of 24
(3,608 Views)

Neither of those searches returns any results.

0 Kudos
Message 7 of 24
(3,605 Views)

@hartzde wrote:

Neither of those searches returns any results.


Neither of which searches?

0 Kudos
Message 8 of 24
(3,601 Views)

I do not get any results from searches for examples with "plug in", "plug-in", dynamic load" or "dynamic dispatch".

My main program will load VIs on my development system, but not on the target system. 

I want similar functionality to TestStand, but I do not need all of the bells and whistles, and expense of TestStand.  This is the first automated test at this company and I just want to get it set up for expansion in the future.  I may just have each test be a separate program that uses the common GUI as a lvlib.

0 Kudos
Message 9 of 24
(3,588 Views)

@hartzde wrote:

I do not get any results from searches for examples with "plug in", "plug-in", dynamic load" or "dynamic dispatch".


Please try just a bit harder, and search for "plugin" - exactly as I wrote in my earlier message. See image below:

plugin example finder.png

0 Kudos
Message 10 of 24
(3,585 Views)