09-03-2013 12:37 PM
Hi all,
I am trying to make a stand alone labview application to run on another computer ( I have never done this before).
I went through the tools->build application prompts and was able to build an exe file.
the program is supposed to control a power meter and make power measurements then save them to a text file.
When I run the exe file, on the same computer I compiled the exe file on, the program generates a text file to save data to but it can not communicate with the power meter.
There are some sub-VIs and a dll file that are used to communicate with the power meter. Could it be that I am not telling labview to correctly
include these files when I create an executable?
What are some common problems that occur when generating stand alone applications that could be causing my issues?
And does anyone know of any good tutorials on generating stand alone applications in labview other than the NI help files?
Thanks for your help,
Solved! Go to Solution.
09-03-2013 12:42 PM
@edCubed wrote:
Hi all,
I am trying to make a stand alone labview application to run on another computer ( I have never done this before).
I went through the tools->build application prompts and was able to build an exe file.
the program is supposed to control a power meter and make power measurements then save them to a text file.
When I run the exe file, on the same computer I compiled the exe file on, the program generates a text file to save data to but it can not communicate with the power meter.
There are some sub-VIs and a dll file that are used to communicate with the power meter. Could it be that I am not telling labview to correctly
include these files when I create an executable?
What are some common problems that occur when generating stand alone applications that could be causing my issues?
And does anyone know of any good tutorials on generating stand alone applications in labview other than the NI help files?
Thanks for your help,
Make sure that the target computer power meter is using the same resources as the dev computer.
09-03-2013 12:45 PM
Also, if you used VISA, include the runtime with your installer.
09-03-2013 01:46 PM
Hi Bill, thanks for your suggestions.
I haven't tried to run this app on another computer yet. I'm just trying to run it on the computer it was developed on.
The computer I developed it on has all the drivers/resources I need to control the power meter.
Also, I don't know how to include the VISA runtime with my installer. could you explain how this is done?
This is the first time IV tried to turn any labview programs into stand alone exe files so I don't anything about how to do it other than what I've seen in youtube videos and help files.
If you know of any good tutorials that will help me figure this out I would appreciate it.
Thanks,
09-03-2013 02:26 PM
@edCubed wrote:
Hi Bill, thanks for your suggestions.
I haven't tried to run this app on another computer yet. I'm just trying to run it on the computer it was developed on.
The computer I developed it on has all the drivers/resources I need to control the power meter.
Also, I don't know how to include the VISA runtime with my installer. could you explain how this is done?
This is the first time IV tried to turn any labview programs into stand alone exe files so I don't anything about how to do it other than what I've seen in youtube videos and help files.
If you know of any good tutorials that will help me figure this out I would appreciate it.
Thanks,
My fault - I didn't read that this was the same computer. I know the very end of Core 3 studies shows how to build an executable and installer, but even that is very general. I'm not sure if there exists a tutorial on how to do it.
As for including the runtimes, when you build an installer, you have to include the runtimes that your executable will need. It's fairly straightforward.
Since it won't run on the machine that built it, I'll have to think about it a little bit...
09-03-2013 02:54 PM
Perhaps there is a path issue for your dll. LabVIEW modifies paths when building exes.
Try putting an indicator on your front panel that shows the calling path.
You can use the Property Node - Application>Kind to determine if you are in development or runtime modes.
steve
09-06-2013 03:43 PM
Troubleshooting EXEs can be a pain. One thing I use all the time is the built in feature for debugging an EXE from within LabVIEW. When you built the EXE there was under the Advanced section "Enable Debugging", and "Wait for debugger on launch", if you check these then build an EXE, when ran it will start the EXE but not run the program yet. In LabVIEW you can then go to Operate >> Debug Application. You should see your program listed then click Connect.
Now you will be able to add break points, and probes to your built EXE and see why it doesn't behave the way it did in souce. You cannot modify the code, because it is in an EXE but you can change your source and try again. Enabling debugging increases the EXE size by alot so once you have everything fixed you can turn debugging off and build the EXE again.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-06-2013 04:10 PM
Thanks for your help everyone. I now have my stand alone program working.
I thought all it took to make a stand alone program was an exe file. But for my application, which includes VISA commands, I had to make an exe file, and an installer including the Labview runtime engine.
Thanks again for your help.
Cheers!
09-06-2013 04:38 PM
@edCubed wrote:
Thanks for your help everyone. I now have my stand alone program working.
I thought all it took to make a stand alone program was an exe file. But for my application, which includes VISA commands, I had to make an exe file, and an installer including the Labview runtime engine.
I'm confused you clearly stated (more then once) that this was on the same computer you developed it on? How were you able to communicate to a VISA device in the development environment but not in an EXE when the LabVIEW runtime engine and VISA drivers were needed to develop in?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-06-2013 04:51 PM
On the computer I developed the labview software on I only made an exe file, I didn't make an installer. I could run this exe file on my development computer but the program did not communicate with my USB power meter.
Next I learned that I had to also make an installer. So I made an installer including the labview runtime engine and installed my program on a different computer. This installed program worked perfectly and communicated perfectly with my power meter.
I haven't actually tried using the installer to install this program on my development computer, but I'm assuming that if I do that it will work on my development computer as well.