Instrument Driver Modification Instructions

Follow these instructions after creating an instrument driver using the Create New Instrument Driver Project wizard. Refer to the National Instruments Web site for more information about developing LabVIEW plug and play instrument drivers.

For assistance or feedback during any phase of the development process, please contact instrument.drivers@ni.com.

Modification Instructions

  1. Remove unsupported VIs
  2. Modify common driver VIs
  3. Modify instrument-specific VIs
  4. Create new instrument-specific VIs
  5. Create example VIs
  6. Update the VI Tree VI
  7. Update palette files
  8. Update or create a Readme file
  9. Submit the completed driver to the Instrument Driver Network at ni.com/idnet.

Removing Unsupported VIs

  1. Remove any instrument driver VIs in the project that the instrument does not support, including any common VIs such as Self-Test or Reset. You must identify the individual capabilities of your instrument to determine which VIs it supports. For example, the Digital Multimeter template includes VIs for making multipoint measurements. If you write a driver for a Digital Multimeter that does not support multipoint measurements, delete these VIs from both the driver project and driver directory.
  2. For each VI you removed, remove subVI calls to that VI from other instrument driver VIs in the project.
  3. Save the project (.lvproj) and project library (.lvlib) after removing files.

Modifying Common Driver VIs

  1. If you created the driver from a template, each common driver VI includes modification instructions in yellow text boxes on the front panel and/or block diagram. The common driver VIs include: Initialize, Close, Self-Test, Reset, Error Query, Revision Query, and Default Instrument Setup. Read the VI documentation, follow the modification instructions in each VI, and then delete the instructions.
  2. Follow these additional instructions:
  3. Save the project (.lvproj) and project library (.lvlib) after modifying files.

Modifying Instrument-specific VIs

Complete the following steps for each remaining VI in the driver.

  1. Open the VI and edit the front panel by adding, modifying, or removing controls and indicators as needed to perform the operation defined by the VI.
  2. Update the default values of the controls to match the default values of the instrument. Set the value on each control and then right-click the control and select Data Operations»Make Current Value Default from the shortcut menu.
  3. Update the control and indicator labels and descriptions to reflect any changes.
  4. Edit the VI icon as needed.
  5. If you removed or added controls and indicators, edit the connector pane to match.
  6. Edit the block diagram by updating the command strings and parsed responses to match instrument functionality.
  7. Edit the VI documentation as needed. An example of documentation you could enter for the Initialize VI is: This instrument driver supports serial communication. If you encounter problems when using serial communication, try using baud rates less than 19,200 and hardware handshaking.
  8. If you created the driver from a template, each VI includes modification instructions in yellow text boxes on the front panel and/or block diagram. Read the VI documentation, follow the modification instructions in the VI, and then delete the instructions.
  9. Save and test the VI.
  10. Save the project (.lvproj) and project library (.lvlib) after modifying files.

Creating New Instrument-specific VIs

  1. Use the Instrument Driver VI Wizard to create additional VIs that the instrument supports. If you created a driver from a class template, such as the Digital Multimeter template, the instrument probably supports additional functionality not covered by the class template. You should create additional VIs for each supported feature, using the existing VIs and structure for guidance. For example, oscilloscopes often have many types of triggers but the Oscilloscope template only includes support for edge triggering. If the instrument supports additional types of triggers, add this functionality with additional instrument driver VIs.
  2. Use polymorphic VIs to group related instrument driver VIs. For example, multiple trigger configuration VIs can be presented with one polymorphic VI.
  3. Save the project (.lvproj) and project library (.lvlib) after modifying files.

Below are some specific modifications for drivers created from the class templates.

If the instrument automatically disables one mode when enabling another mode, you can implicitly enable the status of the modulation and sweep VIs. To do this, remove the Enable <x> Mode control and delete the False case from the block diagram.

Creating Example VIs

  1. Create two or more example VIs that demonstrate how to use the instrument driver. Examples should help users understand the recommended calling sequence necessary to perform instrument operations. Include an example for each typical use case for the instrument to benefit a wide range of users.
  2. Include example VIs in the instrument driver project, but not in the project library.
  3. Select Tools»Prepare Example VIs for NI Example Finder to add an example data file (.bin3) to the examples directory in the instrument driver project.
Note Note  LabVIEW reserves the following prefixes and you cannot use them when you name the .bin3 file: ms, test, lv, daq, cvi, tree, fr, de, ja, vi, im, dsc, rt, _, ko, zh, it, and es.

Updating the VI Tree VI

  1. Open the VI Tree VI and update the block diagram to reflect changes to the instrument driver. The VI Tree is not a subVI in an application. It is intended as a quick overview of the hierarchy of the driver VIs.
  2. Remove any VIs that are not supported by the instrument, including any common VIs such as Self-Test or Reset.
  3. Add any public VIs that you added to the driver.
  4. Save and close the VI.

Updating Palette Files

  1. After all VIs are complete, update the function palette files (.mnu) to reflect changes to the instrument driver. All public instrument driver VIs should be accessible from the palette file. Do not include example VIs in the palette file.
  2. Remove links to any VIs you removed from the driver.
  3. Add palette files for subpalettes as needed to enhance the palette usability for new VIs. The palette file should match the layout of the VI Tree and the project folder hierarchy.

Updating or Creating the Readme file

  1. Open the Readme.html file in an html editor. The Readme file is an html file that includes a driver overview, requirements for use, supported features, revision history, and other information on using the driver. If you created the driver from a template, the driver includes a Readme.html file with fields that you need to modify denoted in red text. If you created the driver yourself, you need to create the Readme.html file.
  2. Update the appropriate fields in the Readme file with information specific to the instrument and instrument driver. If you created the driver from a template, update and replace all instances of red text in the file.
  3. Save the Readme file.
  4. Update the Readme file with revision history each time you modify the driver.

Submitting the Instrument Driver to the Instrument Driver Network

Whether you are an instrument manufacturer interested in making an instrument driver more accessible or you are an individual wanting to share your driver development efforts with others, consider submitting the driver to the Instrument Driver Network at ni.com/idnet.