02-10-2015 04:41 AM
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?
Solved! Go to Solution.
02-10-2015 04:46 AM
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?
02-10-2015 04:55 AM
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
02-10-2015 05:00 AM
How do the MC driver VIs interface with the device e.g. calling a DLL using the call library function node, VISA etc.?
02-10-2015 07:03 AM
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.
02-10-2015 07:07 AM
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.
02-10-2015 07:13 AM
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
02-10-2015 07:22 AM
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.
02-10-2015 07:28 AM
Here you have the .VI in 2013 version! Thanks for the help and patience!
02-10-2015 07:50 AM
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!).