How to Update a Main VI Image Display From a SubVI in LabVIEW

Updated Aug 26, 2026

Environment

Software

  • Vision Development Module
  • LabVIEW

Driver

  • NI-IMAQ
  • NI-IMAQdx

This article explains how to acquire images in a subVI using NI-IMAQ or NI-IMAQdx and display those images in an Image Display control located on the calling (main) VI by using control references and Property Nodes.

 

In the subVI. To update an Image Display control located on the calling VI, configure the subVI to accept and use an Image Display reference.

 

  1. Add a generic Control Refnum control to the Front Panel, and assign it to the subVI connector pane.

  1. Place the To More Specific Class VI function on the Block Diagram and wire the Control Refnum input to it.
  2. Right-click the Target Class input and select Create>>Constant.
  3. Configure the constant as an ImageControl reference.

  1. Wire the output of the To More Specific Class function to a Property Node.
  2. Select the Value property from the Property Node.
  3. Wire the acquired image data to the Value property input.
The Property Node updates the Image Display control in the calling VI with the image supplied by the subVI.
 

In the calling (main) VI.

 

  1. Right-click the Image Display control or indicator and select Create>>Reference.

  1. Place your subVI on the Block Diagram.
  2. Wire the Image Display reference to the Control Refnum input of the subVI.

Note for NI-Vision 7.0 and earlier: This technique does not work with NI-Vision 7.0 or earlier. For these versions, use a global variable to pass image data between the Main VI and acquisition subVIs. The calling VI must continuously monitor the global variable for new image data

After completing these steps, images acquired in the subVI are displayed directly in the Image Display control located on the main VI without requiring image data to be returned through a standard image output terminal

The following VI snippets demonstrate how to pass an Image Display reference from a Main VI to a subVI. The subVI reads an image file and updates the Image Display control in the Main VI using a Property Node.
 
The reference created in the Main VI identifies which Image Display control will be updated when the subVI writes to the Value property.

Calling VI

SubVI

Note: The images above are LabVIEW snippets, which includes LabVIEW code that you can reuse in your project. To use a snippet, download the image from attachments, save it to your computer in the same file format, and drag the file onto your LabVIEW diagram.