EasyManua.ls Logo

Anritsu MS9710C - 10.2 Program Examples

Anritsu MS9710C
269 pages
Print Icon
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...
10-3
Program Examples
10
10.2 Program Examples
(1) Obtaining a peak wavelength and peak level
Shown below is an example of a program that obtains a peak wavelength and peak level through spectrum
measurement.
90 WRITE @108 : “SSI”
100 DO
110 WRITE @108 : “ESR2?”
120 READ @108 : ESR2
130 EXIT IF BIT (1, ESR2) = 1! sweep end
140 LOOP
150 WRITE @108 : “PKS”
160 DO
170 WRITE @108 : “ESR2?”
180 READ @108 : ESR2
190 EXIT IF BIT (0, ESR2) =1! Peak search end
200 LOOP
210 WRITE @108 : “TMK?”
220 READ @108 : WAVE$, LEVEL$
230 PRINT “Peak wave length ” : WAVE$ : “nm”
240 PRINT “Peak level ” : LEVEL$
Line 90: Start sweep.
Lines 100 to 140: Wait for the end of sweep.
Line 150: Search for a peak.
Lines 160 to 120: Wait for the end of peak search.
Lines 210 to 220: Input a peak value.
Lines 230 to 240: Print the result.
In this example, the end of sweep is waited to obtain a peak from the recognized waveform.
The end of sweep and the ends of peak search are checked by monitoring the extended event register. How-
ever, when a GPIB interface bus is used, an SRQ interrupt can be used. When it is used, the bits corresponding
to the service request enable register and extended event status register must be set in advance using the SRE
and ESE2 commands, respectively.
10.2 Program Examples

Table of Contents

Related product manuals