06-29-2011 10:38 AM
I have a pretty complex program that I inherited at work. The program was developed by an outside contractor who left a spot for a vi to be made by us. It was made and inserted into the program, and everything runs well in the editor. All of the VI's are static except for the one made by us, as the programer left us a plug-in for it when he handed over the system. When I make a .exe file all of the programs work except for this one dynamic VI, which does not launch. I am using load and run.vi as well as get path.vi to ensure it is referencing the correct files, but it will not work.
I have thought about making the sub VI into its own .exe, but there is too much data flying around and being saved to make this posibble. I really just need to figure out how to get the subVI into the builds, but am not sure how.
Thanks for any suggestions
06-29-2011 10:50 AM
Dynamically loaded VI's aren't included in the .exe unless you specify it. Check Source file in the Build application properties and make sure the vi is marked as "Always include"
/Y
06-29-2011 11:19 AM - edited 06-29-2011 11:23 AM
I have tried this 5 or 6 times to no result. It just ignores the command to call the VI in. I have attached the bit of code that will not execute in the .exe file. i think it has to do wit the invoke node but i dont know... sorry, I cant send the full file.
06-29-2011 11:47 AM
So i created my .exe, and it didnt work. I moved the .exe into the same folder as the function i was trying to call, and now it calls it, but it cals the VI and the VI is too complicated for the driver to open, it needs labview. how do i make all of it executable?
06-29-2011 01:13 PM
@khoward.vi wrote:
I moved the .exe into the same folder as the function i was trying to call, and now it calls it,
This implies that the LoadAndRun VI (which you did not include) is creating a relative path rather than an absolute path.
but it cals the VI and the VI is too complicated for the driver to open, it needs labview.
I have no idea what this means. What driver? What do you mean too complicated? What needs LabVIEW?
06-29-2011 01:31 PM
The driver to run the .exe without labview. I have included the missing subvi.
06-30-2011 02:53 AM
A common problem is that the Get VI Path reacts differently in the develop environment compared to the .exe.
From Get Path's view the .exe is a folder, which it needs to handle (back up another folder if it's an executable). You're most probably using an erroneous path.
/Y
06-30-2011 09:26 AM
@khoward.vi wrote:
The driver to run the .exe without labview. I have included the missing subvi.
Where is Get VI Path? I'm guessing you're suffering from this: Why Does My Executable Not Work When Using the Current VI's Path Constant?
06-30-2011 10:27 AM
I actually figure it out. Instead of using run vi, i hard coded it in and now it is included correctly as a subVI in the application builder. Thanks everyone for your help!