Agilent Technologies E5071C Manual page 1012

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

Peak Search
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
This sample program demonstrates how to search for peaks using the
Marker Search feature and analysis commands.
This program works in two steps: first, it uses Marker Search to search for
the maximum positive peak and displays the results; second, it uses
analysis commands to search for all positive peaks and displays the
results.
See Searching for Positions That Match Specified Criteria for this
programming.
Sample Program in Excel VBA
Sub PeakSearch_Click()
Dim defrm As Long
Dim vi As Long
Const TimeOutTime = 20000
'
Dim Buff As String, Img As String, Err_msg As String
Dim Excursion As String, Freq As String * 20, Resp As Variant, PeakPoint As Variant
Dim Poin As String * 5, Result As String * 1000, errmsg As String * 20
Excursion = "0.5"
' Open Analyzer
Call viOpenDefaultRM(defrm)
Call viOpen(defrm, "GPIB0::17::INSTR", 0, 0, vi)
Call viSetAttribute(vi, VI_ATTR_TMO_VALUE, TimeOutTime)
Call viVPrintf(vi, "*CLS" & vbLf, 0)
'
' Setup Analyzer
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 S11" & vbLf, 0)
Call viVPrintf(vi, ":DISP:WIND1:TRAC1:Y:AUTO" & vbLf, 0)
'
Programming
1239

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents