Modifying an Existing Driver

Before you build an instrument driver, check that no driver exists for your instrument. This might include checking both the manufacturer's Web site, as well as National Instruments Web site. While you are checking the Web sites, you should be on the lookout for instrument drivers that support a similar instrument. Instruments from the same model series often have similar command sets. Similarly, SCPI instruments of like functionality also have similar command sets. Obtain these drivers and assess the command set similarity to your instrument. For instruments from the same model series, you might need to contact the manufacturer and ask for details on the differences between the command sets. If you are comparing similar SCPI instruments, you will need to compare the instrument driver commands with those in your instrument's programming manual. You might want to modify an existing driver to optimize the code. For the driver to be used by a variety of users, a component VI might attempt to change a setting that is not necessary for your application. In general, you will only want to optimize those VIs that are called repeatedly in a loop. Configuration VIs are generally only called once and have little effect on application speed.

The simplest way to modify an instrument driver VI is to rename it by selecting Save As from the File menu. To identify the new VI you should change the name by either modifying the prefix or the description. For example, if you were modifying a Tektronix TDS oscilloscope instrument driver to work with a different instrument, you might want to rename the VI prefixes from TKTDS7XX to a name appropriate for your instrument. Once you have modified the name, you will want to modify the block diagram and front panel controls. Most changes to the block diagram will be related to the string functions.

Each Initialize VI optionally calls an Identification Query that is specific to an instrument model or model series. You will either need to turn off this option, or you will need to change the response to the identification query command. For SCPI instruments, this command is *IDN?.

The degree to which an instrument driver needs to be changed will depend on how similar the instruments and their command sets are. If the command sets are very different, you will be better off building your own instrument driver.