Creating Instrument Driver VIs

You can use the Instrument Driver VI Wizard to create instrument driver VIs for an instrument driver project.

Complete the following steps to create an instrument driver VI using the Instrument Driver VI Wizard.

  1. Create or open an instrument driver project.
    You can create an instrument driver project using the Create New Instrument Driver Project wizard. You can search for and install existing instrument driver projects using the NI Instrument Driver Finder.
  2. 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.
  3. On the Start page of the Instrument Driver VI Wizard, select one of the following options and click the Next button.
  4. On the second page of the wizard:
  5. 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.
    1. 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.
    2. Select the appropriate data type for each parameter from the Data type pull-down menu.
    3. Set a default value for each parameter in the numeric box next to the Data type pull-down menu.
    4. Verify the configured command string in the Command preview text box.
    5. 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.
    6. 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.
  6. On the VI Properties page, edit the VI name, path, icon, and description and click the Next button.
  7. 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.