| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Instrument Control Toolbox |
| Contents | Index |
| Learn more about Instrument Control Toolbox |
| On this page… |
|---|
All instruments attached to your computer must communicate through an interface. Popular interface protocols include GPIB, VISA, RS-232 (serial), and RS-485 (serial). While Instrument Control Toolbox interface objects allow you to communicate with your equipment at a low (instrument command) level, Instrument Control Toolbox also allows you to communicate with your equipment without detailed knowledge of how the hardware interface operates.
Programmable devices understand a specific language, sometimes referred to as its command set. One common set is called SCPI (Standard Commands for Programmable Instruments).
Device objects allow you to configure and query an instrument without knowledge of its command set. This chapter covers the basic functionality of device objects that use MATLAB instrument drivers.
If your application is straightforward, or if you are already familiar with the topics mentioned above, you might want to begin with Creating and Connecting Device Objects. If you want a high-level description of all the steps you are likely to take when communicating with your instrument, refer to Instrument Control Session.
Device objects are used to represent instruments in MATLAB workspace. Properties and methods specific to an instrument are encapsulated within device objects. Device objects also free you from the specific underlying commands required to communicate with your hardware.
You can use device objects at the MATLAB Command Window, inside functions, scripts, and graphical user interface callbacks. The low-level communication is performed through a MATLAB instrument driver.

There are three types of MATLAB instrument drivers:
MATLAB interface instrument driver
MATLAB IVI instrument driver
MATLAB VXIplug&play instrument driver
Generic instrument driver
Instrument Control Toolbox device objects support all these types of MATLAB drivers, so that by using a device object, you can interface with any of these drivers in the same way. However, each of these drivers interfaces differently with the hardware. While MATLAB IVI and MATLAB VXIplug&play drivers interface directly through standard drivers and the hardware port to the instrument, the MATLAB interface driver requires an interface object to communicate with the instrument. You can use generic drivers to communicate with devices or software. For more information on generic drivers, see Using Generic Instrument Drivers.
The Instrument Control Toolbox software supports the following interface objects:
gpib
serial
tcpip
udp
visa
To learn how to create and use interface objects, see Using Interface Objects.
Note If you are using an interface object with a device object and a MATLAB interface driver, you do not need to connect the interface object to the interface using the fopen command. You need to connect the device object only. |
Several drivers ship with the Instrument Control Toolbox software. You can find these drivers by looking in the directory
matlabroot\toolbox\instrument\instrument\drivers
where matlabroot is the MATLAB installation directory, as seen when you type
matlabroot
at the MATLAB Command Window.
Many other drivers are available on the MathWorks Web site at
http://www.mathworks.com/matlabcentral/fileexchange
including drivers specifically for the Instrument Control Toolbox software.
![]() | Using Device Objects | Creating and Connecting Device Objects | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |