LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI with .NET runs in Dev environment, builds, but doesn't work in runtime

I'm using the Watlow F4T drivers to control a thermal chamber. Watlow provides LabVIEW drivers and at their heart is a .NET .dll. My application runs just fine in the development environment. I created a build spec and it builds just fine. I can run the .exe in simulate mode (bypasses the Watlow drivers) with no problem. When I run the .exe with the Watlow drivers, the .exe crashes with an unknown exception. It's clearly related to the Watlow drivers (runs fine in sim mode). 

 

In the build spec, I put the .dll in the "Always Included" category. Are there other caveats with .NET when building executables? 

 

LV2016, 32 bit

0 Kudos
Message 1 of 12
(3,137 Views)

The driver i downloaded is not .dll based.

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=0150785855373A2DE0440003BA7CCD...

 

But I'm using LV2012. Not sure about LV2015/2016. Maybe they are different.

 

Joseph

0 Kudos
Message 2 of 12
(3,095 Views)

I downloaded the latest driver for a look-see. I don't have LabVIEW access at the moment but I can see that the package does not contain a custom .NET dll in the zip. If there are .NET calls  as you say then can you indicate what assembly they are statically linked to?

0 Kudos
Message 3 of 12
(3,090 Views)

Try placing the dll in the .exe folder.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 12
(3,077 Views)

Is the driver joezhang downloaded the driver we are talking about, or did you download a different one?

Chase
NI Technical Support Engineer
0 Kudos
Message 5 of 12
(3,062 Views)

Did you try using this method to enable .NET 4.0 not on your LabVIEW.exe, but creating a "Whatever.exe.config" for your build executable?

0 Kudos
Message 6 of 12
(3,057 Views)

Attached is the driver I am using.

0 Kudos
Message 7 of 12
(3,050 Views)

I'm using LV2016, so it uses CLR 4.0 and thus up to .NET 4.5. I'm not able to tell if the Watlow drivers point to an earlier .NET version. The link does say that assemblies pointing to earlier versions may not work with CLR 4.0. 

0 Kudos
Message 8 of 12
(3,047 Views)

I'm having the same issue.  I can run the driver just fine in the labview environment but when I build the application, it crashed.

 

I tried to move their dll to the exe but that didn't help.

 

Was this issue resolved?  If so, could you provide a quick overview of the solution?

0 Kudos
Message 9 of 12
(2,824 Views)

I ran out of time trying to figure it out so I switched to Modbus. I plan to revisit soon but can't say when. 

0 Kudos
Message 10 of 12
(2,813 Views)