R3132 Series Spectrum Analyzer Operation Manual
4.2.10 Example Programs
4-50
Example VB-5: Saving set values in Register 5 and recalling them from Register 5
Dim LabelBuff As String
’ Character string buffer for the label
LabelBuff = "SPECTRUM Analyzer"
’ Set the label.
Call ibclr(spa)
’ Performs a Device Clear.
Call ibwrt(spa, "CF 30MZ")
’ Set the parameter.
Call ibwrt(spa, "SP 1MZ")
Call ibwrt(spa, "DET POS")
Call ibwrt(spa, "LON " & LabelBuff)
’ Set the label.
Call ibwrt(spa, "SV 5")
’ Save the data in Register 5.
Call ibwrt(spa, "CF 1GZ")
’ Change the set parameters.
Call ibwrt(spa, "SP 200MZ")
Call ibwrt(spa, "RC 5")
’Recall the data from Register 5.
Example VB-6: Enter Limit line1 in the table and turn Limit line 1 on
Call ibclr(spa)
’ Perform a device clear.
Call ibwrt(spa, "LMTADEL")
’ Clear the table used for Limit Line 1.
Call ibwrt(spa, "AUNITS DBUV")
’ Set the unit of level to dB
µ
V.
Call ibwrt(spa, "LMTAIN 25MZ, 49.5DB")
’ Enter data use by Limit Line 1.
Call ibwrt(spa, "LMTAIN 35MZ, 49.5DB")
Call ibwrt(spa, "LMTAIN 35MZ, 51.5DB")
Call ibwrt(spa, "LMTAIN 55MZ, 51.5DB")
Call ibwrt(spa, "LMTAIN 55MZ, 54.3DB")
Call ibwrt(spa, "LMTAIN 65MZ, 54.3DB")
Call ibwrt(spa, "LMTAIN 65MZ, 57.0DB")
Call ibwrt(spa, "LMTAIN 68MZ, 57.0DB")
Call ibwrt(spa, "LMTAIN 68MZ, 60.0DB")
Call ibwrt(spa, "LMTAIN 75MZ, 60.0DB")
Call ibwrt(spa, "LMTAIN 75MZ, 62.5DB")
Call ibwrt(spa, "LMTAIN 82MZ, 62.5DB")
Call ibwrt(spa, "LMTAIN 82MZ, 64.7DB")
Call ibwrt(spa, "FA 0MZ")
’ Start frequency of 0 MHz
Call ibwrt(spa, "FB 100MZ")
’ Stop frequency of 100 MHz
Call ibwrt(spa, "LMTA ON")
’ Turn Limit line 1 on.
Example VB-7: Sample Program of the Gated Sweep
Call ibclr(spa)
’ Perform a device clear.
Call ibwrt(spa, "GTSRC EXT")
’ Set the Gate signal source to EXT.
Call ibwrt(spa, "GTSLP +")
’ Set the Gate signal slope to plus (+).
Call ibwrt(spa, "GTWID 10MS")
’ Set the window width of the gated sweep to 10 msec.
Call ibwrt(spa, "GTPOS 10US")
’ Set the window position of the gated sweep to 10
µ
sec.
Call ibwrt(spa, "GTSWP ON")
’ Turn the gated sweep on.