From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building automatically vs Manually behavior difference

We are seeing a behavior difference when compiling our EXE manually vs automatically.  Specifically, when compiled automatically on LabVIEW 2016 Winx86 one of our Xcontrols does not behave correctly.  This does not happen on Winx64 or MacOS.  

 

We are using the Application Builder "Build.vi" with our project and buildspec as inputs.  I assumed this was due to something that gets sorted out by first opening the project file so I wrapped Build.vi with a vi that opens the project window and shows it first.  Then I call Build.vi to build the EXE.  Nonetheless, the Xcontrol in the resulting EXE doesn't work. If, however, I put a breakpoint in the building code just before it runs "Build.vi" and instead I right click on the Build Specification in the open project window and choose to build it that way, the resulting EXE has a perfectly good Xcontrol.

 

Can anyone suggest what might be different between executing Build.vi and right clicking on the Build Specification in the project window and selecting to build?  It seems like they should be identical, but, clearly something is different.

0 Kudos
Message 1 of 4
(2,300 Views)

You may not want to open the target project yourself because the build process references the .lvproj file programmatically. This might cause access conflicts. It’s actually a best practice to close all projects when running a programmatic build vi.

 

We could use a bit more info to figure out your problem:

Can you explain what is not working specifically with the Xcontrol in the exe? Do you get any errors in the build or at runtime?

Can you post a copy of the project with the associated Xcontrol?

Which specific versions of Windows did you build on?

 

Can you explain your overall goal with the program how the Xcontrol fits in? If we understand the full scope of the project, we might be able to find an alternative approach to achieve your goal.

Bill B.
National Instruments
0 Kudos
Message 2 of 4
(2,225 Views)

We don't have any project files open except our Autobuilder project (the thing which syncs and builds our program).  By "xcontrol not working" it appears that the xcontrol is unable to get data from the rest of the program to populate itself and thus shows blank data.

 

I discovered something else which is that If I close the autobuilder and then just open and run the one vi which opens our programs lvproj file and builds it the resulting exe works fine.  It only has this messed up xcontrol problem when our Autobuilder application is running and calls the vi previously mentioned within the context of the Autobuilder.  It seems like a cross linking problem, however, I've gone to pains to put everything in the Autobuilder into lvlibs to ensure there can be no cross linking.

 

As for the overall goal, the xcontrol assists a user with selecting data in a ring control which is populated by data from elsewhere in the program (what is not working) or allows them to switch to a numeric input.  We use this Xcontrol about 5 or so places throughout our program and have been doing so for about 5 years while upgrading through a few versions of labview.

0 Kudos
Message 3 of 4
(2,206 Views)

I think that your issue is coming from having a project open while running the build vi. It seems that having any project open during this time will throw an error. Here is a relevant article on the error:

 

http://digital.ni.com/public.nsf/allkb/CA9961D06FE230B4862571B5006819C0?OpenDocument

 

The normal workaround is to close all projects before running the vi. You could also try programmatically closing the projects. I've attached a snippet that does that.

Bill B.
National Instruments
0 Kudos
Message 4 of 4
(2,195 Views)