Right-click a LabVIEW instrument driver project library (.lvlib) in the Project Explorer window and select New»Instrument Driver VI from the shortcut menu to display the Instrument Driver VI Wizard.
On the Start page of the Instrument Driver VI Wizard, select one of the following options and click the Next button.
Create from an instrument driver template VI—Creates the instrument driver VI from a template VI.
Copy from an existing VI—Copies and configures an existing instrument driver VI and its subVIs.
Configure your own VI—Configures an instrument command, specifies how to parse a response, interacts with connected instruments, and generates the corresponding instrument I/O and string formatting/parsing code into a new instrument driver VI.
Add a blank VI—Creates an instrument driver VI that contains only a VISA resource name control and indicator and an error cluster control and indicator.
On the second page of the wizard:
If you selected Create from an instrument driver template VI on the Start page, select a VI from the available instrument driver VI templates on the Clone from Template page and click the Next button.
If you selected Copy from an existing VI on the Start page, click the Browse button on the Browse for VI page to navigate to and select the VI you want to add to the project and click the Next button.
If you selected Configure your own VI on the Start page, select Configuration VI or Measurement VI on the Select VI type page and click the Next button. Select Configuration VI to create a VI that sends a command to the instrument. Select Measurement VI to create a VI that sends a command to the instrument and then reads a response from the instrument.
If you selected Add a blank VI on the Start page, continue to step 6.
If you selected Configure your own VI on the Start page, configure the Control setup page and click the Next button. Otherwise, continue to the next step.
Type a command string to send to the instrument in the Command text with parameters in percents text box. Specify parameters in the command string by placing % characters around the parameter name. LabVIEW displays the parameter names you create in the Configure parameters list. For every parameter you create, LabVIEW adds a corresponding control to the front panel and connector pane of the final VI.
Select the appropriate data type for each parameter from the Data type pull-down menu.
Set a default value for each parameter in the numeric box next to the Data type pull-down menu.
Verify the configured command string in the Command preview text box.
If you selected Configuration VI on the Select VI type page, select the instrument from the pull-down menu in the Test the Command section. If you selected Measurement VI on the Select VI type page, click the Next button and select the instrument from the pull-down menu in the Test the Command section.
Click the Run Test button to test the command you configured. LabVIEW sends the command in the Command preview text box to the instrument and shows the number of bytes written to the instrument in the Bytes written box. If the command succeeds, the light turns a brighter green. If VISA returns an error, the light turns red. Click the Explain Error button to display the errors. If you selected Measurement VI on the Select VI type page, LabVIEW reads the response from the instrument and displays it in the Response text box. You can select the data type of the response in the Configure response data type section.
On the VI Properties page, edit the VI name, path, icon, and description and click the Next button.
On the Summary page, review the information about the new VI and click the Finish button to add the instrument driver VI and any subVIs to the instrument driver project and open the VI. If you created the VI from a template VI or an existing VI, LabVIEW renames subVIs that have the same name but a different connector pane as an existing VI in the project library. LabVIEW does not copy subVIs that have the same name and the same connector pane as an existing VI in the project library. The new VI uses the existing VIs in the project library in place of any subVIs that LabVIEW did not add.