Agilent Technologies E5071C Manual page 1025

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

E5071C
Bandwidth Search
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
The sample program demonstrates how to perform Bandwidth Search.
The sample program moves the marker to the maximum value position
and then retrieves and displays the results of Bandwidth Search.
See Bandwidth Search for this programming.
Sample Program in Excel VBA
Sub Bandwid_click()
Dim vi As Long
Dim defrm As Long
Dim Threshhold As Long
Dim Result As String * 1000
Dim Bdata As Variant
Const TimeOutTime = 10000
Call viOpenDefaultRM(defrm)
Call viOpen(defrm, "GPIB0::17::INSTR", 0, 0, vi)
Call viSetAttribute(vi, VI_ATTR_TMO_VALUE, TimeOutTime)
Threshhold = -3
Call viVPrintf(vi, ":SENS1:FREQ:CENT 947.5E6" & vbLf, 0)
Call viVPrintf(vi, ":SENS1:FREQ:SPAN 200E6" & vbLf, 0)
Call viVPrintf(vi, ":CALC1:PAR1:DEF S21" & vbLf, 0)
Call viVPrintf(vi, ":DISP:WIND1:TRAC1:Y:AUTO" & vbLf, 0)
Call viVPrintf(vi, ":CALC1:PAR1:SEL" & vbLf, 0)
Call viVPrintf(vi, ":CALC1:MARK1:FUNC:TYPE MAX" & vbLf, 0)
Call viVPrintf(vi, ":CALC1:MARK1:FUNC:EXEC" & vbLf, 0)
Call viVPrintf(vi, ":CALC1:MARK1:BWID:THR " + CStr(Threshhold) & vbLf, 0)
Call viVPrintf(vi, ":CALC1:MARK1:BWID:DATA?" & vbLf, 0)
Call viVScanf(vi, "%t", Result)
Bdata = Split(Result, ",")
Call ErrorCheck(vi)
Cells(5, 2).Value = Val(Bdata(0))
Cells(6, 2).Value = Val(Bdata(1))
1252

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents