Agilent Technologies Agilent 86120C Ventilation Hood User Manual


 
3-34
Programming
Example Programs
Example 3. Measure WDM channel drift
This program measures the drift of channels in a WDM system. It
measures drift in both power and wavelength of each line. First, the
program sets the Agilent 86120C in the continuous-acquisition mea-
surement mode. Then, it measures drift using commands from the
CALCulate3 subsystem.
Notice the use of the Tempo subroutine to pause the program for 10
seconds while the Agilent 86120C measures the drift on the system.
The use of the Err_mngmt subroutine is optional. Refer to the intro-
duction to this section for a description of each subroutine that is
contained in this program.
COM /Instrument/ @Mwm
ASSIGN @Mwm TO 720
DIM Key$[1]
ON ERROR GOTO Error_msg
Set_ese
PRINT USING "37A,33A";"Multi-Wavelength Meter Identity is: " ;FNIdentity$
ON TIMEOUT 7,5 CALL Err_mngmt
Cmd_opc("*RST")
Cmd_opc(":INIT:IMM")
Cmd_opc("*OPC")
Cmd_opc(":CONF:ARR:POW:WAV")
! Turn on the drift calculation
Cmd_opc(":CALC3:DRIF:STAT ON")
Err_mngmt(":CALC3:DRIF:STAT ON")
! Turn off all drift states
Cmd_opc(":CALC3:DRIF:PRES")
Err_mngmt(":CALC3:DRIF:PRES")
! Turn on drift reference state
Cmd_opc(":CALC3:DRIF:REF:STAT ON")
Err_mngmt(":CALC3:DRIF:REF:STAT ON")
! Query the number of data points
OUTPUT @Mwm;":CALC3:POIN?"
ENTER @Mwm USING "#,K";Nb_pt
ALLOCATE Current_ref_wl(1:Nb_pt)
ALLOCATE Current_ref_pwr(1:Nb_pt)