Hewlett-Packard Company
Lightwave Operations
1400 Fountaingrove Parkway
Santa Rosa, CA 95403-1799,
USA
(707) 577-1400
Notice.
The information contained in
this document is subject to
change without notice. Companies, names, and data used
in examples herein are fictitious unless otherwise noted.
Hewlett-Packard makes no
warranty of any kind with
regard to this material, including but not limited to, the
implied warranties of merchantability and fitness for a
particular purpose. HewlettPackard shall not be liable for
errors contained herein or for
incidental or consequential
damages in connection with
the furnishing, performance,
or use of this material.
Restricted Rights Legend.
Use, duplication, or disclosure by the U.S. Government
is subject to restrictions as set
forth in subparagraph (c) (1)
(ii) of the Rights in Technical
Data and Computer Software
clause at DFARS 252.2277013 for DOD agencies, and
subparagraphs (c) (1) and (c)
(2) of the Commercial Computer Software Restricted
Rights clause at FAR 52.22719 for other agencies.
Warranty.
This Hewlett-Packard instrument product is warranted
against defects in material and
workmanship for a period of
one year from date of shipment. During the warranty
period, Hewlett-Packard Company will, at its option, either
repair or replace products
which prove to be defective.
For warranty service or repair,
this product must be returned
to a service facility designated
by Hewlett-Packard. Buyer
shall prepay shipping charges
to Hewlett-Packard and
Hewlett-Packard shall pay
shipping charges to return the
product to Buyer. However,
Buyer shall pay all shipping
charges, duties, and taxes for
products returned to HewlettPackard from another country.
Hewlett-Packard warrants
that its software and firmware
designated by Hewlett-Packard for use with an instrument
will execute its programming
instructions when properly
installed on that instrument.
Hewlett-Packard does not
warrant that the operation of
the instrument, or software,
or firmware will be uninterrupted or error-free.
Limitation of Warranty.
The foregoing warranty shall
not apply to defects resulting
from improper or inadequate
maintenance by Buyer, Buyersupplied software or interfacing, unauthorized modification
or misuse, operation outside
of the environmental specifications for the product, or
improper site preparation or
maintenance.
No other warranty is
expressed or implied.
Hewlett-Packard specifically
disclaims the implied warranties of merchantability and fitness for a particular purpose.
Exclusive Remedies.
The remedies provided herein
are buyer's sole and exclusive
remedies. Hewlett-Packard
shall not be liable for any
direct, indirect, special, incidental, or consequential damages, whether based on
contract, tort, or any other
legal theory.
SN 比の測定 3-3
アベレージングによる SN 比の測定 3-7
レーザ・ドリフトの測定 3-9
コヒーレンス長の測定 3-12
4 Programming
Addressing and Initializing the Instrument 4-3
Making Measurements 4-6
Monitoring the Instrument 4-17
Reviewing SCPI Syntax Rules 4-24
Example Programs 4-29
Test 1. Absolute Wavelength Accuracy 6-3
Test 2. Sensitivity 6-4
Test 3. Polarization Dependence 6-5
Test 4. Optical Input Return Loss 6-6
Test 5. Amplitude Accuracy and Linearity 6-9
HP 86120B SER US36151025
Firmware Ver. 2.000
List By Wavelength
8 Lines
Power Offset 0.0 dB
Vacuum
Elevation 0 Meters
Update Normal
Peak Excursion 15 dB
Peak Threshold 10 dB
Device Narrow
Commands are grouped in subsystems4-8
Measurement instructions give quick results4-10
The format of returned data4-16
Monitoring the Instrument4-17
Status registers4-17
Queues4-22
Reviewing SCPI Syntax Rules4-24
Example Programs4-29
Example 1. Measure a DFB laser4-31
Example 2. Measure WDM channels4-33
Example 3. Measure WDM channel drift4-35
Example 4. Measure WDM channel separation4-38
Example 5. Measure SN ratio of WDM channels4-40
Example 6. Increase a source’s wavelength accuracy4-42
Lists of Commands4-44
Programming
Programming
Programming
Programming
This chapter explains how to program the HP 86120B. The programming syntax conforms to the IEEE 488.2 Standard Digital Interface for Programmable
Instrumentation and to the Standard Commands for Programmable Instruments (SCPI).
Where to begin…
The programming examples for individual commands in this manual are written in HP BASIC 6.0 for an HP 9000 Series 200/300 Controller.
For more detailed information regarding the HP-IB, the IEEE 488.2 standard,
or the SCPI standard, refer to the following books:
Hewlett-Packard Company. Tutorial Description of Hewlett-Packard Inter-
face Bus, 1987.
Hewlett-Packard Company. SCPI—Standard Commands for Programmable
Instruments, 1995.
International Institute of Electrical and Electronics Engineers. IEEE Standard
488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation. New York, NY, 1987.
International Institute of Electrical and Electronics Engineers. IEEE Standard
488.2-1987, IEEE Standard Codes, Formats, Protocols and Common commands For Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1987.
Types of commands
The HP 86120B responds to three types of commands:
• Common commands
• Measurement instructions
• Subsystem commands
All of these commands are documented in Chapter 5, “Programming Commands”.
4-2
Programming
Addressing and Initializing the Instrument
Addressing and Initializing the Instrument
The HP 86120B’s HP-IB address is configured at the factory to a value of 20.
Y ou must set the output and input functions of your programming language to
send the commands to this address.
To change the HP-IB address
Press the Setup key.
Press
MORE
twice, then
HP-IB
Use the and softkeys to change the HP-IB address.
Press
RETURN
Remote mode and front-panel lockout
Whenever the instrument is controlled by a computer, the Remote message is
displayed on the instrument’s screen and the softkey menu is blanked except
for the
panel control of the instrument.
You can specify a local lockout mode that prevents the
being displayed. If the instrument is in local lockout mode, all the softkeys
may be blanked. For example, if the instrument is first placed in local lockout
mode and then placed in remote mode, no softkeys are displayed.
Consult the documentation for your programming environment to determine
which commands are used to put an instrument in the remote and local lockout modes. These are not HP 86120B commands; they control HP-IB control
lines and do not send any characters to the HP 86120B.
Initialize the instrument at start of every program
It is good practice to initialize the instrument at the start of every program.
This ensures that the bus and all appropriate interfaces are in a known state.
HP BASIC provides a CLEAR command which clears the interface buffer and
also resets the instrument’s parser. (The parser is the program that reads the
instructions that you send.) Whenever the instrument is under remote pro-
LOCAL
softkey. This softkey can be pressed by the user to restore front
1
2
LOCAL
softkey from
. 3
4
.
4-3
Programming
Addressing and Initializing the Instrument
gramming control, it should be in the single measurement acquisition mode.
This is automatically accomplished when the *RST common command is used.
The *RST command initializes the instrument to a preset state:
CLEAR 720
OUTPUT 720;”*RST”
Notice in the example above, that the commands are sent to an instrument
address of 720. This indicates address 20 on an interface with select code 7.
Pressing the green Preset key does not change the HP-IB address.
Set single acquisition mode
An advantage of using the *RST command is that it sets the HP 86120B into
the single measurement acquisition mode. Because the READ and MEASure
data queries expect this mode, their proper operation is ensured.
Establish the wavelength range
At the start of each program, be sure to establish the input wavelength range
using the HP 86120B’s :CALCulate2:WLIMit command. Setting this command
to off enables the full wavelength range of the instrument. If you are measuring signals over a narrow wavelength range, use this command to ensure that
spurious second harmonic peaks are not identified. Refer to “WLIMit[:STATe]”
on page 5-36, “WLIMit:STARt[:WAVelength]” on page 5-38, and
“WLIMit:STOP[:WAVelength]” on page 5- 41. Refer also to “
制限
” on page 2- 9.
測定波長レンジの
4-4
Programming
Addressing and Initializing the Instrument
4-5
Programming
Making Measurements
Making Measurements
Making measurements remotely involves changing the HP 86120B’s settings,
performing a measurement, and then returning the data to the computer. The
simplified block diagram of the HP 86120B shown here lists some of the available programming commands. Each command is placed next to the instrument section it configures or queries data from.
Notice that there are two buffers from which data can be queried: an uncorrected data buffer and a corrected data buffer. With each scan of the input
wavelength range, the analog-to-digital converter loads 65,536 data values
into the uncorrected data buffer. This is considered to be one “measurement”.
A fast-update measurement mode is available for quicker measurement acquisition. But, because only 8,192 data values are collected in fast-update measurement mode, the ability to resolve closely spaced signals is reduced.
4-6
Programming
Making Measurements
After collecting the uncorrected data, the HP 86120B searches the data for
the first 100 peak responses. (Searching starts at 1700 nm and progresses
towards 700 nm for WLIMit OFF. If WLIMit is on, searching starts at
WLIMit:STARt to WLIMit:STOP). These peak values are then placed into the
corrected data buffer. Each peak value consists of an amplitude and wavelength measurement. Amplitude and wavelength correction factors are
applied to this data.
For a listing of the programming commands (including a cross reference to
front-panel keys), refer to the following tables:
Table 4-7, “Programming Commands,” on page 4-44
Table 4-8, “Keys Versus Commands,” on page 4-49
4-7
Programming
Making Measurements
Commands are grouped in subsystems
The HP 86120B commands are grouped in the following subsystems. You’ll
find a description of each command in Chapter 5, “Programming Commands”.
Subsystem Purpose of Commands
Measurement
Instructions Perform frequency, wavelength, wavenumber, and
coherence length measurements.
CALCulate1 Queries
CALCulate2 Queries
CALCulate3 Performs delta, drift, and signal-to-noise measurements.
DISPlay Applies markers and displays power bars.
HCOPy Prints measurement results.
SENSe Sets elevation-correction values, selects readings for air or
vacuum, and enters amplitude offsets. Configures
instrument for measuring broadband devices and chirped
lasers. Queries time-domain values of the input data.
STATus Queries instrument status registers.
SYSTem Presets HP 86120B and queries error messages.
TRIGger Stops current measurement. Acquires new measurement
data. Also used to select single or continuous acquisition of
measurement data.
UNIT Sets the amplitude units to watts or dBm.
Table 4-1 on page 4-9 shows the kinds of measurements that the HP 86120B
can perform and the associated programming commands used to return that
data. In some cases, there is more than one method that can be used to obtain
the desired data. Refer to Chapter 5, “Programming Commands” for the correct syntax for these commands.
uncorrected frequency-spectrum data.
corrected peak data and sets wavelength limits.
4-8
Table 4-1. Commands for Capturing Data
Programming
Making Measurements
Desired
Measurement
Command to Configure Measurement
(partial listing)
Command to Query Data
Wavelength (nm)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:WAVelength?
Frequency (THz)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:FREQuency?
Wavenumber (m
–1
)
CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:WNUMber?
Coherence Length (m)CONFigure, FETCh, READ, and MEASureFETCh, READ, or MEASure
Power (W, dBm)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer?
Average Wavelength,
CALCulate2:PWAVerage:STATeCALCulate2:DATA?
Wavenumber, or Frequency
Total Power (W, dBm)CALCulate2:PWAVerage:STATeCALCulate2:DATA?
Laser-Line SeparationCALCulate3:DELTa:REFerenceCALCulate3:DATA?
Laser-Line DriftCALCulate3:DRIFt:STATeCALCulate3:DATA?
Signal-to-Noise RatioCALCulate3:SNR:STATeCALCulate3:DATA?
Signal-to-Noise Ratio AverageCALCulate3:ASNR:STATeCALCulate3:DATA?
Time-Domain DataCALCulate1:TRANsform:FREQuency:POINtsSENSe:DATA?
Corrected Frequency Domain DataCALCulate1:TRANsform:FREQuency:POINtsCALCulate2:DATA?
Uncorrected Frequency Domain
CALCulate1:TRANsform:FREQuency:POINtsCALCulate1:DATA?
Data
4-9
Programming
Making Measurements
Measurement instructions give quick results
The easiest way to measure wavelength, frequency, power, or coherence
length is to use the MEASure command. The MEASure command is one of
four measurement instructions: MEASure, READ, FETCh, and CONFigure.
The syntax for measurement instructions is documented in “Measurement
Instructions” on page 5-15.
Each measurement instruction has an argument that controls the measurement update rate. This is equivalent to using the
:MEASure command
MEASure configures the HP 86120B, captures new data, and queries the data
all in one step. For example, to measure the longest wavelength, send the following command:
:MEASure:SCALar:POWer:WAVelength? MAX
Table 4-2. The Different Forms of MEASure
NORMAL
and
FAST
softkeys.
Desired
Measurement Data
Power (W, dBm):MEASure:ARRay:POWer?List by Power
Frequency (Hz):MEASure:ARRay:POWer:FREQuency?List by WL
Wavelength (m)MEASure:ARRay:POWer:WAVelength?List by WL
MEASure:SCALar:POWer:WAVelength?single wavelength mode
:MEASure:ARRay:POWer:WNUMber?List by WL
:MEASure:SCALar:POWer:WNUMber?single wavelength mode
Display Format
(frequency)
Specifying SCALar places the display in the single wavelength format and
returns a single value to the computer. Specifying ARRay places the display in
the List by Power or List by WL modes; an array of data is returned to the computer.
4-10
Programming
Making Measurements
A common programming error is to send the :MEASure command when the
instrument is in the continuous measurement acquisition mode. Because
:MEASure contains an :INIT:IMM command, which expects the single measurement acquisition mode, an error is generated, and the INIT command is
ignored.
:READ command
The READ command works like the MEASure command except that it does
not configure the instrument’s settings. You can use the CONFigure command
to configure the instrument for a particular measurement without returning
any data.
The MEASure and READ commands are identical to combining the following
commands:
Command Equivalent Commands
:MEASure :ABORt;:CONFigure;:READ
:READ :ABORt;:INITiate:IMMediate;:FETCh
A common programming error is to send the :READ command when the
instrument is in the continuous measurement acquisition mode. Because
:READ contains an :INIT:IMM command, which expects the single measurement acquisition mode, an error is generated, and the INIT command is
ignored.
:FETCh command
The FETCh command returns data from previously performed measurements;
it does not initiate the collection of new data. Because FETCh does not configure the instrument or acquire new input data, you can use FETCh repeatedly
on the same set of acquired data. For example, use two FETCh commands to
return wavelength and then power values for the same measurement. This is
shown in the following program fragment:
OUTPUT 720;”:INIT:CONT OFF;”
OUTPUT 720;”:CONF:ARR:POW MAX”
OUTPUT 720;”:INIT:IMM”
OUTPUT 720;”:FETC:ARR:POW?”
ENTER 720:powers$
OUTPUT 720;”:FETC:ARR:POW:WAV?”
ENTER 720:wavelengths$
In the example above, the data in the power and wavelength arrays are
returned in the same order so that powers can be matched to wavelengths.
Also, because new data is not collected, FETCh is especially useful when characterizing transient data.
4-11
Programming
Making Measurements
FETCh does not reconfigure the display. For example, if the display is in the
Peak WL mode, sending :FETCh:ARRay does not configure the display to the
List by WL even though an array of data is returned to the computer.
A common programming error occurs when the :FETCh command is used
after an *RST command. This generates error number –230, “Data corrupt or
stale”. In this instance, you must send :INIT:IMM after the *RST command and
before :FETCh command to capture a new array of measurement data.
:CONFigure command
The CONFigure command changes measurement settings without taking a
measurement. The instrument is placed in the List by WL , List by Ampl , Peak WL
display, or in the coherence length application.
CONFigure can be queried. The query returns the last configuration setup by
the CONFigure command. The instrument returns a string which is the last
instrument function sent by a CONFigure command or MEASure query. The
returned string is in the short command form. Use caution when using this
query , because if any instrument settings were changed since the last CONFigure command or MEASure query these changes may not be included in the
returned string.
For example, if the last CONFigure command was
:CONFigure:SCALar:POWer:WAVelength 1300NM, MAX
a CONFigure? query would return a string that is similar to the following line:
“POW:WAV 1.300000e-6,0.01”
The 1300NM and resolution
values track the actual instrument settings and
input signals. Notice that the quotation marks are part of the returned string.
Return single or multiple measurement values
You can specify whether FETCh, READ, or MEASure returns a single value
(SCALar) or multiple values (ARRay). The following example specifies SCALar data which returns a single value.
:MEASure:SCALar:POWer:WAVelength? MAX
4-12
Programming
Making Measurements
ARRay and the SCPI standard
According to the SCPI command reference, ARRay command causes an instrument to
take multiple measurements. (A <size> parameter indicates the number of measurements to take.) However, the HP 86120B’s ARRay command refers to the measurements
performed for one measurement sweep; this results in an array of measured signals.
Because the <size> parameter does not apply, any <size> parameter sent will be ignored
by the instrument. No syntax error will be generated if a <size> parameter is sent.
Always force the HP 86120B to wait for non-sequential commands
The HP 86120B normally processes its remote programming commands
sequentially. The instrument waits until the actions specified by a particular
command are completely finished before reading and executing the next command. However, there are a few non-sequential commands where this is not
true. Non-sequential commands do not finish executing before the next command is interpreted.
The following is a list of the HP 86120B’s non-sequential commands:
The benefit of non-sequential commands is that, in some situations, they can
reduce the overall execution times of programs. For example, you can set the
peak excursion, peak threshold, and elevation and use a *W AI command at the
end to save time. However, non-sequential commands can also be a source of
annoying errors. Always use the *OPC query or *WAI command with the nonsequential commands to ensure that your programs execute properly.
4-13
Programming
Making Measurements
For example, suppose that you wanted to set the elevation correction value
and then send an :INIT:IMM command. The following programming fragment
results in an error –213 “Init ignored” . This occurs because the :ELEVation
command causes the recalculation of the data which is like sending the
:INIT:IMM command. When the actual :INIT:IMM is sent, the error occurs
because the command is already in progress.
The :CALCulate3:DRIFt:PRESet command turns off the minimum, maximum,
difference, and reference states but leaves the drift state on.
Attempting to turn more than one state on at a time results in a “–221 Settings
Conflict” error.
The *RST and SYSTem:PRESet commands turn all calculations off.
CALCulate3:PRESet turns off any CALCulate3 calculations.
4-15
Programming
Making Measurements
The format of returned data
Measurements are returned as strings
All measurement values are returned from the HP 86120B as ASCII strings.
When an array is returned, the individual values are separated by the comma
character.
Determine the number of data points
When a FETCh, READ, or MEASure command is used (with ARRay specified), the first returned value indicates the total number of measurement values returned in the query.
If you use the:CALCulate1:DATA?, :CALCulate2:DATA?, or
:CALCulate3:DATA? queries to query data, send the :POINts? query first to
determine the number of values returned in the string. The string does not
contain a first value which specifies the string length. This is shown in the following example:
OUTPUT 720;”:CALCulate1:POINts?”
ENTER 720;Length
OUTPUT 720;”:CALCulate1:DATA?”
ENTER 720;Result$
Data can be corrected for elevation and vacuum
Normally, the HP 86120B provides measurement values calculated for conditions in air at sea level. Use the :SENSe:CORRection:ELEVation command to
compensate for air dispersion. Altitudes up to 5000 meters can be entered.
Use the :SENSe:CORRection:MEDium command to switch to readings in a
vacuum.
Amplitude units
The default amplitude units are dBm. If you need measurements in watts, use
the :UNIT:POWer command. When the HP 86120B is turned on, the amplitude
units are automatically set to the units used before the instrument was last
turned off.
4-16
Programming
Monitoring the Instrument
Monitoring the Instrument
Almost every program that you write will need to monitor the HP 86120B for
its operating status. This includes querying execution or command errors and
determining whether or not measurements have been completed. Several status registers and queues are provided to accomplish these tasks.
In this section, you’ll learn how to enable and read these registers. In addition
to the information in this section, you should review the commands documented in “Common Commands” on page 5-3 and “STATus Subsystem” on
page 5-74.
Status registers
The HP 86120B provides four registers which you can query to monitor the
instrument’s condition. These registers allow you to determine the following
items:
• Status of an operation
• Availability of the measured data
• Reliability of the measured data
All three registers are shown in the figure on the following page and have the
following uses:
Register Definition
Status Byte Monitors the status of the other three registers.
Standard Event Status This is the standard IEEE 488.2 register. Con-
tains bits which indicate the status of the other
two registers.
OPERation Status Contains bits that report on the instrument’s
normal operation.
QUEStionable Status Contains bits that report on the condition of the
signal.
4-17
Programming
Monitoring the Instrument
Status Byte register
The Status Byte Register contains summary bits that monitor activity in the
other status registers and queues. The Status Byte Register’s bits are set and
cleared by the presence and absence of a summary bit from other registers or
queues. Notice in the following figure that the bits in the Standard Event Status, OPERation status, and QUEStionable status registers are “or’d” to control
a bit in the Status Byte Register.
If a bit in the Status Byte Register goes high, you can query the value of the
source register to determine the cause.
The Status Byte Register can be read using either the *STB? common command or the HP-IB serial poll command. Both commands return the decimalweighted sum of all set bits in the register. The difference between the two
methods is that the serial poll command reads bit 6 as the Request Service
(RQS) bit and clears the bit which clears the SRQ interrupt. The *STB? command reads bit 6 as the Master Summary Status (MSS) and does not clear the
bit or have any effect on the SRQ interrupt. The value returned is the total bit
weights of all of the bits that are set at the present time.
OPERation Status and QUEStionable Status registers
You can query the value of the OPERation Status and QUEStionable Status
registers using commands in the STATus subsystem.
The STATus subsystem also has transition filter software which give you the
ability to select the logic transitions which set bits in the OPERation Status
and QUEStionable Status registers. For example, you can define the POWer
bit of the QUEStionable Status register to report an event when the condition
transitions from false to true. This is a positive transition. Y ou can also specify
a negative transition where the bit is set when the condition transitions from
true to false.
4-18
Programming
Monitoring the Instrument
4-19
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.