LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build error

Hi, I am trying to build a binary executable in a 2011 LV project,

But got error code 1502 and message "Possible reason: cannot save a bad VI without its block diagram."

But I can see the block diagram of the sub-VI in question and the whole VI project runs OK. 

What cause the error?

Thanks.  Tim

 

0 Kudos
Message 1 of 7
(2,988 Views)

Others have had this issue. One workaround mentioned was to keep the block diagram of the offending VI (Under Source File Settings). And, if possible, can you post the project or a small example that demonstrates the issue?

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

Thanks.  I did more search after posting and found the answer.

It was because I had a CASE structure with a TRUE/FALSE constant as input.

 

0 Kudos
Message 3 of 7
(2,964 Views)

Hello Tim,

 

Thanks for posting at NI forums! This usually occurs when the VI is corrupted, and then the Application Builder will not be able to properly build the executable. Please try the next steps in the Build Specifications to avoid this error:

 

Navigate to the Additional Exclusions category and uncheck both Disconnect Type Definitions and Remove Unused Members of Project Libraries. Do not uncheck Remove Unused Polymorphic VI Instances.

 

Check Enable Debugging in the category Advanced. Checking this option will guarantee that the block diagram is included.

 

The final option is to include the front panel and block diagram of the VI that is causing the error. To do that, you will need to navigate to the Source File Settings category and select the VI. Uncheck the option Remove Block Diagram. If the VI is not listed in the Project Files section, then select Dependencies. Uncheck the

 

Remove Front Panel and Remove Block Diagram boxes.

Sometimes this error has also being seen when the application has a VI that has code that will never execute, for example, a constant wired to the selector terminal of a case structure. Changing this type of things are always a good way to avoid this error.    

 

Best Regards,

 

Alina M

0 Kudos
Message 4 of 7
(2,959 Views)

Alina,

Thanks.  And thanks to everyone for quick responses.

Tim

 

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

Hello, dear

       According to your reply to the build error, I want to ask you one question which puzzled me for a long time.

The question is that how can we uncheck the choice of "Disconnect type definitions","Remove unused polymorphic VI instances", "Remove unused members of project libraries" and"Modify project library file after removing unused members".

       Thank you!


@amezam wrote:

Hello Tim,

 

Thanks for posting at NI forums! This usually occurs when the VI is corrupted, and then the Application Builder will not be able to properly build the executable. Please try the next steps in the Build Specifications to avoid this error:

 

Navigate to the Additional Exclusions category and uncheck both Disconnect Type Definitions and Remove Unused Members of Project Libraries. Do not uncheck Remove Unused Polymorphic VI Instances.

 

Check Enable Debugging in the category Advanced. Checking this option will guarantee that the block diagram is included.

 

The final option is to include the front panel and block diagram of the VI that is causing the error. To do that, you will need to navigate to the Source File Settings category and select the VI. Uncheck the option Remove Block Diagram. If the VI is not listed in the Project Files section, then select Dependencies. Uncheck the

 

Remove Front Panel and Remove Block Diagram boxes.

Sometimes this error has also being seen when the application has a VI that has code that will never execute, for example, a constant wired to the selector terminal of a case structure. Changing this type of things are always a good way to avoid this error.    

 

Best Regards,

 

Alina M




0 Kudos
Message 6 of 7
(2,896 Views)

Hi Evan,

 

Those checkboxes are located in the build specification for your application. Right click on the build-specification that corresponds to your executable, and select Properties. Then, as Alina mentioned, navigate to the Additional Exclusions category, where the checkboxes are located. You can see what I mean in the following picture:

 

 

Unchecking build options.PNG

 

I hope this helps!

 

David S.
0 Kudos
Message 7 of 7
(2,881 Views)