09-28-2008 05:29 PM
I was just trying to build an executable, which just wouldn't build. Stating basically that my VI was broken, allthough it was not.
After raging and trying, I thought I'd remove a case structure set by a boolean constant. And it solved it!
However unwise it may be, the error should not occur or be much more to the point! It was tough debugging..
Using LV8.6 on XP
here's an example of the error:
Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
Error 1502 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Engine_Build.vi -> AB_Build_Invoke.vi -> AB_Build_Invoke.vi.ProxyCaller
Possible reason(s):
LabVIEW: Cannot save a bad VI without its block diagram.
09-29-2008 12:40 AM
I don't think your description is enough to understand the problem, but I have a reasonable guess.
In general, LV 8.x does not build code which will not execute and that's by design, so if you want the code to go into the executable, you can use a control instead of a constant or include it explicitly in the build (either explicitly or by placing it in a non-running VI).
The error itself refers to a "bad VI", which as far as I know is a VI which is broken. I would guess that means you have VIs with required inputs there which you didn't wire.
09-29-2008 03:54 AM
09-30-2008 07:35 AM
The code is fine. The compiler should dismiss the unused cases since it knows at compile time what case will execute. The issue is that the builder trips over it with this fuzzy error message. I agree with Albert: this is a compiler issue.
Aart-Jan