Main Content

VISA Interface

Communicate with instruments that support the VISA standard

You can use the VISA interface with a variety of types of interfaces, such as TCP/IP, USB, GPIB, and others. You create a visadev object using arguments that determine the type of interface you are communicating over. For example, for a VISA-GPIB object, the visadev function takes a VISA resource string that includes the board index and address.

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
setDTRSet serial DTR pin
setRTSSet serial RTS pin
getpinstatusGet serial pin status

Topics

Connect to and Configure VISA Interfaces

Get Started with VISA

Get started with the Virtual Instrument Standard Architecture (VISA) interface.

Get Started with the TCP/IP Interface for VXI-11 and HiSLIP

Establish a connection between MATLAB® and your instrument using the VISA-TCP/IP interface.

Get Started with the TCP/IP Socket Interface

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

Get Started with the USB Interface

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

Get Started with the GPIB Interface

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

Get Started with the Serial Port Interface

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

Get Started with VXI and PXI Interfaces

Establish a connection between MATLAB and your instrument using the VISA-VXI or VISA-PXI interface.

Communicate with VISA Resource

Write and Read ASCII Data Using VISA

Explore ASCII write and read operations with a VISA object.

Write and Read Binary Data Using VISA

Explore binary write and read operations with a VISA object.

Transition Your Code to visadev Interface

Connect to a VISA device using visadev instead of visa.

Troubleshooting

Troubleshooting VISA Interface

Troubleshoot the VISA interface.

Resolve VISA Warning: Unable to Read Any Data

Troubleshoot when you receive some data and you get the warning message: 'visadev' unable to read any data.

Resolve VISA Warning: Unable to Read All Data

Troubleshoot when you receive some data and you get the warning message: 'visadev' unable to read all requested data.

Featured Examples