Solution
This broken run is due to the library in use not being loaded in the executable, even when included within the executable. Since the VIs or subVIs in the main VI that the executable was built from does not contain any of the subVIs from the library, it is therefore not loaded.
To circumvent this, it is suggested to avoid calling such VIs dynamically and instead use them as subVIs made into a library which can be added to the installer and executable.
However, if there is no other option and the VIs need to be called dynamically, then the following will resolve this error:
- In the block diagram of the main VI that the executable will be built from, add a case structure with false input.
- In the true case, add all the VIs that are needed from the different libraries that are being used.
- Leave the false case empty.
- Save the main VI and make a new build specification.
- In the advanced section, check the Enable Debugging box. Change the build's settings as necessary.
-
Build the executable. Run it.
For example, if you want to use the Mean (DBL) VI, the added code should look like this:
where the False case is empty.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
This forces the main VI to load the necessary functions and subVIs from the libraries, which can then be used when the VI that needs them is called dynamically.