Example Programs - Agilent Technologies 86121A User Manual

Wdm channel analyzer
Table of Contents

Advertisement

4-28 Example Programs

Example Programs
The following example programs are provided in this
section:
Example 1. Measure a DFB laser 4-30
Example 2. Measure WDM channels 4-31
Example 3. Measure WDM channel drift 4-33
Example 4. Measure WDM channel separation 4-36
Example 5. Measure signal-to-noise ratio of each WDM
channel 4-38
Example 6. Increase a source's wavelength
accuracy 4-40
These programs are provided to give you examples of
using Agilent 86121A remote programming commands
in typical applications. They are not meant to teach
general programming techniques or provide ready-to-
use solutions. They should allow you to see how mea-
surements are performed and how to return data to the
computer.
All of the examples are written in the HP BASIC pro-
gramming language.
Many subroutines are repeated in the examples
The first five example programs contain several com-
mon subroutines. These routines, along with one func-
tion, are described in the rest of this introduction. The
descriptions are listed in the general order that the sub-
routines are called in the programs.
Error_msg subroutine
This function is found in examples 2, 3, 4, and 5. It dis-
plays an error message on the computer's screen
explaining the reason that the program's execution
stopped.
Set_ese subroutine
The subroutine sets the enable mask for the event sta-
tus register to a value of 52. This allows bits 2, 4, and 5
to be set whenever a query error (QYE), execution
error (EXE), or command error (CME), respectively,
occurs. All this is accomplished using the *ESE com-
mon command.

Advertisement

Table of Contents
loading

Table of Contents