EasyManua.ls Logo

Keysight E4981A - Page 111

Keysight E4981A
389 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Keysight E4981A 120 Hz/1 kHz/1 MHz Capacitance Meter 111
Measurement Applications (Sample Programs)
Detecting the Completion of Measurement using SRQ
Example 9-5 Detecting the Completion of Measurement Using SRQ
Sub Example5()
'===================================
' Configuration
'===================================
Dim defrm As Long 'Session to Default Resource Manager
Dim Agte4981a As Long 'Session to instrument
Dim Result As String * 500
Dim Res As Variant
Dim Nop As Integer, i As Integer, StbStatus As Integer
Const TimeOutTime = 30000
On Error GoTo ErrorHandler
'===================================
' Open Instrument
'===================================
ErrorCheck viOpenDefaultRM(defrm)
Call SelectMode(defrm, Agte4981a)
ErrorCheck viSetAttribute(Agte4981a, VI_ATTR_TMO_VALUE, TimeOutTime)
'===================================
' Setup Start
'===================================
Worksheets("5-1").Range("B6").Value = ""
ErrorCheck viVPrintf(Agte4981a, "SYST:PRES;*CLS" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "TRIG:SOUR BUS" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, ":AVER ON" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, ":AVER:COUN 10" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "STAT:OPER:ENAB 16" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "*SRE 128" + vbLf, 0)

Table of Contents

Other manuals for Keysight E4981A

Related product manuals