Virtual Instrument Software Architecture (VISA) is an industry standard defined by the IVI foundation for communicating with instruments regardless of the interface.
The IVI standard defines an open driver architecture, a set of instrument classes, and shared software components. With IVI you can use instruments interchangeability into multiple systems using standardized code.
You can use the Quick-Control Oscilloscope for any oscilloscope that uses an underlying IVI-C driver. You can use the Quick-Control Function Generator for any function generator that uses an underlying IVI-C driver. You can use the Quick-Control RF Signal Generator for any RF signal generator that uses an underlying IVI-C driver.
VISA is supported on these platforms:
macOS 64-bit (only with National Instruments™ VISA and Rohde & Schwarz R&S VISA)
Microsoft® Windows® 64-bit
IVI is supported on these platforms:
Microsoft Windows 64-bit
The Quick Control interfaces are supported on these platforms:
Microsoft Windows 64-bit
IVI-C
Instrument Control Toolbox™ software supports IVI-C drivers, with class-compliant and instrument-specific functionality.
IVI® class-compliant drivers support common functionality across a family of related instruments. Use class-compliant drivers to access the basic functionality of an instrument, and the ability to swap instruments without changing the code in your application. With an IVI instrument-specific driver or interface, you can access the unique functionality of the instrument. The instrument-specific driver generally does not accommodate instrument substitution.
For IVI-C drivers, you can use IVI-C class drivers and IVI-C specific drivers. Device objects you construct to call IVI-C class drivers offer interchangeability between similar instruments, and work with all instruments consistent with that class driver. Device objects you construct to call IVI-C specific drivers directly generally offer less interchangeability, but provide access to the unique methods and properties of a specific instrument.
Other things to note:
IVI-COM is no longer supported, because of the removal of 32-bit MATLAB®.
Using an IVI driver with icdevice
requires
generating a MATLAB instrument driver (MDD) with makemid
or
using a prebuilt MDD driver.
The IVI Foundation maintains a registry of drivers sortable by instrument model and driver type. See http://www.ivifoundation.org/registered_drivers/driver_registry.aspx.
Before you use IVI drivers in MATLAB, install:
VISA
IVI Shared components
Required IVI drivers
IVI-C Wrappers
The IVI-C wrappers provide an interface to MATLAB for instruments running on IVI-C class-compliant drivers.
To use the wrapper you must have the following software installed.
Windows 64-bit
VISA shared components
VISA
National Instruments compliance package NICP 4.1 or higher
Your instrument driver
Quick Control Oscilloscope
You can use the Quick-Control Oscilloscope for any oscilloscope that uses an underlying IVI-C driver. However, you do not have to directly deal with the underlying driver. You can also use it for Tektronix® oscilloscopes.
To use the Quick-Control Oscilloscope for an IVI-C scope, you must have the following software installed. Most components are installed by the Instrument Control Toolbox Support Package for National Instruments VISA and ICP Interfaces. To install the support package, see Install the National Instruments VISA and ICP Interfaces Support Package.
Windows 64-bit platforms
VISA shared components (installed by the support package)
VISA (installed by the support package)
Note, the examples use Keysight™ VISA, but you can use any version of VISA.
National Instruments IVI compliance package NICP 4.1 or later (installed by the support package)
Your instrument’s device-specific driver. If you do not already have it, go to your instrument vendor's website and download the IVI-C driver for your specific instrument.
By default, the driver used is Tektronix ('tektronix'
).
If your instrument is not supported by the default driver, specify
a particular IVI-C Scope driver using the driver
property
on the oscilloscope
object.
Note
As of release R2015a, most of these components are installed for you when you install the National Instruments VISA and ICP Interfaces Support Package. See Install the National Instruments VISA and ICP Interfaces Support Package.
Quick Control Function Generator
You can use the Quick-Control Function Generator for any function generator that uses an underlying IVI-C driver. However, you do not have to directly deal with the underlying driver.
To use the Quick-Control Function Generator for an IVI-C fgen, ensure the following software is installed. Most components are installed by the Instrument Control Toolbox Support Package for National Instruments VISA and ICP Interfaces. To install the support package, see Install the National Instruments VISA and ICP Interfaces Support Package.
Windows 64-bit platforms
VISA shared components (installed by the support package)
VISA (installed by the support package)
Note, the examples use Keysight VISA, but you can use any vendor’s implementation of VISA.
National Instruments IVI compliance package NICP 4.1 or later (installed by the support package)
Your instrument’s device-specific driver. If you do not already have it, go to your instrument vendor's website and download the IVI-C driver for your specific instrument.
By default, the driver used is 'Agilent332x0_SCPI'
.
If your instrument is not supported by the default driver, specify
a particular IVI-C Function Generator driver using the driver
property
on the fgen
object.
Note
As of release R2015a, most of these components are installed for you when you install the National Instruments VISA and ICP Interfaces Support Package. See Install the National Instruments VISA and ICP Interfaces Support Package.
Quick Control RF Signal Generator
You can use the Quick-Control RF Signal Generator for any RF signal generator that uses an underlying IVI-C driver. However, you do not have to directly deal with the underlying driver.
To use the Quick-Control RF Signal Generator for an IVI-C RF signal generator, ensure the following software is installed. Most components are installed by the Instrument Control Toolbox Support Package for National Instruments VISA and ICP Interfaces, but you can also install them separately. To install the support package, see Install the National Instruments VISA and ICP Interfaces Support Package.
Windows 64-bit platforms
VISA shared components (installed by the support package)
VISA (installed by the support package)
Note, the examples use Keysight VISA, but you can use any vendor’s implementation of VISA.
National Instruments IVI compliance package NICP 4.1 or later (installed by the support package)
The device-specific driver for your instrument. If you do not already have it, go to your instrument vendor's website and download the IVI-C driver for your specific instrument.
Note
As of release R2015a, most of these components are installed for you when you install the National Instruments VISA and ICP Interfaces Support Package. See Install the National Instruments VISA and ICP Interfaces Support Package.
Make sure that you have the correct instrument driver installed for your device. Refer to your device documentation and the vendor website.
Make sure that your device is supported in Instrument Control Toolbox. See Is My Hardware Supported?.
Make sure that Instrument Control Toolbox recognizes
your device, by using the instrhwinfo
function
with the visa
interface name. For example:
instrhwinfo('visa')
ans = InstalledAdaptors: {'keysight'} JarFileVersion: 'Version 2.8.0'
The VISA library should be listed. If it is not, make sure it is installed and it is a supported version.
You can also make sure your instrument is listed, by using instrhwinfo
with
the adaptor and vendor name, then looking at the ObjectConstructorName
field.
visainfo = instrhwinfo('visa', 'agilent')
visainfo.ObjectConstructorName ans = 'visa('keysight', 'ASRL1::INSTR');' 'visa('keysight', 'TCPIP0::172.31.57.119::inst0::INSTR');' 'visa('keysight', 'TCPIP0::hostname.net.com::inst0::INSTR');'
If the instrument is not listed, it is not configured properly in your vendor’s VISA configuration utility. Each vendor has its own utility. See the table in “VISA Supported Vendor and Resource Names” at the end of this topic for a list of the vendor utilities.
You can also use instrhwinfo
to
find information on installed IVI drivers and shared components.
For example:
instrhwinfo ('ivi')
ans = LogicalNames: {'MainScope', 'FuncGen'} ProgramIDs: {'TekScope.TekScope','Agilent33250'} Modules: {'ag3325b', 'hpe363xa'} ConfigurationServerVersion: '1.6.0.10124' MasterConfigurationStore: 'C:\Program Files\IVI\Data\ IviConfigurationStore.xml' IVIRootPath: 'C:\Program Files\IVI\'
Modules refer to IVI-C drivers.
Logical names are associated with particular IVI drivers
as defined in the IVI Configuration Store, but they do not necessarily
imply that the drivers are currently installed. You can install drivers
that do not have a LogicalName
property set yet,
or drivers whose LogicalName
was removed.
Alternatively, use the Test & Measurement Tool to view the
installation of IVI drivers and the setup of the IVI configuration
store. Expand the Instrument Drivers
node and click IVI.
Click the Software Modules tab. (For
information on the other IVI driver tabs and settings in the
Test & Measurement Tool, see IVI Configuration Store.)
You can create an ivi
object or
a visa
object to communicate with your instrument.
For instructions on creating an IVI object, constructing an IVI configuration
store, and configuring communication using an IVI-C class compliant
interface, see Reading Waveforms Using the IVI-C Class Compliant Interface.
You can create a VISA object to use with different instrument
types. For example, create a VISA-serial object connected to serial
port COM1
using National Instruments VISA interface.
v = visa('ni','ASRL1::INSTR');
If you do not get an error, the object was created successfully. If the resource name does not exist, you will get an error. Check that the resource name is correct in the vendor configuration utility. See the table in the next section.
Make sure you can connect to the remote host, using
the fopen
function with the object name.
fopen(v);
If you do not get an error, the connection was made successfully.
When you have connected, you can communicate with your device. If you have problems sending or receiving, you may need to configure communication settings. If you are using VISA, check steps listed for the interface you are using, such as TCP/IP, Serial, etc. Make sure you are using the correct instrument command. Look in the instrument’s documentation to see what commands it recognizes. Verify that communication works using the vendor utility.
When you use instrhwinfo
to find commands
to configure the interface objects, you must use valid vendor or resource
names. The supported values for vendor
are
given below in parentheses after the vendor name. These are their
utilities.
Vendor | Configuration Utility | Testing Connection | Debug Utility |
---|---|---|---|
Keysight VISA
('keysight' ) | Keysight Connection Expert (KCE) | Interactive IO button on KCE | IO Monitor button on KCE |
Agilent Technologies® VISA ('agilent' ) | Agilent Connection Expert (ACE) | Tools > Interactive IO | Tools > IO Monitor |
National Instruments VISA ('ni' ) | Measurement and Automation Explorer (MAX) | Tools > NI VISA > VISA Interactive Control | Tools > NI I/O Trace |
Tektronix VISA ('tek' ) | Open Choice Instrument Manager | Open Choice Talk Listener | Open Choice Call Monitor |
Rohde & Schwarz R&S VISA
('rs' ) | RsVisaConfigure, launched from RsVisa Config tab on RsVisaTester | RsVisaTester | RsVisaTraceTool, launched from RsVisa TraceTool tab on RsVisaTester |
Note
The VISA vendor 'agilent'
has been replaced by
'keysight'
. However, 'agilent'
still
works in scripts or code, such as when creating the visa
object.