Instrument Control Toolbox

Preface

What Is the Instrument Control Toolbox?

Exploring the Toolbox

Related Products

Using This Guide

Expected Background

Learning the Instrument Control Toolbox

How This Guide Is Organized

Installation Information

Toolbox Installation

Hardware and Driver Installation

Typographical Conventions

Getting Started with the Instrument Control Toolbox

Toolbox Components

M-File Functions

The Interface Driver Adaptor

Communicating with Your Instrument

Communicating with a GPIB Instrument

Communicating with a GPIB-VXI Instrument

Communicating with a Serial Port Instrument

Understanding the Toolbox Capabilities

The Contents M-File

Documentation Examples

Demos

Examining Your Hardware Resources

General Toolbox Information

Interface Information

Adaptor Information

Instrument Object Information

Getting Help

The instrhelp Function

The propinfo Function

The Instrument Control Session

Creating an Instrument Object

Configuring Properties During Object Creation

Creating an Array of Instrument Objects

Connecting to the Instrument

Configuring and Returning Properties

Returning Property Names and Property Values

Configuring Property Values

Specifying Property Names

Default Property Values

The Property Inspector

Writing and Reading Data

Writing Data

Reading Data

Disconnecting and Cleaning Up

Disconnecting an Instrument Object

Cleaning Up the MATLAB Environment

Controlling GPIB Instruments

GPIB Overview

What Is GPIB?

Important GPIB Features

GPIB Lines

Status and Event Reporting

Using Vendor Tools to Identify and Test Your Resources

Creating a GPIB Object

The GPIB Object Display

Configuring the GPIB Address

Writing and Reading Data

Rules for Completing Write and Read Operations

Example: Writing and Reading Text Data

Example: Reading Binary Data

Example: Parsing Input Data Using scanstr

Example: Understanding EOI and EOS

Events and Callbacks

Example: Introduction to Events and Callbacks

Event Types and Callback Properties

Storing Event Information

Creating and Executing Callback Functions

Enabling Callback Functions After They Error

Example: Using Events and Callbacks to Read Binary Data

Triggers

Example: Executing a Trigger

Serial Polls

Example: Executing a Serial Poll

Controlling Instruments Using the VISA Standard

VISA Overview

Using Vendor Tools to Identify and Test Your Resources

The GPIB Interface

Creating a VISA-GPIB Object

The VISA-GPIB Address

The VXI Interface

Creating a VISA-VXI Object

The VISA-VXI Address

Register-Based Communication

The GPIB-VXI Interface

Creating a VISA-GPIB-VXI Object

The VISA-GPIB-VXI Address

The Serial Port Interface

Creating a VISA-Serial Object

Configuring Communication Settings

Controlling Serial Port Instruments

Serial Port Overview

What Is Serial Communication?

The Serial Port Interface Standard

Connecting Two Devices with a Serial Cable

Serial Port Signals and Pin Assignments

Serial Data Format

Finding Serial Port Information for Your Platform

Creating a Serial Port Object

The Serial Port Object Display

Configuring Communication Settings

Writing and Reading Data

Asynchronous Write and Read Operations

Rules for Completing Write and Read Operations

Example: Writing and Reading Text Data

Events and Callbacks

Event Types and Callback Properties

Storing Event Information

Example: Using Events and Callbacks

Using Control Pins

Signaling the Presence of Connected Devices

Controlling the Flow of Data: Handshaking

Controlling Instruments Using TCP/IP and UDP

TCP/IP and UDP Overview

Creating a TCP/IP Object

The TCP/IP Object Display

Example: Server Drops the Connection

Creating a UDP Object

The UDP Object Display

Example: Communicating Between Two Hosts

Writing and Reading Data

Rules for Completing Write and Read Operations

Example: Writing and Reading Data with a TCP/IP Object

Example: Writing and Reading Data with a UDP Object

Events and Callbacks

Event Types and Callback Properties

Storing Event Information

Example: Using Events and Callbacks

Saving and Loading the Session

Saving and Loading Instrument Objects

Saving Instrument Objects to an M-File

Saving Objects to a MAT-File

Debugging: Recording Information to Disk

Example: Introduction to Recording Information

Creating Multiple Record Files

Specifying a Filename

The Record File Format

Example: Recording Information to Disk

Function Reference

Functions - By Category

Base Functions

Object-Specific Functions

Functions - Alphabetical List

Property Reference

Properties - By Category

Base Properties

Object-Specific Properties

Properties - Alphabetical List

Selected Bibliography

 Index


 Preface