How to Build a Palette Structure for a LabVIEW Plug and Play Instrument Driver

Publish Date: Aug 01, 2013 | 6 Ratings | 3.33 out of 5 | Print | 1 Customer Review | Submit your review

Overview

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 may 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.  The first step is to clean your driver's LabVIEW project directories for broken or erroneous palette files (*.mnu). Open the driver's associated LabVIEW project (located in <LabVIEW>\instr.lib) and 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 which match their parent folder's name. For an example of this, please see Figure 1.

Note: Sub-folders more than one level below the project's Public folder, such as the Low Level folder in Figure 1, have .mnu files which follow this naming convention: <Parent Folder Name>_<Current Folder Name>

Figure 1

2.  Make sure there is only one dir.mnu file in the Public folder of the project (see Figure 3).

 

Figure 2

3.  Navigate to the Project Library Properties by right-clicking the .lvlib file and selecting Properties (see Figure 4). Make sure that the Default Palette is set to dir.mnu.


Figure 3

4.  Navigate to your instrument driver files on your file system. Make sure that they are organized into a hierarchy of folders which matches the palette structure you want. For example, for the Configure palette in Figure 4, the VIs should be placed in a folder with path <LabVIEW>\instr.lib\Fluke 123\Public\Configure.

 

5.  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. You can find more information on LabVIEW project folders and disk directories here.

6.  Go to any block diagram and select Tools»Advanced»Edit Palette Set. Notice that the Functions Palette, Controls Palette, and Edit Controls and Functions Palette Set Window appear.

7.  In the Functions Palette, click on the Instrument I/O palette, then on the Instrument Drivers palette. Disable the Synchronize With Directory option by right-clicking the palette and un-checking Synchronize With Directory. Please see Figure 4 for an example of where to find this.

Figure 4

8.  At this point, you need to do some comparison between your file system and your existing palette structure. Make sure that there is a subpalette for every folder in your instrument driver project, and that all the VIs in the folder are present in the palette.

Figure 5

     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: right-click on the parent palette and select Insert»Subpalette. In the Insert Subpalette window (shown in Figure 5), select Create a new palette file (.mnu). Save the new .mnu file in the folder with the VIs which will be added to this subpalette. Make sure you follow the naming conventions explained in step 1. Name the subpalette after the folder which holds the VIs which will go into it. Finally, add the VIs from the folder to the new subpalette.

9.  Once you are satisfied with your palette structure, make sure to save your changes, as shown in Figure 6:

Figure 6

10. Your palette set should now have the structure you made in your file system.

Back to Top

Customer Reviews
1 Review | Submit your review

Links to first three images are broken...  - Feb 10, 2015

...and therefore the images are not displayed which makes the article less of a good resource.

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit