Build a Palette Structure for LabVIEW Plug and Play Instrument Driver

Updated Jun 3, 2024

Environment

Software

  • LabVIEW

Driver

  • NI-VISA
  • Instrument Drivers

One important part of developing a LabVIEW Plug and Play Instrument Driver is building a clear and complete structure for your palette sets. This document provides a guide to organizing your palette set after you have added or removed to the set of VIs automatically generated by the Instrument Driver Wizard.
Please follow the procedure below to organize your instrument driver function palettes.
 

  1. Clean your driver's LabVIEW project directories for broken or erroneous palette files (*.mnu).
  2. Open the driver's associated LabVIEW project folder located in <LabVIEW>\instr.lib.
  3. Make sure that there is only one .mnu file in each folder for which you want a subpalette generated. The .mnu files should have names that match their parent folder's name.
Graphical user interface, text, application  Description automatically generated

Note: Sub-folders more than one level below the project's Public folder, such as the Low-Level folder, have .mnu files which follow this naming convention: <Parent Folder Name>_<Current Folder Name>
Graphical user interface, text, application  Description automatically generated
 
  1. Make sure there is only one dir.mnu file in the Public folder of the project.
Graphical user interface, text, application  Description automatically generated
  1. Open the .lvlib file. Right-click on the top-level file and select Properties to navigate to the Project Library Properties.
  2. In the General Settings tab, make sure that the Default Palette is set to dir.mnu.
Graphical user interface, application  Description automatically generated
  1. Navigate to your instrument driver files on your file system. Make sure that they are organized into a hierarchy of folders that match the palette structure you want. For example, for the Configure palette, the VIs should be placed in a folder with path <LabVIEW>\instr.lib\<instrument driver project folder>\Public\Configure.
  2. Make sure your LabVIEW project reflects the actual file system on disk. One way you can do this is to remove the Public virtual folder and add a snapshot of the updated folder back to the project. Refer to Adding Folders to a Project for more information.
  3. In LabVIEW, navigate to Tools >> Advanced >> Edit Palette Set. The Functions palette, Controls palette, and Edit Controls and Functions Palette Set window appears.
 
  1. In the Functions palette, navigate to the Instrument I/O palette. Right-click on the Instruments Drivers palette and un-check the Synchronize With Directory option.
  1. Compare your file system to your existing palette structure. Make sure that there is a subpalette for every folder in your instrument driver project and all the VIs in the folder are present in the palette.
To add VIs which are present in the folder, but not in the subpalette: right-click on a blank part of the subpalette and select Insert >> VI(s)

To add a subpalette for a folder that is on your file system:
  1. Right-click on the parent palette and select Insert >> Subpalette.
  2. In the Insert Subpalette window, select Create a new palette file (.mnu).
  3. Save the new .mnu file in the folder with the VIs which will be added to this subpalette. Name the subpalette after the folder that contains VIs which will go into it.
  4. Add the VIs from the folder to the new subpalette.
  1. Once you are satisfied with your palette structure, click Save Changes in the Edit Controls and Functions Palette Set window. Your palette set should now have the structure you made in your file system.