Incorrectly Compiled VI Error When Called from VBAI Run LabVIEW Step

Updated May 3, 2018

Reported In

Software

  • Vision Builder for Automated Inspection 2015 SP1
  • Vision Builder for Automated Inspection 2014 SP1
  • Vision Builder for Automated Inspection 2015

Issue Details

I would like to call a VI from within my Vision Builder for Automated Inspection (VBAI) inspection using the Run LabVIEW VI step. VBAI reports that the VI was not compiled for the specific remote target or saved with LabVIEW 2015 displaying the following error message:

Solution

A possible reason this may be occurring is that VBAI cannot find all of the necessary subVIs to compile your selected VI. To correct this behavior, include your top level VI in an LLB source distribution. If you want to run the inspection that includes the Run LabVIEW VI step on an embedded vision target, please refer to the section Prerequisites for embedded vision targets, otherwise please continue with the How to save a LabVIEW VI for the VBAI Run LabVIEW VI Step section.

Prerequisites for embedded vision targets

Any VI called in the Run LabVIEW VI step in VBAI on an embedded vision target (Smart Camera, CVS, EVS or Industrial Controller) must be saved as a source distribution on the target with all of its dependencies. To accomplish this you'll need to be able to create a source distribution targeted to your specific embedded vision target from a LabVIEW project. This requires the following software: The Vision Acquisition Software, in conjunction with LabVIEW Real Time, will enable you to configure remote imaging devices from the LabVIEW project so that you can deploy code to them successfully. If you just install LabVIEW Real Time without the Vision Acquisition Software, you won't be able to target any of our remote vision systems, even if they are connected and working. 

How to save a LabVIEW VI for the VBAI Run LabVIEW VI Step
 
  1. Launch LabVIEW.
  2. Open the VI. If the VI is already open, save the VI.
  3. Select File»New Project.
  4. Add the VI and any dependencies to the project. If you want to run the VI on an embedded target make sure that you added the VI under that target and not under My Computer.
  5. Save the project by selecting File»Save Project.
  6. Right-click Build Specifications underneath the VI you added to the project and select New»Source Distribution from the shortcut menu to display the Source Distribution Properties dialog box.
  7. Enter a Build Specification Name and Destination Directory.
  8. Select the Source Files category.
  9. In the Project Files list, select the top-level VI and any dependencies, and add the files to the Always Included list.
  10. Select the Destinations category.
  11. In the Destination type control, select LLB.
  12. Select the Source Files Settings category.
  13. In the Project Files list, click Dependencies.
  14. Enable the Apply prefix to all contained items checkbox and enter a prefix.
  15. Select the Additional Exclusions category and enable the following checkboxes:
  • Disconnect type definitions
  • Remove unused polymorphic VI instances
  • Remove unused members of project libraries
  • Modify project library file after removing unused members
Note: If you are using a version of LabVIEW earlier than LabVIEW 2010, disable the Modify project library file after removing unused members checkbox.
 
  1. Disable the following checkboxes:
  • Exclude files from VI.lib
  • Exclude files from instr.lib
  • Exclude files from user.lib
  1. Select the Preview category. Click Generate Preview to review the generated file hierarchy for the source distribution. To ensure the preview is accurate, save changes to VIs in memory before you create or edit a build specification.
  2. Click Build. You can find the resulting source distribution in the directory specified in the Destination directory control in the Information category of the build specification.​
Note: Before you can use the new LLB on a remote target, you must first download the LLB to the target using FTP (there is a convenient User VIs folder for this purpose on the target). Once you do this, you should be able to point the Run LabVIEW VI step in VBAI to the VI you just transferred over to your target and successfully run your LabVIEW VI from within VBAI. 
 

Additional Information

Since you are working in VBAI, you won't need to buy the Vision Development Module for LabVIEW unless:
  • You want to include image processing code in the LabVIEW VI you are calling from VBAI.
  • You want to convert your VBAI script to LabVIEW code.

WAS THIS ARTICLE HELPFUL?

Not Helpful