Products & Services Solutions Academia Support User Community Company

Learn more about Instrument Control Toolbox   

Device Objects

Overview

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.

What Are Device Objects?

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.

Device Objects for MATLAB Instrument Drivers

There are three types of MATLAB instrument drivers:

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:

To learn how to create and use interface objects, see Using Interface Objects.

Available MATLAB Instrument Drivers

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.

  


Recommended Products

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