Access Properties or Methods of an Image Display Within a SubVI in LabVIEW

Updated Apr 21, 2023

Environment

Software

  • LabVIEW
  • Vision Development Module

Driver

  • NI-IMAQdx
  • NI-IMAQ

In LabVIEW, I want to programmatically control the properties or methods of an Image Display. I can do that in my Main VI, by creating a reference and connecting a property node. But when creating a SubVI to handle all Image Display-related methods or properties, I can’t find a way to access the ImageControl reference. How can I access the ImageControl reference?

To successfully handle all Image Display-related methods or properties in a SubVI, you need to create a generic control reference on the SubVIs Front panel and then, use the To More Specific Class to cast it to an ImageControl type.

To access the ImageControl reference in your SubVI follow the steps below:
 

  1. Create a generic control reference on the SubVIs Front panel
  2. Connect the Control Refnum to the connector pane of the SubVI
  3. Use the To More Specific Class
  4. Right-click on the upper input of the To More Specific ClassTarget Class, then click Create Constant to specify a target class.
  5. Generic Constant is created. Change it to Generic->GObject->Control->ImageControl

Now you are able to use a SubVI to handle all Image Display-related methods or properties in your Main VI.