EasyManua.ls Logo

Keysight E4981A - Page 121

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 121
Measurement Applications (Sample Programs)
Reading Measurement Results in ASCII Format Using :FETCh? Command
Example 9-8 Reading Measurement Results in Ascii Format using :FETCh? Command
Sub Example8()
'===================================
' 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
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
'===================================
ErrorCheck viVPrintf(Agte4981a, "SYST:PRES;*CLS" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "FORM ASC" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "APER:TIME 6" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "TRIG:SOUR BUS" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CALC1:COMP OFF" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "INIT:CONT OFF" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "INIT" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "TRIG" + vbLf, 0)

Table of Contents

Other manuals for Keysight E4981A

Related product manuals