VISA Explorer
Description
The VISA Explorer app provides a user interface to connect to and communicate with instruments over VISA.
Using this app, you can:
Connect to TCP/IP (using VXI11 and HiSLIP), TCP/IP Socket, USB, GPIB, Serial, VXI, and PXI interfaces using VISA.
Configure connection and communication properties for your VISA resource.
Write binary, ASCII-terminated string, or binblock data.
Read binary, ASCII-terminated string, or binblock data.
Plot data in a separate figure window.
Analyze data by viewing it in the Signal Analyzer app.
Export data to the MATLAB® workspace.
Generate a MATLAB script for app interactions that uses the
visadev
interface.
Open the VISA Explorer App
MATLAB Toolstrip: On the Apps tab, under Test and Measurement, click the app icon.
MATLAB command prompt: Enter
visaExplorer
.
Examples
Read Waveform Data from Keysight DSO-X 1204A Oscilloscope Using VISA Explorer
For a walkthrough of this example, play the following video.
Parameters
For a full list of properties that appear in the Property Inspector, see visadev Properties. The properties that you see in VISA Explorer depend on your VISA interface.
Write SectionData Format
— Select type of write operation
Binary
| ASCII-Terminated String
| Binblock
You can write Binary
, ASCII-Terminated
String
, or Binblock
data to the VISA
resource.
A Binary
write is equivalent to the write
function, an ASCII-Terminated String
write is equivalent to
the writeline
function, and a Binblock
write is
equivalent to the writebinblock
function.
Data Type
— Select MATLAB data type to write
uint8
| int8
| uint16
| int16
| uint32
| int32
| uint64
| int64
| single
| double
| char
| string
Specify the data type of the data to write to the VISA resource. This parameter determines the number of bytes to write for each value and the interpretation of those bytes as a MATLAB data type.
Dependencies
If you set the Data Format to ASCII-Terminated
String
, the only possible value for this parameter is
string
.
This parameter can be set to uint64
or
int64
only if you select the Workspace
Variable option instead of Data to Write.
Data to Write
— Specify numeric or ASCII data to write
numeric | character vector | string scalar
Specify the data to write to the VISA resource. The data is written as the type
specified by Data Type, regardless of the format in this parameter.
If the Data Type is a numeric type, the app evaluates the
Data to Write values and operations before writing the data. For
example, you can specify 1:5
instead of
[1,2,3,4,5]
.
Select either this parameter or Workspace Variable to write data.
Workspace Variable
— Select workspace variable to write
workspace variable
Select an existing workspace variable to write to the VISA resource. The data is written as the type specified by Data Type, regardless of the data type of the variable in the workspace.
If Data Format is Binary
or
Binblock
, you can select the following types of workspace variables:
Row (1-by-
N
) or column (N
-by-1) vector of numeric values1-by-
N
character vector1-by-1 string scalar
If Data Format is ASCII-Terminated
String
, you can select the following types of workspace variables:
1-by-
N
character vector1-by-1 string scalar
Select either this parameter or Data to Write to write data.
Write
— Write data using specified settings
button
Click this button to write the data specified in Data to Write
or Workspace Variable as the specified Data
Type to the VISA resource. If Data Format is
ASCII-Terminated String
, the write terminator specified by
the Terminator property is automatically appended to the data
being written.
Clicking this button is equivalent to performing the write
,
writeline
, or writebinblock
functions.
WriteRead
— Write command and read response
button
Click this button to write the ASCII-terminated string command specified in Data to Write or Workspace Variable as the specified Data Type to the VISA resource, then read the ASCII text returned from the resource. The write terminator specified by the Terminator property is automatically appended to the data being written.
Clicking this button is equivalent to performing the writeread
function.
Dependencies
To perform this operation, set the Data Format to
ASCII-Terminated String
.
Data Format
— Select type of read operation
Binary
| ASCII-Terminated String
| Binblock
Read Binary
, ASCII-Terminated
String
, or Binblock
data from the VISA
resource.
A Binary
read is equivalent to the read
function, an ASCII-Terminated String
read is equivalent to
the readline
function, and a Binblock
read is equivalent to the readbinblock
function.
Data Type
— Select MATLAB data type to read
uint8
| int8
| uint16
| int16
| uint32
| int32
| uint64
| int64
| single
| double
| char
| string
Specify the data type of the data to read from the VISA resource. This parameter determines the number of bytes to read for each value and the interpretation of those bytes as a MATLAB data type.
Dependencies
If you set the Data Format to ASCII-Terminated
String
, the only possible value for this parameter is
string
.
Num Values to Read
— Specify number of values of selected Data Type to read
numeric
Specify the number of values to read as a positive integer. This parameter must be less than or equal to Values Available. If you leave this parameter empty, the client reads all available values using the specified Data Type.
Dependencies
To enable this parameter, set Data Format to
Binary
.
Read
— Read data using specified settings
button
Click this button to read data from the VISA resource. If Data
Format is Binary
, read the number of values
specified by Num Values to Read in the form specified by
Data Type. If Data Format is
ASCII-Terminated String
or
Binblock
, read data until the first occurrence of the read
terminator specified by the Terminator property.
Clicking this button is equivalent to the read
,
readline
, or readbinblock
functions.
Flush
— Flush input and output buffers
button
Click this button to clear all data from both the input and output buffers of the VISA resource. This also clears the hardware output buffer of the instrument.
Clicking this button is equivalent to performing the flush
function.
Display
— Select format to view data in Communication Log
Default
(default) | Binary
| ASCII
| Hexadecimal
View the data in the Data column of the Communication
Log as Binary
, ASCII
,
or Hexadecimal
, as applicable based on the data type. This
parameter does not change the original value or data type of the data. For more
information about these formats, see Data Type Conversion.
Clear
— Clear Communication Log
button
Click this button to clear all the contents of the Communication Log.
Plot
— Plot selected row of data
button
Click this button to open a new figure window that plots the data currently selected in the Communication Log. You can select only one row of data, and the selected data must be numeric.
Unlike Write and Read, this operation is not captured in the MATLAB Code Log pane.
Signal Analyzer
— View selected row of data in Signal Analyzer app
button
Click this button to launch the Signal Analyzer app and send it the data currently selected in the Communication Log. You can select only one row of data, and the selected data must be a numeric vector.
You must have Signal Processing Toolbox™ installed to use the Signal Analyzer app.
Workspace Variable
— Specify name of workspace variable to export data to
valid variable name
Edit the name of the workspace variable that you want to export data to. The
Export Selected Row
and Export Communication
Log
options in the Export drop-down menu save your
data in the workspace as the variable specified in this field.
You must specify a valid MATLAB variable name that does not already exist in the workspace. If you specify an invalid name, it is automatically changed to a valid variable name.
Export
— Export Communication Log data or MATLAB code
Export Selected Row
| Export Communication Log
| Generate MATLAB Script
Click this button to select one of the following options for exporting data from this app:
Export Selected Row
— Save the data currently selected in the Communication Log to the workspace as the variable specified by Workspace Variable.Export Communication Log
— Save all of the Communication Log data to the workspace as atimetable
with the variable name specified by Workspace Variable.Generate MATLAB Script
— Generate a MATLAB live script populated with the content in MATLAB Code Log and open it in the Live Editor.
Version History
Introduced in R2022b
See Also
Apps
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)