LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exe works only when debugging enabled

I have a VI that works great in Labview, but when I used the app builder, and ran it as an exe on the same computer, it generates errors.  I turned the debugging on in the build specifications, re-built it, and no more errors.  The error is somewhere in a VI server call that opens an asynchronous VI that reads from a VISA serial device.  It sure makes it hard to debug something when turning the debugger on solves the problem...   

 

Should I just be happy that it works, or should I try to fix whatever the problem is? 

 

TIA,

Tom

Thomas Lentzner - CLD
0 Kudos
Message 1 of 7
(2,662 Views)

What errors does it generate?  Those kinds of details can help others figure out what might be the problem.

0 Kudos
Message 2 of 7
(2,649 Views)

@Ravens Fan wrote:

What errors does it generate? 


I'm not sure.  It goes through my error handler and displays a pretty generic message that the connection to my instrument isn't working.  I'll have to go in and get a more detailed error message. 

 

Is there any disadvantage to building my application with the debugger on besides a slightly larger file size (mine goes from 600kb to 1200kb)? 

 

Tom

Thomas Lentzner - CLD
0 Kudos
Message 3 of 7
(2,632 Views)

Here's the error message:

 

"Invoke Node in SubVI Init.vi ->Main.vi <APPEND>

The front panel for ...SubVI.vi could not be loaded but is required for this property or method."

 

The invoke node is a "run VI" method

Thomas Lentzner - CLD
0 Kudos
Message 4 of 7
(2,624 Views)

Make sure that subVI is included in your build with settings so that the Front Panel is not removed.  It is under the Source File Settings in the Build Spec.

 

Post a copy of that subVI.  Apparently there is something in there such as a property node that requires the front panel.

0 Kudos
Message 5 of 7
(2,620 Views)

SubVI needs its front panel according to that message.  By default, LabVIEW removes front panels for most subVIs because it doesn't expect them to ever be shown.  If your subVI isn't setup to be shown when run or loaded, LabVIEW will remove the front panel.  LabVIEW can remove panels of dynamic VIs as well because it can't tell that it is being called.  So you need to explicitly tell the application builder to not remove the front panel of the Vi.

 

Go to the EXE build specification.  In the Source File Settings, find the VI in question.  Uncheck the box telling LabVIEW to use default settings and make sure it does not remove the front panel.

 

The reason it works with debugging is that debugging is including all the front panels to allow you to jump into the subVIs.

Message 6 of 7
(2,618 Views)

I think I got it sorted.  I had to move that subVI out from the dependancies and into the project proper.  Then I put it in the "always included" box in the source files section of the build properties.  I don't know why I decided to do that or why it works, but it seems to...

 

Is there any good documentation on using build specifications besides the LabVIEW help?   

Thomas Lentzner - CLD
0 Kudos
Message 7 of 7
(2,617 Views)