From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Creating LabVIEW Executable for sub-20 Multi Interface USB Adapter

Hi

I'm using Sub-20 Multi Interface USB Adapter (www.xdimax.com) for GPIO and SPI. The code is based on .NET constructor Node. I can access the device and perform all the tasks but I'm unable to generate executable.

 

The application comes up with this error (on any machine including the development machine)

"This VI is not executable. The Full development version of LabVIEW is required to fix errors"

 

I'm using labVIEW 8.2 and .NET Framework 4 is also installed.

 

Thanks

0 Kudos
Message 1 of 15
(3,842 Views)

Hi AA76,

 

Quite often these errors are caused by missing files or dlls.  It is possible that it is failing to find the assembly for the driver.  There is a KB Requirements for Running a LabVIEW Executable that Uses .NET Assemblies that details where to locate these.  Does this look like it could be an issue?

 

Regards,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 15
(3,816 Views)

Hi James

Thanks for your reply. The problem seems to be as you suggested. The code is fine but LabVIEW is not generating executable as there is no error code so it is difficult to debug. I have attached the part of the code as image. I can attach the VI if required. I have tried everything I can think of but unable to generate executable. 

 

Thanks

0 Kudos
Message 3 of 15
(3,809 Views)

Hi AA76,

 

Can I confirm, are you building an executable and then the executable is not working?  I which case have you checked the items in the KB I linked to in my previous post?

 

Otherwise are you saying that you cannot create an executable in the first place?


Regards,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 4 of 15
(3,801 Views)

Hi James

I tried building an executable and as well as an installer. When I run the executable I get the error message (refer to my first post) while there is no executable / setup file when I create installer. The software provided by (www.xdimax.com) is already installed on the target machine. I have installed the latest .NET framework 4 on the target machine. I included the only DLL file but it is not working. Basically as you mentioned I cannot create an executable.

 

I may be doing something wrong or may be I have missed something.

 

Thanks

 

0 Kudos
Message 5 of 15
(3,793 Views)

HI AA76,

 

We need to check that the xdimax software has installed correctly to the global assembly cache.  To check this, on the target machine, browse to C:\Windows\assembly and check if the assembly is there.  Hopefully it is not and the simple fix then will be it copy the dll to the GAC or the same directory as the executable and this should then find it as in the KB.  If not then we will need to figure out how to get some more information back as to what is causing the break.


Regards,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 6 of 15
(3,768 Views)

Hi James

The assembly is not in the C:\windows\assembly folder. I tried but was unable to copy the Dll in this folder. Copying the Dll in the same folder as executable is also not working.

 

Thank

0 Kudos
Message 7 of 15
(3,757 Views)

Hi AA76,

 

That is good to know, at least we know the cause of the error.  The KB - How LabVIEW Locates .NET Assemblies shows the LabVIEW search directories.  I suspect what is probably happening in this case is the relative path.  If the system is looking for the same relative path this is probably different. You say that even on the development machine the .exe does not load the library.  Is this when you have just created the .exe or after running the installer?  If it is after running the installer what about before you build the installer?

 

Finally where is the assembly located?


Regards,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 8 of 15
(3,751 Views)

Hi James

Thanks for your quick reply. I created the executable and then copied the DLL file in that folder. I will create executable again and this time I will copy the DLL in the folder before creating the executable hope this works

 

Thanks again

 

 

0 Kudos
Message 9 of 15
(3,749 Views)

HI AA76,

 

Yeah that sounds like a good idea but make sure you re-browse to it in your .net constructor node to make sure that the  VI is pointing at the copy in the same directory and not the existing copy.


Regards,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 10 of 15
(3,746 Views)