This section provides an overview of the MATLAB® Instrument Driver Testing Tool and examples showing its capabilities and usage.
The MATLAB Instrument Driver Testing Tool provides a graphical environment for creating a test to verify the functionality of a MATLAB instrument driver.
The MATLAB Instrument Driver Testing Tool provides a way to do the following:
Verify property behavior.
Verify function behavior.
Save the test as a test file, a MATLAB code, or driver function.
Export the test results to MATLAB workspace, figure window, MAT-file, or the MATLAB Variables editor.
Save test results as an HTML page.
You can use the MATLAB Instrument Driver Testing Tool to test any MATLAB instrument driver, which include:
MATLAB interface drivers
MATLAB VXIplug&play drivers
MATLAB IVI® drivers
MATLAB VXIplug&play drivers and MATLAB IVI drivers
can be created from VXIplug&play and IVI drivers,
respectively, using the MATLAB Instrument Driver Editor or the
The driver test structure is composed of setup information and test steps.
When setting up or initializing the test, you provide a test name and description, identify the driver to test, define the interface to the instrument, and set the test preferences. This information remains unchanged throughout the execution of the test, and applies to every step.
The executable portion of the test is divided into any number of test steps. A test step can perform one of four verifications:
Set property — Verify that the set command or set code of a single device object or group object property in the driver does not error, and that the driver supports the defined range for the property value. You can use one value or all supported values for the property. You may also use invalid property values to check the driver's response.
Get property — Verify the reading of a single device object or group object property from the driver.
Properties sweep — Verify several properties in a single step.
Function — Verify the execution of a driver function.
After configuring your test steps, you can execute the steps individually, or run a complete test that executes all the steps in the test.
You start the MATLAB Instrument Driver Testing Tool by typing the MATLAB command
This opens the tool without any test file loaded.
You may specify a test file (usually created in an earlier session of the tool) when you start the tool so that it opens up with a test file already loaded.
For the examples in this chapter, you will create a test for the Tektronix® TDS210 oscilloscope driver that you created in MATLAB Instrument Driver Editor Overview.
You will create each kind of step in your test: set property, get property, sweep properties, and function.