LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use Multiple DLL file in Lab view.

Solved!
Go to solution

The real problem is that the Windows DLL even gets into the data path. Since there is no sure way to determine if a DLL is a system DLL or not, LabVIEW does not try to do that but uses a simple rule. If inside the Call Library Node you define an absolute path to the DLL, it will consider it as an application specific DLL and copy it into the application build, if you only define the DLL name without any path it will consider it as a system DLL and not include it in the build.

 

So the real solution is to go through the VIs that call this DLL and check the library path to only be the DLL name without any path.

 

The path can end up in there if you browse to the DLL in the system directory and select it in this way. Don't do that or edit the library path to only contain the DLL name afterwards.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 16
(1,603 Views)

Thank you for help rolfk. I put name of the library file instead of the full Path of library in all VIs.  I am getting same error. I need to put MyDLL.dll file in data sub directory. it is not reading from Application.exe location.

 

Here I attach full project. If you are able to get success then I am happy to learn my mistake.
 

Thank you for help.    
Yash

0 Kudos
Message 12 of 16
(1,577 Views)

I'm still using LabVIEW 2016 for a large project I'm working on and can't upgrade my machine. So you will need to backsave the whole project if you want me to take a look at it.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 16
(1,571 Views)

Hi rolf,

Here I attached project for Labview version 16.00.


0 Kudos
Message 14 of 16
(1,560 Views)
Solution
Accepted by topic author Y@sh001

Ok this should work!

 

1) I removed the MyDLL2.dll from the lvlib, but that should not strictly be necessary

2) Add the MyDLL.dll to your project too.

3) Add the MyDLL.dll to by always included in your build settings

4) Change in the Build settings the support directory to be the same directory as your application directory

 

This will result that MyDLL.dll and MyDLL2.dll both get put into the main directory where your application.exe is located and then everything works.

 

Alternatively you can leave all above steps away and copy your myDLL.dll into the system directory or one of the directories mentioned in the PATH environment variables.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 15 of 16
(1,555 Views)

Hi rolfk,

Thank you for right direction, and your time. I followed your steps, and I am able run application properly.

 

-Yash   

0 Kudos
Message 16 of 16
(1,550 Views)