This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Missing SubVI Broken Run In Executable Dynamic Calling Mean SubVI in LabVIEW

Updated Aug 19, 2022

Reported In

Software

  • LabVIEW
  • LabVIEW Runtime

Issue Details

In LabVIEW, I have a VI that dynamically calls two VIs, one of them contains the mean subVI, and the other contains custom code that calculates the same mean.
When using the custom VI, everything works fine both in development mode and as executable. When using the VI that contains the mean subVI, it works fine in development mode but gives a broken arrow with the below message when using an executable.
image.png

 

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:

  1. In the block diagram of the main VI that the executable will be built from, add a case structure with false input.
  2. In the true case, add all the VIs that are needed from the different libraries that are being used.
  3. Leave the false case empty.
  4. Save the main VI and make a new build specification.
  5. In the advanced section, check the Enable Debugging box. Change the build's settings as necessary.

image.png

  1. Build the executable. Run it.

For example, if you want to use the Mean (DBL) VI, the added code should look like this:
Broken Run KB.png
where the False case is empty.
NoteThis 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.