Main Content

GPIB Interface

Communicate with instruments using the VISA-GPIB interface

GPIB is a standardized interface that allows you to connect and control multiple devices from various vendors. Communication is established through a VISA-GPIB object, visadev, which you create in the MATLAB® workspace. For information about creating the VISA-GPIB object, see Get Started with GPIB Interface.

You can write and read both binary and text data. For examples of both, see Write and Read GPIB Data.

Functions

expand all

visadevlistList available VISA resources
visadevCreate connection to device using VISA
configureTerminatorSet terminator for ASCII string communication with VISA resource
configureCallbackSet callback function and trigger condition for communication with VISA resource
visastatusCheck status of VISA resource
visatriggerSend trigger message to GPIB or VXI instruments
readRead data from VISA resource
readlineRead line of ASCII string data from VISA resource
readbinblockRead one binblock of data from VISA resource
writeWrite data to VISA resource
writelineWrite line of ASCII data to VISA resource
writebinblockWrite one binblock of data to VISA resource
writereadWrite command to VISA resource and read response
flushClear buffers for communication with VISA resource

Apps

Test and Measurement ToolControl oscilloscopes and other instruments

Topics

Get Started with GPIB Interface

Establish a connection between MATLAB and your instrument using the VISA-GPIB interface.

Write and Read GPIB Data

Write and read both text and binary data over the VISA-GPIB interface.

Use Callbacks for VISA Communication

Enhance your instrument control communication using events and callbacks.

Send Trigger Message

Send the trigger command to your VISA resource.

Execute Serial Polls

Execute a serial poll to check the status of your VISA resource.

GPIB Overview

Basic features of the General Purpose Interface Bus (GPIB).

Transition Your Code to VISA-GPIB Interface

Connect to a GPIB instrument using visadev instead of gpib.

Troubleshooting

Troubleshooting GPIB Interface

Troubleshoot the VISA-GPIB interface.