LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Assembly won't load in LabView

I am trying to program some Newport piezo motion controllers.  They come with their own software that controls the stages and also installs some LabView examples and has a .dll that those examples call.  I wrote some very simple programs to do things like home the stages, get position, go to position, etc.  I deployed, and it was all working and I made many nice maps.  Now something has changed.  For a while I got an error when trying to load my uncompiled program that it could not find the sub-vis that I wrote and would open the dialog box, and the odd part is it would select the filetypes to be .dll or .exe, but it said it was looking for a .vi.  Once I select "all files" I could see the .vi right there where it was looking!  When I would double click the .vi, it would say it couldn't be found/loaded.  I got past that by putting the .dll directly in the folder with the .vi I was trying to load, and the program can now execute, but with errors in communication at the Constructor Node and Invoke Nodes that call the .dll.  The constructor has the "conexagpcmds.dll" title, and when I right-click and do "select constructor" it can find conexagpcmds.dll, but says there is an error loading.  This error occurs regardless of whether or not I select the copy of the .dll where Newport's installer placed it (in program files, I run LV as an admin) or in the .vi directory.

 

Two twists:

the .dlls must be installed correctly because Newport's installed applet works fine and calls the .dlls to run

this is on my lab computer, I typically do my development in my office, and when I load these exact .vis they are able to load the .dll correctly, so it works in my office but not my lab

but it used to work in my lab, I made several very nice maps and now something has changed.

 

I have attached the .dll and the example VI from Newport.  Mine are even simpler.  

 

Thanks,

Adam

0 Kudos
Message 1 of 4
(3,439 Views)

Note: I was not allowed to upload the .dll.  I have uploaded pictures of the block diagram and the constructor window.

Download All
0 Kudos
Message 2 of 4
(3,431 Views)

Are you sure the Newport app makes use of the same DLL and not some private copy of it or even a different interface althogether. Wouldn't surprise me from Newport to be honest. Despite what Newport support most likely will claim, this is a problem for them, not for LabVIEW. Nobody else but the makers of the DLL can really debug such issues.

 

The .Net library has been either not installed, has got corrupt or some of its dependencies got damaged, replaced or removed by some other installer. Try to reinstall the Newport drivers as a first measure (and cross your fingers that not something else gets damaged that had damaged your Newport drivers when you installed it).

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 4
(3,403 Views)

I had a similar issue loading a DLL and I fixed it by loading a core dependency (mscorlib.dll) to the same directory as the DLL I was trying to load.  Not sure why I had to do this, but I did.

Randall Pursley
0 Kudos
Message 4 of 4
(3,208 Views)