From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need to install Labview run-time to use a dll?

I have good LV 6.1 experience but have little exposure to making dll. First, I want to know by a simple example how to make dll and make it's call in Labview. Second, if I want to use that dll in another software like VB, do I need to install labview run-time to execute the dll?
 
Thanks,
0 Kudos
Message 1 of 4
(2,545 Views)

Yes, you need the run-time engine in order to run the DLL, just like you need the VB RTE in order to use a VB DLL.

I don't have an example, but basically, you just set the app builder to DLL instead of EXE and put in as many VIs as you like. The inputs and outputs serve as the arguments. The trick is the data type and there is probably some documentation about it, both in the manual and on this site. You can try here and here.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,543 Views)

I got familiar with some examples of how to make DLLs and call them in LV using Call library function node. When I tried to make a dll that passes arrays, I got some real trouble.

Are there any examples that I can refer? I have two arrays X and Y and a double int as an inputs and an array as an output.

Thanks,

0 Kudos
Message 3 of 4
(2,522 Views)
In the links I provided there are some examples for calling LV DLLs with arrays (at least in c\c++, I haven't seen VB).
 
If you insist on simulating this in LV, it's somewhat different, but you should also be able to find examples there, or by searching for DLL in the example finder. The basic trick in passing an array by reference is to allocate the right size for the structure before calling the DLL and passing that structure into the input terminal which is next to the output terminal where it should come out, so if you expect a 30 element 1D DBL array, initialize such an array and wire it into the DLL. This also works with clusters.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,510 Views)