Example Code

Flexible Plugin UI Code Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
Starter for example on creating a plugin UI for LabVIEW that allows a flexible number of plugins to publish a simple user interface to an object in a 3D picture control, the user can then select between the various plugins to display more detailed information in the subpanel.

 
Description
Multiple plugins are loaded into an array of LV Classes which are then passed to the parallel For Loop, which passes in references to the relevant queues and user events, then launches the engine, simple UI and full UI for each class. Actions within the 3D picture control such as New Object, Translate Object, Rotate Object and Update Image are built into message classes which are then sent via a queue to the message handler loop.

Mouse Click events on the 3D picture control are registered so that when a double click on an object is detected it will insert the correct full UI vi front panel in to the sub panel so the user can see more detail about that plugin.

 
Requirements

  • LabVIEW 2013 SP1 (or compatible)


Steps to Implement or Execute Code

  1. Unzip the attached zip file
  2. Run Main.vi or Main wo_debug.vi. Main.vi also launches a separate front panel to show which loops are running at any one time.

 

Additional Information or References

Front Panel

FP.png 

VI Snippet

BD.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.