From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Create and Edit Run-Time Menus in 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

Description

Overview

The example demonstrates how to use custom run-time menus.

 

Description

You can create your own menus in LabVIEW while your VI or exe is running.  You can choose to edit the menus that are already there (e.g. File, Edit, View, etc.) or you can create your own categories. This functionality is accessible by going to Edit»Run-Time Menu...

The Event Structure in LabVIEW can handle inputs to user-defined menus.  In the VI attached, change the state of each Boolean indicator by using the menu options.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Open the attached file
  2. Make sure that the Run-Time Menu File 'Custom menu.rtm' is in the same folder as the VI
    (If the file is not present you will not receive an error, but the custom run-time menu will be missing)
  3. Run the VI
  4. Look at the run-time menu. Instead of the standard menu (File, Edit, ...) you will see a menu with which you can switch the colored LEDs on and off

 

Additional Information or References

Custom Run-Time Menu - Front Panel Live.png

 

Custom Run-Time Menu - Block Diagram 2.png

  

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**

Wes Pierce
Principal Engineer
Pierce Controls

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

Comments
Mr.farmcorp
Member
Member
on

Great example. Thank you.