LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exe file from app builder does not work

Solved!
Go to solution

Dear all,

 

I have a usb module to acquire data , it is the USB 2408-2AO from MC. I control the module with a VI and it works fine. I used the Application Builder to make a exe file out of the VI. THe exe file works also fine, but only on my own computer and not on other computers. 

I already did other exe files out of VIs and never had problems to run the exe on other machines. I also tried to make an installer out of the VI and not only a standalone application, but again the final application does not work. The application runs without problems on the target computer, no  errors are shown, but it just does not control the USB module as it should. I think the problem is that the Application builder does not include al necessary VIs in the installer, in particular the devices from MC to control the USB device. I tried to chose manually the VIs but it seems that all is included... I am sure the problem is the USB device, as I did other exe files and they all work fine (but they don't control the USB device) on other machines. Anyone has an idea how to solve the problem?

0 Kudos
Message 1 of 16
(3,916 Views)

Do you have the correct hardware drivers for the devices installed on the target machine? Unless you are calling VIs dynamically, all of the sub VIs called by your main VI will be included in the executable.

 

How do you address the device (e.g. COM port etc.), is it hardcoded in your application and could it be that the device address is different on the target machine?

 

Can you test that the device works (e.g. with a manufacturer supplied software) on the target PC?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 16
(3,910 Views)

Yes, the hardware drivers are the same for both the computers.

THe device is connected via USB. I don't think the adress is different on the target machine.

 

I can test the device on the target machine using the software called Instacal and it works. It is the communication with labview which does not work..

 

I attach here the VI. Any help is welcome as I am really overloaded with this

0 Kudos
Message 3 of 16
(3,905 Views)

 

How do the MC driver VIs interface with the device e.g. calling a DLL using the call library function node, VISA etc.?

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 16
(3,897 Views)

I guess the VIs call a dll. In the directory of the exe files there is a sub directory called "data" and in that sub directory I see a dll called ULx_LV.dll . ULx is the Universal Library from MC, so I think the correct dll is included in the application. 

0 Kudos
Message 5 of 16
(3,881 Views)

If you look in the install directory (i.e. in your LabVIEW environment) of the MC driver VIs - are there any other DLLs or anything in there - could it be that their DLL calls other DLLs which are missing?

 

Stiil, seems strange that you get no errors - I would have expected the DLL to return an error if it had a problem running or at least when you try to interface with the device.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 16
(3,877 Views)

In the ULx directory located in 

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\ULx

 

there is the ULx_LV.dll and other library files .llb (type labview LLB). I don't see these files in the exported directory "data" of the exe application. May it be that these files are missing and make the exe file does not work in the target computer?

 

Is it enough to manually add them in the "data" directory or should I build again another exe? In case, do you know how to add during the exe building?

 

Thanks

0 Kudos
Message 7 of 16
(3,875 Views)

The files in the LLB will be included if they are called by the application. You don't need to make a second executable (an LLB is just a file containing some LabVIEW VIs). 

 

Please save your VI for 2013 or take a screenshot - we need to see what you're doing to be able to help.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 16
(3,865 Views)

Here you have the .VI in 2013 version! Thanks for the help and patience!

0 Kudos
Message 9 of 16
(3,861 Views)

You have hardcoded paths for the devices in your VI - "Dev0/Ci1" and "Dev0/1stPortA/Do0" - these may not be the same on the target PC! Typically these sorts of things should be configurable.

 

Also, I would suggest that you have a look at some of the basic LabVIEW tutorials... amongst other things you are using a lot of sequence structures unnecessarily (Think Dataflow!) and you are missing any sort of execution timing in the while loop where your 'Start' button is (your application will hog the CPU until you press the start button even though it is doing nothing!).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 10 of 16
(3,849 Views)