3-40
Programming
Example Programs
FOR I=1 TO Nb_pt
PRINT USING "7A,2D,17A,M4D.3D,25A,S2D.2D,22A,2D.2D,3A";"Line : ";I;"
wavelength is : ";Current_wl(I)/1.0E-9;" nm, absolute level is : ";Current_pwr(I);" dBm,
with a SNR of : ";Snr_pwr(I);" dB"
NEXT I
STOP
Error_msg: !
PRINT "The program is aborted due to : ";ERRM$
END
Err_mngmt:SUB Err_mngmt(OPTIONAL Cmd_msg$)
COM /Instrument/ @Mwmt
DIM Err_msg$[255]
INTEGER Cme
CLEAR @Mwm
REPEAT !
OUTPUT @Mwm;"*ESR?"
ENTER @Mwm;Cme
OUTPUT @Mwm;":SYST:ERR?"
ENTER @Mwm;Err_msg$
IF NPAR>0 AND NOT POS(Err_msg$,"+0") THEN PRINT "This command
";Cmd_msg$;" makes the following error :"
IF NOT POS(Err_msg$,"+0") THEN PRINT Err_msg$
UNTIL NOT BIT(Cme,2) AND NOT BIT(Cme,4) AND NOT BIT(Cme,5) AND
POS(Err_msg$,"+0")
Subend:SUBEND
Set_ese:SUB Set_ese
COM /Instrument/ @Mwm
OUTPUT @Mwm;"*ESE ";IVAL("00110100",2)
SUBEND
Identity:DEF FNIdentity$;
COM /Instrument/ @Mwm
DIM Identity$[50]
Identity$=""
OUTPUT @Mwm;"*RST"
OUTPUT @Mwm;"*OPC?"
ENTER @Mwm;Opc_done
OUTPUT @Mwm;"*IDN?"
ENTER @Mwm;Identity$
RETURN Identity$
FNEND
Cmd_opc:SUB Cmd_opc(Set_cmd$)
COM /Instrument/ @Mwmd
OUTPUT @Mwm;Set_cmd$
OUTPUT @Mwm;"*OPC?"
ENTER @Mwm;Opc_done$
SUBEND
Summary of Contents for 86120C
Page 12: ......
Page 26: ...1 14 Getting Started Returning the Instrument for Service ...
Page 27: ...1 15 Getting Started Returning the Instrument for Service ...
Page 28: ......
Page 96: ...3 18 Programming Monitoring the Instrument ...
Page 128: ...3 50 Programming Lists of Commands ...
Page 236: ...4 108 Programming Commands UNIT Subsystem ...
Page 248: ......
Page 264: ...6 16 Specifications and Regulatory Information Product Overview ...
Page 269: ...7 5 Reference Menu Maps Appl s Menu ...
Page 271: ...7 7 Reference Menu Maps Display List by WL Menu Delta On Menu ...
Page 273: ...7 9 Reference Menu Maps System Print Menu ...
Page 274: ...7 10 Reference Menu Maps System Setup Menu ...
Page 284: ......
Page 292: ......
Page 293: ......