286 Keysight E4980A/AL Precision LCR Meter
Sample Program
Read Measurement Results
9-
Read Measurement Results
This section describes how to read measurement results in ASCII format and
BINARY format using sample programs. The following samples show three
methods for each data format: comparator, data buffer memory, and list
sweep.
Read measurement data in ASCII format (Comparator)
This application program reads measurement data in ASCII format with the
comparator function on.
The program of Example 9-3 is described below.
Configuration Assigns variables and enables error handling by the
subroutine named ErrorHandle.
Open Instrument Assigns a USB address or GPIB address to the I/O bus. Also
sets the time for timeout.
Setup Start Sets the trigger, comparator function, and data format.
Meas Read Reads the measurement data using the :FETCh? command,
separates the returned ASCII format character string data
with commas, and displays them individually.
Setup End Closes the I/O bus.
ErrorProc Displays an error number when an error occurs.
Example 9-3 Read measurement results (ASCII format, comparator)
Sub Example_3_1()
'===================================
' Configuration
'===================================
Dim defrm As Long 'Session to Default Resource
Manager
Dim AgtE4980A/AL As Long 'Session to instrument
Dim Result As String * 500
Dim Res As Variant
Dim Nop As Integer, i As Integer
Const TimeOutTime = 30000
On Error GoTo ErrorHandler