10-5
Program Examples
10
(3) Obtaining a power value
Shown below is an example of a program that carries out power monitor measurement to obtain the power
value of a specific wavelength.
90 WRITE @108 : “PWR 632.8”
100 DO
110 WRITE @108 : “ESR2?”
120 READ @108 : ESR2
130 EXIT IF BIT(3, ESR2) = 1 ! power monitor READY
140 LOOP
150 WRITE @108 : “PWRR?”
160 READ @108 : POWER
170 PRINT “power” ; POWER ; “dBm”
Line 90: Start power monitor measurement.
Lines 100 to 140: Wait for power monitor measurement to be ready.
Lines 150 to 160: Input a power value.
Line 170: Print the measurement result.
When carrying out power monitor measurement, it is necessary to
enter the power monitor mode and wait for a normal measurement result to be obtained. Therefore, lines 100
to 140 are used to check mode switching.
10.2 Program Examples