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.
Addressing and Initializing the Instrument 3-3
Making Measurements 3-5
Monitoring the Instrument 3-16
Reviewing SCPI Syntax Rules 3-23
Example Programs 3-29
Lists of Commands 3-43
Test 1. Absolute Wavelength Accuracy 5-3
Test 2. Sensitivity 5-4
Test 3. Polarization Dependence 5-5
Test 4. Optical Input Return Loss 5-6
Test 5. Amplitude Accuracy and Linearity 5-9
HP 86120C SER US39400020
Firmware Ver. 1.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
Commands are grouped in subsystems3-7
Measurement instructions give quick results3-9
The format of returned data3-15
Monitoring the Instrument3-16
Status registers3-17
Queues3-22
Reviewing SCPI Syntax Rules3-23
Example Programs3-28
Example 1. Measure a DFB laser3-30
Example 2. Measure WDM channels3-32
Example 3. Measure WDM channel drift3-34
Example 4. Measure WDM channel separation3-37
Example 5. Measure signal-to-noise ratio of each WDM channel3-39
Example 6. Increase a source’s wavelength accuracy3-41
Lists of Commands3-43
Programming
Programming
Programming
Programming
This chapter explains how to program the HP 86120C. 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 86120C responds to three types of commands:
• Common commands
• Measurement instructions
• Subsystem commands
All of these commands are documented in Chapter 4, “Programming Commands”.
3-2
Programming
Addressing and Initializing the Instrument
Addressing and Initializing the Instrument
The HP 86120C’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. You can change the HP-IB address from
the front panel as described in “To change the HP-IB address” on page 3-4.
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 86120C commands; they control HP-IB control
lines and do not send any characters to the HP 86120C.
LOCAL
softkey. This softkey can be pressed by the user to restore front
LOCAL
softkey from
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 programming 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.
3-3
Programming
Addressing and Initializing the Instrument
Set single acquisition mode
An advantage of using the *RST command is that it sets the HP 86120C into
the single measurement acquisition mode. Because the READ and MEASure
data queries expect this mode, their proper operation is ensured.
To change the HP-IB address
Press the Setup key.
Press
MORE
twice, then
3
Use the and softkeys to change the HP-IB address.
4
Press
RETURN
.
HP-IB
1
2
.
3-4
Programming
Making Measurements
Making Measurements
Making measurements remotely involves changing the HP 86120C’s settings,
performing a measurement, and then returning the data to the computer. The
simplified block diagram of the HP 86120C 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 32,768 data values are collected in fast-update measurement mode, the ability to resolve closely spaced signals is reduced.
3-5
Programming
Making Measurements
After collecting the uncorrected data, the HP 86120C searches the data for
the first 200 peak responses. (For WLIMit:OFF, searching starts at 1650 nm
and progresses towards 1270 nm. For WLIMit:ON, searching starts at
WLIMit:START and progresses toward 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 3-7, “Programming Commands,” on page 3-43
Table 3-8, “Keys Versus Commands,” on page 3-49
3-6
Programming
Making Measurements
Commands are grouped in subsystems
The HP 86120C commands are grouped in the following subsystems. You’ll
find a description of each command in Chapter 4, “Programming Commands”.
Subsystem Purpose of Commands
Measurement
Instructions Perform frequency, wavelength, and wavenumber
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. Queries time-
domain values of the input data.
STATus Queries instrument status registers.
SYSTem Presets HP 86120C 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 3-1 on page 3-8 shows the kinds of measurements that the HP 86120C
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 4, “Programming Commands” for the correct syntax for these commands.
uncorrected
corrected
peak data and sets wavelength limits.
frequency-spectrum data.
3-7
Programming
Making Measurements
Table 3-1. Commands for Capturing Data
Desired
Measurement
Wavelength (nm)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:WAVelength?
Frequency (THz)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:FREQuency?
Wavenumber (m–1)
Power (W, dBm)CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer?
Average Wavelength,
Wavenumber, or Frequency
Total Power (W, dBm)CALCulate2:PWAVerage:STATeCALCulate2:DATA?
Fabry-Perot LaserCALCulate3:FPERotRefer to “FPERot[:STATE]” on page 4-58
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
Data
Command to Configure Measurement
(partial listing)
CONFigure, FETCh, READ, and MEASureMEASure:ARRay:POWer:WNUMber?
The easiest way to measure wavelength, frequency, or power 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
4-14.
Each measurement instruction has an argument that controls the measurement update rate. This is equivalent to using the
:MEASure command
MEASure configures the HP 86120C, 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 3-2. The Different Forms of MEASure
Programming
Making Measurements
is
documented in “Measurement Instructions” on page
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 com-
puter.
3-9
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.
3-10
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 the :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, or Peak WL
display 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
3-11
Programming
Making Measurements
ARRay and the SCPI standard
According to the SCPI command reference, the ARRay command causes an instrument to
take multiple measurements. (A <size> parameter indicates the number of measurements to take.) However, the HP 86120C’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 86120C to wait for non-sequential commands
The HP 86120C 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 86120C’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.
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 an “–221 Set-tings Conflict” error.
The *RST and SYSTem:PRESet commands turn all calculations off.
CALCulate3:PRESet turns off any CALCulate3 calculations.
(delta power)
(delta wavelength)
(delta power and wavelength)
(drift)
(signal-to-noise ratios)
(signal-to-noise ratio averaging)
(difference)
(maximum drift)
(minimum drift)
(drift reference values)
3-14
Programming
Making Measurements
The format of returned data
Measurements are returned as strings
All measurement values are returned from the HP 86120C 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 86120C 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 86120C is turned on, the amplitude
units are automatically set to the units used before the instrument was last
turned off.
3-15
Programming
Monitoring the Instrument
Monitoring the Instrument
Almost every program that you write will need to monitor the HP 86120C 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 4-3 and “STATus Subsystem” on
page 4-86.
3-16
Programming
Monitoring the Instrument
Status registers
The HP 86120C 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 four 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.
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.
3-17
Programming
Monitoring the Instrument
3-18
Programming
Monitoring the Instrument
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.
Table 3-3. Bits in Operation Status Register
BitDefinition
0
1
2
3
4
5 through 8
9
10
11
12 through 16
not used
SETTling
- indicating that the instrument is waiting for the motor to reach the
proper position before beginning data acquisition.
RANGing
not used
MEASuring
not used
Processing
acquired.
Hardcopy
parallel port.
Averaging
noise for the signal-to-noise ratio calculation.
not used
- indicating the instrument is currently gain ranging.
- indicating that the instrument is making a measurement.
- indicating that the instrument is currently processing the data
- indicating that the instrument is currently printing the data to the
- indicating that the instrument is in the process of averaging the
3-19
Programming
Monitoring the Instrument
Table 3-4. Bits in Questionable Status Register
BitDefinition
0, 1, and 2
3
3 through 8not used
9
10
11
12 through 13not used
14
15
not used
POWer
- indicating that the instrument is measuring too high of a power.
Maximum signals
number of signals.
Drift Reference
from the current number of input signals.
Delta Reference
Command Warning
unexpected parameters for one of the measurement functions.
not used
- indicating that the instrument has found the maximum
- indicating that the number of reference signals is different
- indicating that there is no delta reference signal.
- indicating that the instrument has received some extra
Standard Event Status register
The Standard Event Status Register monitors the following instrument status
events:
• OPC - Operation Complete
• RQC - Request Control
• QYE - Query Error
• DDE - Device Dependent Error
• EXE - Execution Error
• CME - Command Error
• URQ - User Request
• PON - Power On
When one of these events occur, the event sets the corresponding bit in the
register. If the bits are enabled in the Standard Event Status Enable Register,
the bits set in this register generate a summary bit to set bit 5 (ESB) in the
Status Byte Register.
The contents of the Standard Event Status Register can be read and the register cleared by sending the *ESR? query. The value returned is the total bit
weights of all of the bits that are set at the present time.
3-20
Programming
Monitoring the Instrument
Enabling register bits with masks
Several masks are available which you can use to enable or disable individual
bits in each register. For example, you can disable the Hardcopy bit in the
OPERation Status Register so that even though it goes high, it can never set
the summary bit in the status byte high.
Use the *SRE common command to set or query the mask for the Status Byte
Register.
The masks for the OPERation Status and QUEStionable Status registers are
set and queried using the STATus subsystem’s ENABle commands.
Use the *ESE common command to set or query the mask for the Standard
Event Status Register.
The *CLS common command clears all event registers and all queues except
the output queue. If *CLS is sent immediately following a program message
terminator, the output queue is also cleared. In addition, the request for the
*OPC bit is also cleared.
For example, suppose your application requires an interrupt whenever any
type of error occurs. The error related bits in the Standard Event Status Register are bits 2 through 5. The sum of the decimal weights of these bits is 60.
Therefore, you can enable any of these bits to generate the summary bit by
sending the *ESE 60 command.
Whenever an error occurs, it sets one of these bits in the Standard Event Status Register. Because the bits are all enabled, a summary bit is generated to
set bit 5 in the Status Byte Register.
If bit 5 (ESB) in the Status Byte Register is enabled (via the *SRE command),
an SRQ service request interrupt is sent to the external computer.
Standard Event Status Register bits that are not enabled still respond to their
corresponding conditions (that is, they are set if the corresponding event
occurs). However, because they are not enabled, they do not generate a summary bit to the Status Byte Register.
3-21
Programming
Monitoring the Instrument
Queues
There are two queues in the instrument: the output queue and the error
queue. The values in the output queue and the error queue can be queried.
Output queue
The output queue stores the instrument responses that are generated by certain commands and queries that you send to the instrument. The output
queue generates the Message Available summary bit when the output queue
contains one or more bytes. This summary bit sets the MAV bit (bit 4) in the
Status Byte Register. The method used to read the Output Queue depends
upon the programming language and environment. For example, with
HP Basic, the output queue may be read using the ENTER statement.
Error queue
As errors are detected, they are placed in an error queue. Instrument specific
errors are indicated by positive values. General errors have negative values.
You can clear the error queue by reading its contents, sending the *CLS command, or by cycling the instrument’s power.
The error queue is first in, first out. If the error queue overflows, the last error
in the queue is replaced with error -350, “Queue overflow.” Any time the
queue overflows, the least recent errors remain in the queue, and the most
recent error is discarded. The length of the instrument’s error queue is 30 (29
positions for the error messages, and 1 position for the “Queue overflow” message).
The error queue is read with the SYSTEM:ERROR? query. Executing this
query reads and removes the oldest error from the head of the queue, which
opens a position at the tail of the queue for a new error. When all the errors
have been read from the queue, subsequent error queries return 0, “No error.”
For more information on reading the error queue, refer to “ERRor” on page
4- 94. For a list of errors messages, refer to “
7-11.
エラー・メッセージ
” on page
3-22
Programming
Reviewing SCPI Syntax Rules
Reviewing SCPI Syntax Rules
SCPI command are grouped in subsytems
In accordance with IEEE 488.2, the instrument’s commands are grouped into
“subsystems.” Commands in each subsystem perform similar tasks. The following subsystems are provided:
Measurement Instructions
Calculate1 Subsystem
Calculate2 Subsystem
Calculate3 Subsystem
Display Subsystem
Hcopy Subsystem
Sense Subsystem
Status Subsystem
System Subsystem
Trigger Subsystem
Unit Subsystem
Sending a command
It’s easy to send a command to the instrument. Simply create a command
string from the commands listed in this book, and place the string in your program language’s output statement. For commands other than common commands, include a colon before the subsystem name. For example, the
following string places the cursor on the peak laser line and returns the power
level of this peak:
OUTPUT 720;”:MEAS:SCAL:POW? MAX”
Use either short or long forms
Commands and queries may be sent in either long form (complete spelling) or
short form (abbreviated spelling). The description of each command in this
manual shows both versions; the extra characters for the long form are shown
in lowercase. The following is a long form of a command:
OUTPUT 720;”:MEASure:SCALar:POWer? MAXimum”
And this is the short form of the same command:
3-23
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.