Keysight E4980A/AL Precision LCR Meter               283
Sample Program
Detecting End of Measurement
Example 9-2  Detecting End of Measurement
Sub Example_2()
 
    '===================================
    ' 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 i As Integer, StbStatus As Integer
    Const TimeOutTime = 30000
 
    On Error GoTo ErrorHandler
 
    '===================================
    ' Open Instrument
    '===================================
 
    ErrorCheck viOpenDefaultRM(defrm)
    Call selectLCR(defrm, AgtE4980A/AL)
    ErrorCheck viSetAttribute(AgtE4980A/AL, 
VI_ATTR_TMO_VALUE, TimeOutTime)
    '===================================
    ' Setup Start
    '===================================
ErrorCheck viVPrintf(AgtE4980A/AL, "*RST;*CLS" + vbLf, 0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "*SRE 0" + vbLf, 0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "STAT:OPER:ENAB 0" + 
vbLf, 0)