LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an Application in LV 7.1

Hello,
I thought I built an application, however when I tried opening it, nothing opened and the bottom toolbar had a block showing that teh Application.exe should be open. When I right clicked on it and closed it, I received a message that there was an error. To bui;t this application, I openned my main program and wet to Tools>Built Application- then I chose a location for the .exe to be saved and then I pressed build.

Did I not follow the correct procedure? I have not been able to find any documentation about the building process.

I would be very grateful for any suggestions!

Thanks,

Ivanka
0 Kudos
Message 1 of 12
(4,079 Views)
You did follow what is basically the right procedure. There are a few things you need to be sure of. First of all, make sure that your VI is listed in the Source Files tab. In general, it's better to save your build settings in a .bld file, but this is supposed to happen automatically when you run the app builder from within a VI, so just check to make sure. Next, make sure the VI is set to open its front panel (in the VI properties) and that you have nothing in the code that's causing the front panel to disappear.
I suggest you try building a small VI with a while loop and a stop button into an EXE and see if that works. If it does, the problem is probably in your code or in the way you use the app builder, so I suggest you post the relevant code.

There is a document called LabVIEW App builder user guide, which you can access from the LV bookshelf (in the LV help menu). It's not very detailed, but it has some important stuff. The help buttons in the app builder itself give additional information.

___________________
Try to take over the world!
0 Kudos
Message 2 of 12
(4,061 Views)
Hello,
Thanks fo your response. I have done as you said. I checked to make sure the vi was listed- it was. Then I added all of the dynamic vi's (i'm pretty sure it was all- would it make a difference if I didn't load all dynamic vi's). Then I saved settings in .bld file. Then I changed the vi properties to teh default values (I built a simple while looped vi and it worked. SO i used the same vi properties in my own vi). I do not know what to do- and somehow I must have it done by wednesday!!! I would be very grateful for any advice you may have.
I have attached my top level vi. It works when it is not built, so I assume that it shouldn't be my programing that doesn't allow teh application to appear.

Have a great day!

Ivanka
0 Kudos
Message 3 of 12
(4,029 Views)

Your VI is very big, so it's hard to get into for someone who doesn't know it.
Here is what I suggest:
First, if you're using the default window settings, the window should not disappear.
It sounds like you're feeding F into the FP.Open Property or maybe Hidden into the FP.State. What I suggest you do is go through all the property and invoke nodes in this VI and in the subVIs and see if you can find if one of them is doing this.

Also, you definitely do need to include all dynamic VIs. While missing a VI should not create what you're seeing, it is possible, for example, that because a VI can't be found, there is an error which causes the behaviour you're seeing (although when a VI isn't found, you should get a dialog asking you to locate it).

In general, I would say your VI is very big and seems to have a lot of redundant code (I didn't look into it, so I can't say). I suggest you read the LabVIEW style guide, which gives some tips on application design.

I hope this helped.


___________________
Try to take over the world!
0 Kudos
Message 4 of 12
(4,023 Views)
Thank you for your reply. I am looking into the FP property node, however, I was thinking, that wouldn't the same problem happen when I run the vi as a vi, before I build the application. Unfortunately, I am not an experienced programmer, so I realize my style is sloppy, but right now I don't have the time to fix the mistakes.
Thank-you,
Ivanka
0 Kudos
Message 5 of 12
(4,012 Views)

@IBAHKA wrote:
wouldn't the same problem happen when I run the vi as a vi, before I build the application.

Not necessarily. There are differences between running a VI from LV and running it from the run time engine. The fact that you need to include dynamically called VIs, for example. Or the fact that the path structure changes slightly, because an EXE file acts like a directory. Or several other things. I'm thinking maybe one of them is causing your FP to be closed, but that's just a guess.
One suggestion I can make, but I doubt will help, is that you try copying your code and pasting it in a new VI. I highly doubt this will work, but you can try. Make sure you don't have anything important open, because when copying such a large amount of data you might crash LV.

___________________
Try to take over the world!
Message 6 of 12
(4,007 Views)
I looked for invoke nodes that open FP, but I didn't find any. I even added one- this didn't help. However, I just realized that within my dynamic vi's I have other dynamic vis. Does this mean that I should beuild exe's from the first dynamic vi's, and then use the exe's as dynamic vi's to the main file?
I hope you are able to follow.
Thanks,
IBAHKA
0 Kudos
Message 7 of 12
(3,987 Views)
I believe you only have to include dynamic VIs in your build if you don't plan on manually placing them where they should be. I think that if you don't, you need to include ALL dynamic VIs in the hierarchy when you build the EXE.
I still don't understand why missing VIs will cause what you're seeing.
Just to be on the safe side, can you post a screenshot of what it looks like when this happens?

___________________
Try to take over the world!
0 Kudos
Message 8 of 12
(3,980 Views)
could you tell me how to save the screen image? I could not figure it out. Thanks,
Ivanka
0 Kudos
Message 9 of 12
(3,961 Views)
Hi tst,
I have figured out what the problem is. The crash happens to vi's that have MatLAB script nodes. I created a random vi and built it- no troubles. Then I added sub vi's and again, I had no troubles. However as soon as I add a MatLAB scriptnode - be it even an empty script node, I am not able to open.
I hope this rings a bell for you- yes? is it a "eureka!!!"?

Thanks,
Ivanka
0 Kudos
Message 10 of 12
(3,952 Views)