written permission is prohibited, except as allowed under the copyright
laws.
Printed in the UK.
iiHP EPM-441A/442A Programming Guide
Legal Information
Legal Information
Notice
Information contained in this document is subject to change without
notice. 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. Hewlett-Packard
shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishings, performance,
or use of this material. No part of this document may be photocopied,
reproduced, or translated to another language without the prior written
consent of HP.
Certification
Hewlett-Packard Company certifies that this product met its published
specifications at the time of shipment from the factory. Hewlett-Packard
further certifies that its calibration measurements are traceable to the
United States National Institute of Standards and Technology, to the
extent allowed by the Institute’s calibration facility, and to the calibration
facilities of other International Standards Organization members.
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. F or warranty
service or repair, this product must be returned to a service facility
designated by HP. Buyer shall prepay shipping charges to HP and HP
shall pay shipping charges, duties, and taxes for products returned to HP
from another country. HP warrants that its software and firmware
designated by HP for use with an instrument will execute its
programming instructions when properly installed on that instrument.
HP does not warrant that the operation of the instrument, or firmware
will be uninterrupted or error free.
HP EPM-441A/442A Programming Guideiii
Legal Information
Limitation of Warranty
The foregoing warranty shall not apply to defects resulting from improper
or inadequate maintenance by Buyer, Buyer-supplied 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 .
HP 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. HP SHALL NOT BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER BASED ON CONTRACT, TORT, OR ANY
OTHER LEGAL THEORY.
ivHP EPM-441A/442A Programming Guide
Equipment Operation
Equipment Operation
Warnings and Cautions
This guide uses warnings and cautions to denote hazards.
WARNINGA warning calls attention to a procedure, practice or the
like, which, if not correctly performed or adhered to, could
result in injury or the loss of life. Do not proceed beyond a
warning until the indicated conditions are fully
understood and met.
CautionA caution calls attention to a procedure, practice or the like which,
if not correctly performed or adhered to, could result in damage to
or the destruction of part or all of the equipment. Do not proceed
beyond a caution until the indicated conditions are fully
understood and met.
Personal Safety Considerations
WARNINGThis is a Safety Class I product (provided with a protective
earthing ground incorporated in the power cord). The
mains plug shall only be inserted in a socket outlet
provided with a protective earth contact. Any interruption
of the protective conductor, inside or outside the
instrument, is likely to make the instrument dangerous.
Intentional interruption is prohibited.
If this instrument is not used as specified, the protection
provided by the equipment could be impaired. This
instrument must be used in a normal condition (in which
all means of protection are intact) only.
No operator serviceable parts inside. Refer servicing to
qualified personnel. To prevent electrical shock, do not
remove covers.
For continued protection against fire hazard, replace the
line fuse(s) only with fuses of the same type and rating (for
example, normal blow, time delay, etc.). The use of other
fuses or material is prohibited.
HP EPM-441A/442A Programming Guidev
General Safety Considerations
General Safety Considerations
WARNINGBefore this instrument is switched on, make sure it has
been properly grounded through the protective conductor
of the ac power cable to a socket outlet provided with
protective earth contact.
Any interruption of the protective (grounding) conductor,
inside or outside the instrument, or disconnection of the
protective earth terminal can result in personal injury.
CautionAny adjustments or service procedures that require operation of
the instrument with protective covers removed should be
performed only by trained service personnel.
Markings
The CE mark shows that the product complies with
all the relevant European legal Directives (if
accompanied by a year, it signifies when the design
was proven.
GROUP 1
ISM
viHP EPM-441A/442A Programming Guide
CLASS A
This is the symbol of an Industrial Scientific and
Medical Group 1 Class A product.
The CSA mark is a registered trademark of the
Canadian Standards Association.
External Protective Earth Terminal.
While this is a Class I product, provided with a
protective earthing conductor in a power cord, an
external protective earthing terminal has also been
provided. This terminal is for use where the earthing
cannot be assured. At least an 18AWG earthing
conductor should be used in such an instance, to
ground the instrument to an assured earth terminal.
General Safety Considerations
IEC 1010-1 Compliance
This instrument has been designed and tested in accordance with IEC
Publication 1010-1 +A1:1992 Safety Requirements for Electrical
Equipment for Measurement, Control and Laboratory Use and has been
supplied in a safe condition. The instruction documentation contains
information and warnings which must be followed by the user to ensure
safe operation and to maintain the instrument in a safe condition.
HP EPM-441A/442A Programming Guidevii
About this Guide
About this Guide
Chapter 1: Power Meter Remote Operation
This chapter describes the parameters which configure the power meter
and help you determine settings to optimize performance.
Chapter 2: Application Programs
This chapter provides several remote interface application programs to
aid you in developing measurement programs.
Chapter 3: SCPI Command Reference
This chapter provides reference information to help you program the
power meter over the remote interface using SCPI (Standard Commands
for Programmable Instruments).
Chapter 4: Alternate Programming Language
This chapter provides information on how you can configure the HP EPM441A/442A Power Meter to accept and execute the commands of either the
HP 437B Power Meter or the HP 438A Power Meter.
Chapter 6: IEEE488.2 Command Reference
This chapter contains information about the IEEE 488.2 Common (*)
Commands that the power meter supports.
viiiHP EPM-441A/442A Programming Guide
List of Related Publications
List of Related Publications
The HP EPM-441A User’s Guide and the HP EPM-442A User’s Guide are
available in the following languages:
•English Language User’s Guide - Standard
•German Language User’s Guide - Option ABD
•Spanish Language User’s Guide - Option ABE
•French Language User’s Guide - Option ABF
•Italian Language User’s Guide - Option ABZ
•Japanese Language User’s Guide - Option ABJ
HP EPM-441A/442A Service Guide is available by ordering Option 915.
HP 440A/442A CLIPs (Component Location and Information Pack) is
available by ordering E4418-90007.
Useful information on SCPI (Standard Commands for Programmable
Instruments) can be found in:
•A Beginner’s Guide to SCPI, which is available by ordering
HP Part Number 5010-7166.
•The SCPI reference manuals which are available from:
SCPI Consortium,
8380 Hercules Drive, Suite P3,
La Mesa, CA 91942, USA.
Telephone: 619-697-4301
Fax: 619-697-5955
HP EPM-441A/442A Programming Guideix
List of Related Publications
xHP EPM-441A/442A Programming Guide
Table of Contents
Page
Legal Information ........................................................................iii
This chapter describes the parameters which configure the power meter
and help you determine settings to optimize performance. It contains the
following sections:
“Configuring the Remote Interface”, on page 1-3.
“Zeroing and Calibrating the Power Meter”, on page 1-8.
“Making Measurements”, on page 1-11.
“Using Sensor Calibration Tables”, on page 1-27.
“Setting the Range, Resolution and Averaging”, on page 1-37.
“Setting Offsets”, on page 1-41.
“Setting Measurement Limits”, on page 1-43.
“Measuring Pulsed Signals”, on page 1-46.
“Triggering the Power Meter”, on page 1-49.
“Getting the Best Speed Performance”, on page 1-54.
“How Measurements are Calculated”, on page 1-58.
“Status Reporting”, on page 1-59.
“Saving and Recalling Power Meter Configurations”, on page 1-80.
“Using Device Clear to Halt Measurements”, on page 1-81.
“An Introduction to the SCPI Language”, on page 1-82.
“Quick Reference”, on page 1-91.
“SCPI Compliance Information”, on page 1-99.
1-2HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Configuring the Remote Interface
Configuring the Remote Interface
This section describes how to configure the remote interface.
HP-IB Address
Each device on the HP-IB (IEEE-488) interface must have a unique
address. You can set the power meter’s address to any value between 0
and 30. The address is set to 13 when the power meter is shipped from the
factory.
The address is stored in non-volatile memory, and does not change when
the power meter is switched off, or after a remote interface reset.
Your HP-IB bus controller has its own address. Avoid using the bus
controller’s address for any instrument on the interface bus.
Hewlett-Packard controllers generally use address 21.
To set the HP-IB address from the front panel:
1. Press,. The current HP-IB address is displayed on
the softkey.
System
Inputs
HP-IB Addr
2. To change this setting press. The power meter
displays the address in a pop up window on the measurement
screen. Modify this address (see below) as desired.
■Use or to modify the digit on which the cursor is
currently positioned.
■Use or to move to other digits.
3. To confirm your choice press.
HP-IB
HP-IB Addr
Enter
To set the HP-IB address from the remote interface use the:
•SYSTem:COMMunicate:GPIB:ADDRess command.
To query the HP-IB address from the remote interface use the;
•SYSTem:COMMunicate:GPIB:ADDRess? query.
HP EPM-441A/442A Programming Guide1-3
Power Meter Remote Operation
Configuring the Remote Interface
Programming Language Selection (HP EPM-441A only)
You can select one of two languages to program the power meter from the
remote interface. The language is SCPI when the power meter is shipped
from the factory. The other language is the HP 437B programming
language.
The language selection is stored in non-volatile memory, and does not
change when power has been off or after a remote interface reset.
To select the interface language from the front panel:
1. Press,,.
System
Inputs
2. Select the language you require from and.
To select the interface language from the remote interface use the:
•SYSTem:LANGuage command.
To query the interface language from the remote interface use the:
•SYSTem:LANGuage? query.
HP-IBCommand Set
HP 437BSCPI
Table 1-1 details all the HP 437B commands that the HP EPM-441A
supports and their function. For a detailed description of these commands
refer to the HP 437B Power Meter Operating Manual. In addition the
SYST:LANG SCPI command allows you to return to using the SCPI
programming language when in the HP 437B mode.
1-4HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Configuring the Remote Interface
Table 1-1: HP 437B Command Summary
CommandDescription
CL
*CLS
CS
CT
DA
DC0
DC1
1
Calibrate
Clear all status registers
Clear the status byte
Clear sensor table
All display segments on
Duty Cycle off
Duty Cycle on
DDDisplay disable
DEDisplay enable
DF
1
DN
1
DU
DY
EN
ERR?
*ESR?
*ESE
*ESE?
ET
EX
FA
FH
FM
FR
GT0
GT1
GT2
GZ
HZ
ID
*IDN?
KB
Display enable
Down arrow key
Display user message
Enter duty cycle
Enter
Device error query
Event status register query
Set event status register mask
Event status register mask query
Edit sensor table
Exit
Automatic filter selection
Filter hold
Manual filter selection
Enter measurement frequency
Ignore GET bus command
Trigger immediate response to GET
Trigger with delay response to GET
Gigahertz
Hertz
Identification query
Identification query
Enter measurement cal factor
HP EPM-441A/442A Programming Guide1-5
Power Meter Remote Operation
Configuring the Remote Interface
CommandDescription
KZ
LG
LH
LL
LM0
LM1
LN
LP2
LT
MZ
OC0
OC1
OD
OF0
OF1
OS
PCT
PR
RA
RC
RE
RF
RH
RL0
RL1
RL2
RM
*RST
RT
RV
SE
SM
SN
1
1
Kilohertz
Log units (dBm/dB)
Enter high (upper) limit
Enter low (lower) limit
Disable limits checking
Enable limits checking
Linear units (watts/%)
Learn mode
Left arrow key
Megahertz
Reference oscillator off
Reference oscillator on
Output display
Offset off
Offset on
Enter offset value
Percent
Preset
Auto range
Recall instrument configuration
Set display resolution
Enter sensor table reference calibration factor
Range hold
Exit from relative mode
Enter relative mode (take new reference)
Enter relative mode (use last reference)
Set measurement range
Reset
Right arrow key
Read service request mask
Select sensor calibration table
Status message
Enter sensor identification/serial number
1-6HP EPM-441A/442A Programming Guide
Configuring the Remote Interface
CommandDescription
1
SP
SPD 20|40
2
*SRE
*SRE?
ST
*STB?
SYST:LANG SCPI
TR0
TR1
TR2
TR3
UP
4
1
*TST?
ZE
@1
@2
%
Special
Set the service request mask
Service request mask query
Store (save) power meter configuration
Read status byte
3
Selects SCPI language
Trigger hold
Trigger immediate
Trigger with delay
Trigger free run
Self test query
Up arrow key
Zero
Prefix for status mask
Learn mode prefix
Percent
Power Meter Remote Operation
1. This command is accepted but has no active function.
2. This command is not an original HP 437B command. However , it can be used to
set the measurement speed to 20 or 40 readings/sec in HP 437B mode. See
SENSE:SPEED for more details.
3. This command is not an original HP 437B command. However , it can be used to
terminate the HP 437B language and select the SCPI language. Note that it is
recommended that the instrument is Preset following a language switch.
4. Always returns 0000 in HP 437B language.
HP EPM-441A/442A Programming Guide1-7
Power Meter Remote Operation
Zeroing and Calibrating the Power Meter
Zeroing and Calibrating the Power Meter
This section describes how to zero and calibrate the power meter.
The calibration and zeroing commands are overlapped commands refer to
“Using the Operation Complete Commands”, on page 1-78 to determine
when the commands are complete.
Zeroing
Zeroing adjusts the power meter’s specified channel for a zero power
reading with no power applied to the power sensor.
The command used to zero the power meter is:
CALibration[1|2]:ZERO:AUTO ONCE
The command assumes that there is no power being applied to the sensor.
It turns the power reference oscillator off, then after zeroing, returns the
power reference oscillator to the same state it was in prior to the command
being received. Zeroing takes approximately 10 seconds depending on the
type of power sensor being used.
When to Zero?
Zeroing of the power meter is recommended:
•when a 50C change in temperature occurs.
•when you change the power sensor.
•every 24 hours.
•prior to measuring low level signals. F or example , 10 dB above the
lowest specified power for your power sensor.
Calibration
Calibration sets the gain of the power meter using a 50 MHz 1 mW
calibrator as a traceable power reference. The power meter’s POWER REF
output or a suitable external reference is used as the signal source for
calibration. An essential part of calibrating is setting the correct reference
calibration factor for the power sensor you are using. The HP 8480 series
power sensors require you to set the reference calibration factor. The
HP E-series power sensors set the reference calibration factor
1-8HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Zeroing and Calibrating the Power Meter
automatically. Offset, relative and duty cycle settings are ignored during
calibration.
The command used to calibrate the power meter is:
CALibration[1|2]:AUTO ONCE
The command assumes that the power sensor is connected to a 1 mW
reference signal. It turns the power reference oscillator on, then after
calibrating, returns the power reference oscillator to the same state it was
in prior to the command being received. It is recommended that you zero
the power meter before calibrating.
Calibration Sequence
This feature allows you to perform a complete calibration sequence with a
single query. The query is:
CALibration[1|2][:ALL]?
The query assumes that the power sensor is connected to the power
reference oscillator. It turns the power reference oscillator on, then after
calibrating, returns the power reference oscillator to the same state it was
in prior to the command being received. The calibration sequence consists
of:
•Zeroing the power meter (CALibration[1|2]:ZERO:AUTOONCE), and
•calibrating the power meter (CALibration[1|2]:AUTO ONCE).
The query enters a number into the output buffer when the sequence is
complete. If the result is 0 the sequence was successful. If the result is 1
the sequence failed. Refer to “CALibration[1|2][:ALL]?”, on page 4-5 for
further information.
NoteThe CALibration[1|2][:ALL] command is identical to the
CALibration[1|2][:ALL]? query except that no number is
returned to indicate the outcome of the sequence. You can examine
the Questionable Status Register or the error queue to discover if
the sequence has passed or failed. Refer to “Status Reporting”, on
page 1-59 for further information.
HP EPM-441A/442A Programming Guide1-9
Power Meter Remote Operation
Zeroing and Calibrating the Power Meter
Setting the Reference Calibration Factor
All the HP 8480 series power sensors require you to set the reference
calibration factor. The reference calibration factor can be set by:
•entering the value into the power meter using the
CALibrate[1|2]:RCFactor command.
•selecting and enabling the sensor calibration table. The reference
calibration factor is automatically set by the power meter using
the reference calibration factor stored in the sensor calibration
table. See “Using Sensor Calibration Tables”, on page 1-27 for
further information.
Examples
a) To enter a reference calibration factor of 98.7% for channel A, you
should use the following command :
CAL:RCF 98.7PCT
This overides any RCF previously set by selecting a sensor
calibration table.
b) To automatically set the reference calibration factor, you have to
use a sensor calibration table as described in “Using Sensor
Calibration Tables”, on page 1-27. To select and enable the table d
use the following commands:
[SENSe[1]]|SENSe2:CORRection:CSET:SELect <string>
[SENSe[1]]|SENSe2:CORRection:CSET:STATe ON
When the sensor calibration table is selected the RCF from the
table overides any value previously set.
Querying the Reference Calibration Factor
To determine the current reference calibration factor, use the following
command:
CALibration[1|2]:RCFactor?
1-10HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Making Measurements
The MEASure? and CONFigure commands provide the most
straight-forward method to program the power meter for measurements.
You can select the measurement’s expected power level, resolution and
with the HP EPM-442A the measurement type (that is single channel,
difference or ratio measurements) all in one command. The power meter
automatically presets other measurement parameters to default values as
shown in Table 1-2.
Table 1-2: MEASure? and CONFigure Preset States
Command
Trigger source
(TRIGger:SOURce)
Filter
(SENSe:AVERage:COUNt:AUTO)
Filter state
(SENSe:AVERage:STATe)
Trigger cycle
(INITiate:CONTinuous)
Trigger Delay
(TRIGger:DELay:AUTO)
An alternative method to program the power meter is to use the lower
level commands. The advantage of using the lower level commands over
the CONFigure command is that they give you more precise control of the
power meter. As shown in Table 1-2 the CONFigure command presets
various states in the power meter. It may be likely that you do not want to
preset these states. Refer to “Using the Lower Level Commands”, on
page 1-26 for further information.
MEASure? and CONFigure
Setting
Immediate
On
On
Off
On
HP EPM-441A/442A Programming Guide1-11
Power Meter Remote Operation
Making Measurements
Using MEASure?
The simplest way to program the power meter for measurements is by
using the MEASure? query. However, this command does not offer much
flexibility. When you execute the command, the power meter selects the
best settings for the requested configuration and immediately performs
the measurement. You cannot change any settings (other than the
expected power value, resolution and with the HP EPM-442A the
measurement type) before the measurement is taken. This means you
cannot fine tune the measurement, for example, you cannot change the
filter length. To make more flexible and accurate measurements use the
CONFIGure command. The measurement results are sent to the output
buffer. MEASure? is a compound command which is equivalent to an
ABORT, followed by a CONFigure, followed by a READ?.
MEASure? Examples
The following commands show a few examples of how to use the
MEASure? query to make a measurement. It is advisable to read through
these examples in order as they become increasingly more detailed. These
examples configure the power meter for a measurement (as described in
each individual example), automatically place the power meter in the
“wait-for-trigger” state, internally trigger the power meter to take one
reading, and then sends the reading to the output buffer.
These examples give an overview of the MEASure? query. For further
information on the MEASure? commands refer to the section
“MEASure[1|2] Commands” starting on page 2-49 .
Example 1 - The Simplest Method
The following commands show the simplest method of making single
channel (for example A or B) measurements. Using MEAS1? will result in
an upper window measurement, and MEAS2? in a lower window
measurement. The channel associated with the window can be set using
the source list parameter (see example 2), or will default as in this
example (See “HP EPM-442A only” on page 15.).
specifies window
MEAS1?
MEAS2?
1-12HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Example 2 - Specifying the Source List Parameter
The MEASure command has three optional parameters, an expected power
value, a resolution and a source list. These parameters must be entered in
the specified order. If parameters are omitted, they will default from the
right. The parameter DEFault is used as a place holder.
The following example uses the source list parameter to specify the
measurement channel as channel A. The expected power and resolution
parameters are defaulted, leaving them at their current settings. The
measurement is carried out on the upper window.
specifies windowspecifies channel
MEAS1? DEF,DEF,(@1)
The operation of the MEAS1? command when the source list parameter is
defaulted is described in the note on page 1-15.
NoteFor the HP EPM-441A it is not necessary to specify a channel as
only one channel is available.
Example 3 - Specifying the Expected Power Parameter
The previous example details the three optional parameters which can be
used with the MEASure? command. The first optional parameter is used to
enter an expected power value. Entering this parameter is only relevant if
you are using an HP E-series power sensor. The value entered determines
which of the power sensor’s two ranges is used for the measurement. If the
current setting of the power sensor’s range is no longer valid for the new
measurement, specifying the expected power value decreases the time
taken to obtain a result.
The following example uses the expected value parameter to specify a
value of -50 dBm. This selects the power sensor’s lower range (refer to
“Range”, on page 1-37 for details of the range breaks). The resolution
parameter is defaulted, leaving it at its current setting. The source list
parameter specifies a channel B measurement. The measurement is
displayed on the lower window.
specifies expected power value
specifies windowspecifies channel
MEAS2? -50,DEF,(@2)
HP EPM-441A/442A Programming Guide1-13
Power Meter Remote Operation
Making Measurements
Example 4 - Specifying the Resolution Parameter
The previous examples detailed the use of the expected value and source
list parameters. The resolution parameter is used to set the resolution of
the specified window. This parameter does not affect the resolution of the
HP-IB data, however it does affect the auto averaging setting (refer to
Figure 1-2 on page 1-39).
Since the filter length used for a channel with auto-averaging enabled is
dependent on the window resolution setting, a conflict arises when a given
channel is set up in both windows and the resolution settings are
different. In this case, the higher resolution setting is used to determine
the filter length.
The following example uses the resolution parameter to specify a
resolution setting of 3. This setting represents 3 significant digits if the
measurement suffix is W or %, and 0.01 dB if the suffix is dB or dBm (for
further details on the resolution parameter refer to the commands in
Chapter 2, “MEASurement Instructions”.). Also, in this example the
expected power and source list parameters are defaulted. The expected
power value will be left unchanged at its current setting. The source list
parameter will be defaulted as described in the note on page 1-15. Note
that as the source list parameter is the last specified parameter you do not
have to specify DEF. The measurement is carried out on the upper window .
specifies windowspecifies resolution setting
MEAS1? DEF,3
Example 5 - Making a Difference Measurement
The following command can only be carried out on the HP EPM-442A. It
queries the lower window to make a difference measurement of
channelB-channel A . The expected power and resolution parameters
are defaulted, leaving them at their current settings.
specifies between which channels
specifies window
the difference is calculated
MEAS2:POW:AC:DIFF? DEF,DEF,(@2),(@1)
Channel B - A
1-14HP EPM-441A/442A Programming Guide
Example 6 - Making a Ratio Measurement
The following command can only be carried out on the HP EPM-442A. It
queries the upper window to make a ratio measurement of channel A/B .
The expected power and resolution parameters are defaulted, leaving
them at their current settings.
specifies window
MEAS1:POW:AC:RAT? DEF,DEF,(@1),(@2)
NoteHP EPM-442A only
The operation of the MEASure? command when the source list
parameter is defaulted depends on the current setup of the window
concerned (for example, A, B, A/B, A-B etc.) and on the particular
command used (for example, MEAS[:POW][:AC]? and
MEAS:POW:AC:RAT? etc).
Power Meter Remote Operation
Making Measurements
specifies the relationship of the
channels in the ratio
Channel A / B
This means that when the source list parameter is defaulted, there
are a number of possibilities.
CommandCurrent Window SetupMeasurement
MEAS1[:POW][AC]?Upper Window: AA
BB
Any OtherA
MEAS2[:POW][AC]?Lower Window: AA
BB
Any OtherB
MEAS1:POW:AC:RATUpper Window: A/BA/B
B/AB/A
Any OtherA/B
HP EPM-441A/442A Programming Guide1-15
Power Meter Remote Operation
Making Measurements
CommandCurrent Window SetupMeasurement
MEAS2:POW:AC:RATLower Window: A/B
B/A
Any Other
MEAS1:POW:AC:DIFF?Upper Window: A-B
B-A
Any Other
MEAS2:POW:AC:DIFF?Lower Window: A-B
B-A
Any Other
A/B
B/A
A/B
A-B
B-A
A-B
A-B
B-A
A-B
1-16HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Using the CONFigure Command
When you execute this command, the power meter presets the best
settings for the requested configuration (like the MEASure? query).
However, the measurement is not automatically started and you can
change measurement parameters before making measurements. This
allows you to incrementally change the power meter’s configuration from
the preset conditions. The power meter offers a variety of low-level
commands in the SENSe, CALCulate, and TRIGger subsystems. For
example, if you want to change the averaging use the
[SENSe[1]]|SENSe2:AVERage:COUNt command.
Use the INITiate or READ? query to initiate the measurement.
Using READ?
CONFigure does not take the measurement. One method of obtaining a
result is to use the READ? query. The READ? query takes the measurement
using the parameters set by the CONFigure command then sends the
reading to the output buffer. Using the READ? query will obtain new data.
Using INITiate and FETCh?
CONFigure does not take the measurement. One method of obtaining the
result is to use the INITiate and FETCh? commands. The INITiate
command causes the measurement to be taken. The FETCh? query
retrieves a reading when the measurement is complete, and sends the
reading to the output buffer. FETCh? can be used to display the
measurement results in a number of different formats (for example, A/B
and B/A) without taking fresh data for each measurement.
CONFigure Examples
The following program segments show how to use the READ? command
and the INITiate and FETCh? commands with CONFigure to make
measurements.
It is advisable to read through these examples in order as they become
increasingly more detailed.
These examples give an overview of the CONFigure command. F or further
information on the CONFigure commands refer to Chapter 2,
“MEASurement Instructions”.
HP EPM-441A/442A Programming Guide1-17
Power Meter Remote Operation
Making Measurements
Example 1 - The Simplest Method
The following program segments show the simplest method of querying
the upper and lower window’s measurement results respectively.
Using READ?
*RSTReset instrument
CONF1Configure upper window - defaults to a channel A
measurement
READ1?Take upper window (channel A) measurement
*RSTReset instrument
CONF2Configure the lower window - defaults to channel A
(HP EPM-441A), Channel B (HP EPM-442A) measurement
READ2?Take lower window measurement (channel A on
HP EPM-441A, B on HP EPM-442A)
Using INITiate and FETCh?
*RSTReset instrument
CONF1Configure upper window - defaults to a channel A
measurement
INIT1Causes channel A to make a measurement
FETC1?Retrieves the upper window’s measurement
For the HP EPM -441A only:
*RSTReset instrument
CONF2Configure lower window - HP EPM-441A defaults to channel A
INIT1?Causes channel A to make measurement
FETC2?Retrieves the lower window’s measurement
For the HP EPM-442A only:
*RSTReset instrument
CONF2Configure lower window
INIT2?Causes channel B to make measurement
FETC2?Retrieves the lower window’s measurement
1-18HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Example 2 - Specifying the Source List Parameter
The CONFigure and READ? commands have three optional parameters,
an expected power value, a resolution and a source list. These parameters
must be entered in the specified order . If parameters are omitted, they will
default from the right. The parameter DEFault is used as a place holder.
The following examples use the source list parameter to specify the
measurement channel as channel A. The expected power and resolution
parameters are defaulted, leaving them at their current settings. The
measurement is carried out on the upper window.
Although the READ? and FETCh? queries have three optional parameters
it is not necessary to define them as shown in these examples. If they are
defined they must be identical to those defined in the CONFigure
command otherwise an error occurs.
NoteFor the HP EPM-441A it is not necessary to specify a channel as
only one channel is available.
Using READ?
ABOR1Aborts channel A
CONF1 DEF,DEF,(@1)Configures the upper window to
make a channel A measurement
using the current expected power
and resolution settings.
READ1?Takes the upper window’s
measurement.
Using INITiate and FETCh?
ABOR1Aborts channel A
CONF1 DEF,DEF,(@1)Configures the upper window to
make a channel A measurement
using the current expected power
and resolution settings.
INIT1Causes channel A to make a
measurement.
FETC1?Retrieves the upper window’s
measurement.
HP EPM-441A/442A Programming Guide1-19
Power Meter Remote Operation
Making Measurements
Example 3 - Specifying the Expected Power Parameter
The previous example details the three optional parameters which can be
used with the CONFigure and READ? commands. The first optional
parameter is used to enter an expected power value. Entering this
parameter is only relevant if you are using an HP E-series power sensor.
The value entered determines which of the power sensor’s two ranges is
used for the measurement. If the current setting of the power sensor’s
range is no longer valid for the new measurement, specifying the expected
power value decreases the time taken to obtain a result.
The following example uses the expected value parameter to specify a
value of -50 dBm. This selects the power meter’s lower range (refer to
“Range”, on page 1-37 for details of the range breaks). The resolution
parameter is defaulted, leaving it at its current setting. The source list
parameter specifies a channel B measurement. The measurement is
carried out on the upper window.
Using READ?
ABOR2Aborts channel B
CONF1 -50,DEF,(@2)Configures the upper window to
make a channel B measurement
using an expected power of
-50 dBm and the current
resolution setting.
READ1?Takes the upper window’s
measurement.
Some fine tuning of measurements can be carried out using the
CONFigure and READ? commands. For example, in the above program
segment some fine tuning can be carried out by setting the filter length to
1024 and the trigger delay off.
ABOR2
CONF1 -50,DEF,(@2)
SENS2:AVER:COUN 1024
TRIG2:DEL:AUTO OFF
READ1?
1-20HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Using INITiate and FETCh?
ABOR2Aborts channel B
CONF1 -50,DEF,(@2)Configures the upperwindow to
make a channel B measurement
using an expected power of
-50 dBm and the current
resolution setting.
INIT2Causes channel B to make a
measurement.
FETC1?Retrieves the upper window’s
measurement.
Some fine tuning of measurements can be carried out using the
CONFigure command and INITiate and FETCh? commands. For
example, in the above program segment some fine tuning can be carried
out by setting the filter length to 1024 and the trigger delay off.
ABOR2
CONF1 -50,DEF,(@2)
SENS2:AVER:COUN 1024
TRIG2:DEL:AUTO OFF
INIT2
FETC1?
HP EPM-441A/442A Programming Guide1-21
Power Meter Remote Operation
Making Measurements
Example 4 - Specifying the Resolution Parameter
The previous examples detailed the use of the expected value and source
list parameters. The resolution parameter is used to set the resolution of
the specified window. This parameter does not affect the resolution of the
HP-IB data, however it does affect the auto averaging setting (refer to
Figure 1-2 on page 1-39).
Since the filter length used for a channel with auto-averaging enabled is
dependent on the window resolution setting, a conflict arises when a given
channel is set up in both windows and the resolution settings are
different. In this case, the higher resolution setting is used to determine
the filter length.
The following example uses the resolution parameter to specify a
resolution setting of 3. This setting represents 3 significant digits if the
measurement suffix is W or %, and 0.01 dB if the suffix is dB or dBm (for
further details on the resolution parameter refer to the commands in
Chapter 2, “MEASurement Instructions”). Also, in this example the
expected power and source list parameters are defaulted. The expected
power value will be left unchanged at its current setting. The source list
parameter will be defaulted as described in the note on page 1-15. Note
that as the source list parameter is the last specified parameter you do not
have to specify DEF.
Using READ?
ABOR1Aborts channel A.
CONF1 DEF,3Configures the upper window to make a
measurement using the current setting of the
expected power and source list and a resolution
setting of 3.
READ1?T akes the upper window’s measurement. T his will be
a channel A or B measurement depending on current
window setup
Some fine tuning of the above program segment can be carried out for
example, by setting the trigger delay off. The following program segment
assumes that channel A is currently being measured on the upper window.
ABOR1
CONF1 DEF,3
TRIG1:DEL:AUTO OFF
READ1?
Using INITiate and FETCh?
1-22HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
The following program segment assumes that channel A is currently being
measured on the upper window.
ABOR1Aborts channel A.
CONF1 DEF,3Configures the upper window to
make a measurement using the
current setting of the expected
power and source list and a
resolution setting of 3.
INIT1Causes channel A to make a
measurement.
FETC1?Retrieves the upper window’s
measurement.
Some fine tuning of the above program segment can be carried out for
example, by setting the trigger delay off.
ABOR1
CONF1 DEF,3
TRIG1:DEL:AUTO OFF
INIT1:IMM
FETC1?
HP EPM-441A/442A Programming Guide1-23
Power Meter Remote Operation
Making Measurements
Example 5 - Making a Difference Measurement
The following program segment can be carried out on the HP EPM-442A.
It queries the lower window to make a difference measurement of
channelA-channel B. The expected power level and resolution
parameters are defaulted, leaving them at their current settings. Some
fine tuning of the measurement is carried out by setting the averaging,
and the trigger delay to off.
Using READ?
ABOR1
ABOR2
CONF2:POW:AC:DIFF DEF,DEF,(@1),(@2)
SENS1:AVER:COUN 1024
SENS2:AVER:COUN 1024
TRIG1:DEL:AUTO OFF
TRIG2:DEL:AUTO OFF
READ2:POW:AC:DIFF?
READ2:POW:AC:DIFF? DEF,DEF,(@2),(@1)(A second
READ?
query is
sent to make a channel B - channel A measurement using fresh
measurement data.)
Using INITiate and FETCh?
ABOR1
ABOR2
CONF2:POW:AC:DIFF DEF,DEF,(@1),(@2)
SENS1:AVER:COUN 1024
SENS2:AVER:COUN 1024
TRIG1:DEL:AUTO OFF
TRIG2:DEL:AUTO OFF
INIT1:IMM
INIT2:IMM
FETC2:POW:AC:DIFF?
FETC2:POW:AC:DIFF? DEF,DEF,(@2),(@1) (A second FETCh? query is
sent to make a channel B - channel A measurement using the current
measurement data.)
1-24HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Making Measurements
Example 6 - Making a Ratio Measurement
The following program segment can be carried out on the HP EPM-442A.
It queries the lower window to make a ratio measurement of channel A/B.
The expected power level and resolution parameters are defaulted,
leaving them at their current settings. Some fine tuning of the
measurement is carried out by setting the averaging.
Using READ?
ABOR1
ABOR2
CONF2:POW:AC:RAT DEF,DEF,(@1),(@2)
SENS1:AVER:COUN 512
SENS2:AVER:COUN 256
READ2:POW:AC:RAT?
READ2:POW:AC:RAT? DEF,DEF,(@2),(@1) (A second
READ?
query is
sent to make a channel B - channel A ratio measurement using fresh
measurement data.)
Using INITiate and FETCh?
ABOR1
ABOR2
CONF2:POW:AC:RAT DEF,DEF,(@1),(@2)
SENS1:AVER:COUN 512
SENS2:AVER:COUN 256
INIT1:IMM
INIT2:IMM
FETC2:POW:AC:RAT?
FETC2:POW:AC:RAT? DEF,DEF,(@2),(@1) (A second FETCh? query is
sent to make a channel B - channel A measurement using the current
measurement data.)
HP EPM-441A/442A Programming Guide1-25
Power Meter Remote Operation
Making Measurements
Using the Lower Level Commands
An alternative method of making measurements is to use the lower level
commands to set up the expected range and resolution. This can be done
using the following commands:
The advantage of using the lower level commands over the CONFigure
command is that they give you more precise control of the power meter . As
shown in Table 1-2 on page 1-11 the CONFigure command presets various
states in the power meter. It may be likely that you do not want to preset
these states.
Example
The following example sets the expected power value to -50 dBm and the
resolution setting to 3 using the lower level commands. The measurement
is a single channel A measurement carried out on the lower window.
ABOR1Aborts channel A.
CALC2:MATH:EXPR "(SENS1)"Displays channel A on lower
window.
SENS1:POW:AC:RANG 0Sets lower range (E-series sensors
only).
DISP:WIND2:RES 3Sets the lower window’s resolution
to setting 3.
INIT1Causes channel A to make a
measurement.
FETC2?Retrieves the lower window’s
measurement.
1-26HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Using Sensor Calibration Tables
Using Sensor Calibration Tables
This section applies to all HP 8480 series power sensors. It does not apply
to the HP E-series power sensors. The HP E-series power sensors have
their sensor calibration tables stored in EEPROM which allows frequency
and calibration factor data to be downloaded by the power meter
automatically.
This section describes how to use sensor calibration tables. Sensor
calibration tables are used to store the measurement calibration factors,
supplied with each power sensor, in the power meter. These calibration
factors are used to correct measurement results.
Overview
For the HP 8480 series power sensors there are two methods of providing
correction data to the power meter depending on the setting of the
[SENSe[1]]|SENSe2:CORRection:CSET:STATe command. If
[SENSe[1]]|SENSe2:CORRection:CSET:STATe is OFF the sensor
calibration tables are not used. To make a calibrated power measurement
when [SENSe[1]]|SENSe2:CORRection:CSET:STATe is OFF, perform
the following steps:
1. Zero and calibrate the power meter. Before carrying out the
calibration set the reference calibration factor for the power meter
you are using.
2. Set the calibration factor to the value for the frequency of the
signal you want to measure.
3. Make the measurement.
When [SENSe[1]]|SENSe2:CORRection:CSET:STATe is ON , the sensor
calibration tables are used, providing you with a quick and convenient
method for making power measurements at a range of frequencies using
one or more power sensors. Note that with the sensor calibration table
selected, the RCF from the table overides any value previously set. The
power meter is capable of storing 20 sensor calibration tables of 80
frequency points each.
HP EPM-441A/442A Programming Guide1-27
Power Meter Remote Operation
Using Sensor Calibration Tables
Figure 1-1 illustrates how sensor calibration tables operate.
Figure 1-1: Sensor Calibration Tables
TABLE 1
RCF
FREQ
FREQ
FREQ
CFAC = Calibration Factor
RCF = Reference Calibration Factor
Frequency of the signal you want
to measure
CFAC
1
2
.
.
.
.
.
.
.
.
.
.
.
80
1
CFAC
2
.
.
.
.
.
.
.
.
.
.
.
CFAC
80
TABLE N
FREQ
1
FREQ
2
.
.
.
.
.
.
.
.
.
.
.
FREQ
80
TABLE SELECTED
FREQ
1
FREQ
2
.
.
.
.
.
.
.
.
.
.
.
FREQ
80
RCF
CFAC
1
CFAC
2
.
.
.
.
.
.
.
.
.
.
.
CFAC
80
RCF
CFAC
1
CFAC
2
.
.
.
.
.
.
.
.
.
.
.
CFAC
80
TABLE 20
RCF
FREQ
FREQ
FREQ
CFAC
1
1
CFAC
2
80
Reference Calibration
Factor used for Power
Meter Calibration.
Calibration Factor used
to make Measurement.
Calculated by the Power
Meter using linear
interpolation
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CFAC
80
1-28HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Using Sensor Calibration Tables
To use sensor calibration tables you:
1. Edit a sensor calibration table if necessary.
2. Select the sensor calibration table.
3. Enable the sensor calibration table.
4. Zero and calibrate the power meter. The reference calibration
factor used during the calibration is automatically set by the
power meter from the sensor calibration table.
5. Specify the frequency of the signal you want to measure. The
calibration factor is automatically set by the power meter from the
sensor calibration table.
6. Make the measurement.
HP EPM-441A/442A Programming Guide1-29
Power Meter Remote Operation
Using Sensor Calibration Tables
Editing Sensor Calibration Tables
It is not possible to create any additional sensor calibration tables.
However, the 20 existing ones can be edited using the MEMory subsystem.
To do this:
1. Select one of the existing tables using:
MEMory:TABle:SELect <string>.
For information on naming sensor calibration tables see “Naming
Sensor Calibration Tables”, on page 1-33. For information on the
current names which you can select refer to “Listing the Sensor
Calibration Table Names”, on page 1-31.
MEMory:TABle:GAIN <numeric_value>
{,<numeric_value>}. The first parameter you enter should be
the reference calibration factor, each subsequent parameter is a
calibration factor in the sensor calibration table. This means that
entries in the frequency list correspond as shown with entries in
the calibration factor list.
FrequencyCalibration Factor
Reference Calibration
Factor
Frequency 1Calibration Factor 1
Frequency 2Calibration Factor 2
""
Frequency nCalibration Factor n
4. If required, rename the sensor calibration table using:
MEMory:TABLe:MOVE <string>,<string>. The first <string>
parameter identifies the existing table name, and the second
identifies the new table name.
1-30HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Using Sensor Calibration Tables
NoteThe legal frequency suffix multipliers are any of the IEEE suffix
multipliers, for example, KHZ, MHZ and GHZ. If no units are
specified the power meter assumes the data is Hz.
PCT is the only legal unit for calibration factors and can be
omitted.
The frequency and calibration data must be within range. Refer to
the individual commands in Chapter 4 for their specified ranges.
The number of calibration factor points must be one more than the
number of frequency points. This is verified when the sensor
calibration table is selected using
Ensure that the frequency points you use cover the frequency
range of the signals you want to measure. If you measure a signal
with a frequency outside the frequency range defined in the sensor
calibration table, then the power meter uses the highest or lowest
frequency point in the sensor calibration table to calculate the
calibration factor.
To make subsequent editing of a sensor calibration table simpler,
it is recommended that you retain a copy of your data in a
program.
Listing the Sensor Calibration Table Names
To list the sensor calibration tables currently stored in the power meter,
use the following command:
MEMory:CATalog:TABLe?
The power meter returns the data in the form of two numeric parameters
and 20 strings representing the stored sensor calibration tables.
•<numeric_value>,<numeric_value>{,<string>}
The first numeric parameter indicates the amount of memory, in
bytes, used for storage of sensor calibration tables. The second
parameter indicates the memory, in bytes, available for sensor
calibration tables.
HP EPM-441A/442A Programming Guide1-31
Power Meter Remote Operation
Using Sensor Calibration Tables
Each string parameter returned indicates the name, type and size of a
stored sensor calibration table:
•<string>,<type>,<size>
The <string>, <type> and <size> are all character data. The
<type> is always TABL. The <size> is displayed in bytes.
For example, a sample of the response may look like:
The power meter is shipped with a set of predefined sensor calibration
tables. The data in these sensor calibration tables is based on statistical
averages for a range of Hewlett-Packard Power Sensors (see Chapter 2,
“Editing Sensor Calibration Tables” in the User’s Guide). These power
sensors are:
•DEFAULT
1
•HP 8481A
•HP 8482A
2
•HP 8483A
•HP 8481D
•HP 8485A
•R8486A
•Q8486A
•R8486D
•HP 8487A
For further information on naming sensor calibration tables see “Naming
Sensor Calibration Tables”, on page 1-33.
1. DEFAULT is a sensor calibration table in which the reference calibration
factor and calibration factors are 100%. This sensor calibration table can be
used during the performance testing of the power meter.
2. The HP 8482B and HP 8482H power sensors use the same data as the
HP 8482A.
1-32HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Using Sensor Calibration Tables
Naming Sensor Calibration Tables
To rename a sensor calibration table use:
MEMory:TABLe:MOVE <string>,<string>
The first <string> parameter identifies the existing table name, and the
second identifies the new table name.
The following rules apply to sensor calibration table names:
a) The sensor calibration table must consist of no more than 12
characters.
b) All characters must be upper or lower case alphabetic characters,
or numeric (0-9), or an underscore (_).
c) No spaces are allowed in the name.
HP EPM-441A/442A Programming Guide1-33
Power Meter Remote Operation
Using Sensor Calibration Tables
Reviewing Table Data
To review the data stored in a sensor calibration table, use the following
commands:
•MEMory:TABLe:SELect "Sense1"
Select the sensor calibration table named “Sense1”.
•MEMory:TABLe:SELect?
Query command which returns the name of the currently selected
table.
•MEMory:TABLe:FREQuency:POINTs?
Query command which returns the number of stored frequency
points.
•MEMory:TABLe:FREQuency?
Query command which returns the frequencies stored in the sensor
calibration table (in Hz).
•MEMory:TABLe:GAIN[:MAGNitude]:POINTs?
Query command which returns the number of calibration factor
points stored in the sensor calibration table.
•MEMory:TABLe:GAIN[:MAGNitude]?
Query command which returns the calibration factors stored in the
sensor calibration table. The first point returned is the reference
calibration factor.
Modifying Data
If you need to modify the frequency and calibration factor data stored in a
sensor calibration table you need to resend the complete data lists. There
are two ways to do this:
1. If you have retained the original data in a program, edit the
program and resend the data.
2. Use the query commands shown in “Reviewing Table Data”, on
page 1-34 to enter the data into your computer. Edit this data,
then resend it.
1-34HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Using Sensor Calibration Tables
Selecting a Sensor Calibration Table
After you have created the sensor calibration table, you can select it using
the following command:
When the table is selected, the power meter verifies the number of
calibration factor points defined in the sensor calibration table is one
parameter greater than the number of frequency points. If this is not the
case an error occurs.
To find out which sensor calibration table is currently selected, use the
query:
[SENSe[1]]|SENSe2:CORRection:CSET[:SELect]?
Enabling the Sensor Calibration Table System
To enable the sensor calibration table, use the following command:
[SENSe[1]]|SENSe2:CORRection:CSET:STATe ON
If you set [SENSe[1]]|SENSe2:CORRection:CSET:STATe to ON and no
sensor calibration table is selected error -221, “Settings conflict” occurs.
HP EPM-441A/442A Programming Guide1-35
Power Meter Remote Operation
Using Sensor Calibration Tables
Making the Measurement
To make the power measurement, set the power meter for the frequency of
the signal you want to measure. The power meter automatically sets the
calibration factor. Use either the INITiate,FETCh? or the READ? query
to initiate the measurement as shown in the following program segments:
ABORt1
CONFigure1:POWer:AC DEF,2,(@1)
SENS1:CORR:CSET:SEL "HP8481A"
SENS1:CORR:CSET:STAT ON
SENSe1:FREQuency 500KHZ
READ1?
NoteIf the measurement frequency does not correspond directly to a
frequency in the sensor calibration table, the power meter
calculates the calibration factor using linear interpolation.
If you enter a frequency outside the frequency range defined in the
sensor calibration table, then the power meter uses the highest or
lowest frequency point in the sensor calibration table to set the
calibration factor.
To find out the value of the calibration factor being used by the
power meter to make a measurement, use the query command:
[SENSe[1]]|SENSe2:CORRection:CFAC? The response may be
an interpolated value.
To find out the value of the reference calibration factor being used,
use the commands:
CALibration[1|2]:RCFactor?
1-36HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Setting the Range, Resolution and Averaging
Setting the Range, Resolution and Averaging
This section provides an overview of setting the range, resolution and
averaging. For more detailed information about these features refer to the
individual commands in Chapter 9.
Range
The power meter has no internal ranges which can be set. The only ranges
that can be set are those of the HP E-series power sensors. With an
HP E-series power sensor the range can be set either automatically or
manually. Use autoranging when you are not sure of the power level you
will be measuring.
Setting the Range
To set the range manually use the following command:
[SENSe[1]]|SENSe2:POWer:AC:RANGe <numeric_value>
If the <numeric_value> is set to:
•0, the sensor’s lower range is selected. (For example, this range is
-70 to -13.5 dBm for the HP ECP-18A power sensor.)
•1, the sensor’s upper range is selected. (For example, this range is
-14.5 to +20 dBm for the HP ECP-18A power sensor.)
For details on the range limits of other HP E-series power sensors refer to
the appropriate power sensor manual.
For further information on this command refer to page 9-48.
To enable autoranging use the following command:
[SENSe[1]]|SENSe2:POWer:AC:RANGe:AUTO ON
Use autoranging when you are not sure of the power level you will be
measuring.
HP EPM-441A/442A Programming Guide1-37
Power Meter Remote Operation
Setting the Range, Resolution and Averaging
Resolution
You can set the window’s resolution using the following command:
DISPlay[:WINDow[1|2]]:RESolution <numeric_value>
There are four levels of resolution available (1 through 4).
When the measurement suffix is W or % this parameter represents the
number of significant digits. When the measurement suffix is dB or dBM,
1 through 4 represents 1, 0.1, 0.01, and 0.001 dB respectively.
For further information refer to the resolution command on page 5-14.
Averaging
The power meter has a digital filter to average power readings. The
number of readings averaged can range from 1 to 1024 in binary
progression. This filter is used to reduce noise, obtain the desired
resolution and to reduce the jitter in the measurement results. However,
the time to take the measurement is increased. You can select the filter
length or you can set the power meter to auto filter mode. To enable and
disable averaging use the following command:
[SENSe[1]]|SENSe2:AVERage[:STATe] <Boolean>
NoteIf you are using the HP 437B remote programming language you
cannot enter a value of 1024.
Auto Averaging Mode
To enable and disable auto filter mode, use the following command:
[SENSe[1]]|SENSe2:AVERage:COUNt:AUTO <Boolean>
When the auto filter mode is enabled, the power meter automatically sets
the number of readings averaged together to satisfy the filtering
requirements for most power measurements. The number of readings
averaged together depends on the resolution and the power level currently
being measured. Figure 1-2 lists the number of readings averaged for each
range and resolution when the power meter is in auto filter mode.
1-38HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Setting the Range, Resolution and Averaging
Figure 1-2: Averaged Readings
Minimum Sensor Power
10 dB
10 dB
10 dB
Power Sensor
10 dB
Dynamic Range
1234
88128128
1116256
11232
11116
1118
Maximum Sensor Power
Figure 1-3 illustrates part of the power sensor dynamic range hysteresis.
Figure 1-3: Averaging Range Hysteresis
Range Hysteresis
Resolution Setting
Number of Averages
10.5 dB9.5 dB
Minimum Sensor Power
Minimum Sensor Power + 10 dB
HP EPM-441A/442A Programming Guide1-39
Power Meter Remote Operation
Setting the Range, Resolution and Averaging
Filter Length
You specify the filter length using the following command:
[SENSe[1]]|SENSe2:AVERage:COUNt <numeric_value>
The range of values for the filter length is 1 to 1024. Specifying this
command disables automatic filter length selection. If a numeric
parameter is specified which is not a binary multiple, the power meter
rounds to the nearest power of two. For example, if you specify a filter
length of 5, the power meter rounds the value to 4. Increasing the value of
the filter length reduces measurement noise. However, the time to take
the measurement is increased.
1-40HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Setting Offsets
Setting Offsets
Channel Offsets
The power meter can be configured to compensate for signal loss or gain in
your test setup (for example, to compensate for the loss of a 10 dB
attenuator). You use the SENSe command subsystem to configure the
power meter. Gain and loss correction are a coupled system. This means
that a gain set by [SENSe[1]]|SENSe2:CORRection:GAIN2 is
represented in the [SENSe[1]]|SENSe2:CORRection:LOSS2?
command. If you enter an offset value the state is automatically enabled.
However it can be enabled and disabled using either the
[SENSe[1]]|SENSe2:CORRection:GAIN2:STATe or
[SENSe[1]]|SENSe2:CORRection:LOSS2:STATe commands.
1
LOSS2 is coupled to GAIN2 by the equation when the default
Loss
-------------=
Gain
unit is linear, andwhen the default is logarithmic.
NoteYou can only use LOSS2 and GAIN2 for external losses and gains.
LOSS1 and GAIN1 are specifically for calibration factors.
GainLoss–=
Display Offsets
Display offset values can be entered using the
CALCulate[1|2]:GAIN[:MAGNitude] command.
CALCulate[1|2]:GAIN:STATe must be set to ON to enable the offset
value. If you enter an offset value the state is automatically enabled. On
the HP EPM-442A this offset is applied after any math calculations (refer
to Figure 1-8 on page 1-58).
HP EPM-441A/442A Programming Guide1-41
Power Meter Remote Operation
Setting Offsets
Example
The following example program, in HP Basic, details how to use the
channel and display offsets on an HP EPM-442A making a channel A/B
ratio measurement. The final result will be:
A
10–
dBm
-------------------------- -
B
dBm
10 !Create I/O path name
20 ASSIGN @POWER TO 713
30 !Clear the power meter’s interface
40 CLEAR @POWER
50 !Set the power meter to a known state
60 OUTPUT @POWER;"*RST"
70 !Configure the Power Meter to make the measurement
80 OUTPUT @Power;"CONF:POW:AC:RAT 20DBM,2,(@1),(@2)"
90 !Set the measurement units to dBm
100 OUTPUT @POWER;"UNIT:POW DBM"
110 !Set the power meter for channel offsets of -10 dB
120 OUTPUT @POWER;"SENS1:CORR:GAIN2 -10"
130 OUTPUT @POWER;"SENS2:CORR:GAIN2 -10"
140 !Enable the gain correction
150 OUTPUT @POWER;"SENS:CORR:GAIN2:STATe ON"
160 OUTPUT @POWER;"SENS2:CORR:GAIN2:STATe ON"
170 !Set the power meter for a display offset of -20 dB
180 OUTPUT @POWER;"CALC1:GAIN -20 DB"
190 PRINT "MAKING THE MEASUREMENT"
200 !Initiate the measurement
210 OUTPUT @Power;"INIT1:IMM"
220 OUTPUT @Power;"INIT2:IMM"
230 ! ... and get the result
240 OUTPUT @Power;"FETC:POW:AC:RAT? 20DBM,2,(@1),(@2)"
250 ENTER @Power;Reading
260 !
270 PRINT "The measurement result is ";Reading;"dB."
280 END
20–
10–
dB
For further information on channel offsets refer to page 9-23 through
page 9-32.
For further information on display offsets refer to page 3-3.
1-42HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
+
+
Setting Measurement Limits
Setting Measurement Limits
The power meter can be configured to verify the power being measured
against an upper and/or lower limit value. The range of values that can be
set for lower and upper limits is -150.00 dBm to +230.00 dBm. The default
upper limit is +90.00 dBm and the default lower limit is -90.00 dBm.
A typical application for this feature is shown in Figure 1-4.
Figure 1-4: Limits Checking Application
Power Meter
Swept Source
Device
Under Test
OUT
IN
OUT
CHANNEL A
INPUT
Figure 1-5: Limits Checking Results
Amplitude
10 dBm
Fail
o
o
o
o
o
o
4 dBm
o
Fail
Frequency
HP EPM-441A/442A Programming Guide1-43
Power Meter Remote Operation
Setting Measurement Limits
In this application a swept frequency signal is applied to the input of the
Device Under Test. The power meter measures the output power. The
limits have been set at +4 dBm and +10 dBm. A fail occurs each time the
output power is outside these limits. Use the SENSe subsystem to
configure the power meter for limits checking. The following example
program, in HP Basic, shows how to set the limits to +4 dBm and
+10 dBm.
10 !Create I/O path name
20 ASSIGN @Power to 713
30 !Clear the Power Meter’s Interface
40 CLEAR @Power
50 !Set the Power Meter to a known state
60 OUTPUT @Power;“*RST”
70 !Set the measurement units to dBm
80 OUTPUT @Power;“UNIT:POWer DBM”
90 !Set the upper limit to 10 dBm
100 OUTPUT @Power;“SENSe:LIMit:UPPer 10”
110 !Set the lower limit to 4 dBm
120 OUTPUT @Power;“SENSe:LIMit:LOWer 4”
130 !Switch the limit checking on
140 OUTPUT @Power;“SENSe:LIMit:STATe ON”
150 !Check the limits
160 OUTPUT @Power;“SENSe:LIMit:UPPer?”
170 ENTER @Power;A
180 OUTPUT @Power;“SENSe:LIMit:LOWer?”
190 ENTER @Power;B
200 PRINT A,B
210 END
Checking for Limit Failures
There are two ways to check for limit failures; using the
SENSe:LIMit:FAIL? and the SENSe:LIMit:FCOunt? commands or
using the STATus command subsystem.
1-44HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Setting Measurement Limits
Using SENSe
Using SENSe to check the limit failures in Figure 1-5 would return the
following results:
SENSe:LIMit:FAIL?Returns 1 if there has been 1 or
more limit failures or 0 if there
have been no limit failures. In
this case 1 is returned.
SENSe:LIMit:FCOunt?Returns the total number of
limit failures, in this case 2.
NoteIf TRIGger:DELay:AUTO is set to ON, then the number of failures
returned by SENSe:LIMit:FCOunt? will be affected by the
current filter settings.
Refer to page 9-40 and page 9-41 for further information on using these
commands.
Using STATus
You can use the STATus subsystem to generate an SRQ to interrupt your
program when a limit failure occurs. This is a more efficient method than
using SENSe, since you do not need to check the limit failures after every
power measurement.
Refer to “Status Reporting”, on page 1-59 and “STATus Subsystem”, on
page 10-1 for further information.
HP EPM-441A/442A Programming Guide1-45
Power Meter Remote Operation
0
Measuring Pulsed Signals
Measuring Pulsed Signals
The power meter can be used to measure the power of a pulsed signal. The
measurement result is a mathematical representation of the pulse power
rather than an actual measurement. The power meter measures the
average power of the pulsed input signal and then divides the
measurement result by the duty cycle value to obtain the pulse power
reading. The allowable range of values is 0.001% to 99.999%. The default
is 1.000%. A duty cycle value can be set using the following command:
NotePulse measurements are not recommended using HP ECP series
power sensors.
Making the Measurement
An example of a pulsed signal is shown in Figure 1-6.
Figure 1-6: Pulsed Signal
Power
B
Duty Cycle = A
Duty Cycle (%) = A x 10
B
B
Time
A
You use the SENSe command subsystem to configure the power meter to
measure a pulsed signal. The following example program, in HP Basic,
shows how to measure the signal for the HP 8480 series power sensors.
1-46HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Measuring Pulsed Signals
10 !Create I/O path name
20 ASSIGN @Power TO 713
30 !Clear the Power Meter’s Interface
40 CLEAR @Power
50 !Set the Power Meter to a known state
60 OUTPUT @Power;"*RST"
70 !Configure the Power Meter to make the measurement
80 OUTPUT @Power;"CONF:POW:AC 20DBM,2,(@1)"
90 !Set the reference calibration factor for the sensor
100 OUTPUT @Power;"CAL:RCF 98.7PCT"
110 !Zero and calibrate the power meter
120 OUTPUT @Power;"CAL?"
130 PRINT "ZEROING AND CALIBRATING THE POWER METER"
140 !Verify the outcome
150 ENTER @Power;Success
160 IF Success=0 THEN
170!Calibration cycle was successful
180!
190!Set the measurement units to Watts
200OUTPUT @Power;"UNIT:POW WATT"
210!
220!Set the measurement calibration factor for the
sensor
230OUTPUT @Power;"SENS:CORR:CFAC 97.5PCT"
240!Set the power meter for a duty cycle of 16PCT
250OUTPUT @Power;"SENS1:CORR:DCYC 16PCT"
260!
270!Enable the duty cycle correction
280OUTPUT @Power;"SENS:CORR:DCYC:STAT ON
290PRINT "MAKING THE MEASUREMENT"
300!Initiate the measurement
310OUTPUT @Power;"INIT1:IMM"
320!... and get the result
330OUTPUT @Power;"FETC?"
340ENTER @Power;Reading
350!
360PRINT "The result is";Reading*1000;"mW"
370!
380 ELSE
390PRINT "THERE WAS A CALIBRATION ERROR!"
400 END IF
410 PRINT "PROGRAM COMPLETED"
420 END
HP EPM-441A/442A Programming Guide1-47
Power Meter Remote Operation
Measuring Pulsed Signals
NotePulse power averages out any aberrations in the pulse such as
overshooting or ringing. For this reason it is called pulse power
and not peak power or peak pulse power.
In order to ensure accurate pulse power readings, the input signal
must be pulsed with a rectangular pulse. Other pulse shapes (such
as triangle, chirp or Gaussian) will cause erroneous results.
The pulse power on/off ratio must be much greater than the duty
cycle ratio.
1-48HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Triggering the Power Meter
Triggering the Power Meter
Triggering is a feature that is only available via remote programming of
the power meter.
The power meter has two modes of operation, standby mode and free run
mode. During local operation the power meter is always in free run mode.
During remote operation the power meter can operate in either free run
mode or standby mode and can be switched between modes at any time.
a) Standby mode means the power meter is making measurements,
but the display and HP-IB are not updated until a trigger
command is received.
In this mode the power meter is either waiting to be initiated, or
waiting for a trigger (See “Trigger System” on page 51.).
b) Free run mode is the preset mode of operation and is identical to
local operation. The measurement result data available to the
HP-IB is continuously updated as rapidly as the power meter
makes measurements. Entry into local mode via sets the
power meter to free run mode
In this mode INITiate:CONTinuous is set to ON and
TRIGger:SOURce is set to IMMediate.
Preset
Local
To obtain accurate measurements, ensure that the input power to the
power sensor is settled before making a measurement.
The trigger configuration is automatically set by the MEASure? command.
If you want to use the lower level commands (READ? or INITiate), you
need to understand the power meter’s trigger model.
HP EPM-441A/442A Programming Guide1-49
Power Meter Remote Operation
Triggering the Power Meter
Triggering the power meter from the remote interface is a process that
offers triggering flexibility. The process is:
1. Specify the source from which the power meter will accept the
trigger. The trigger source specifies which event causes the trigger
system to travel through the event detection state. See “Event
Detection State”, on page 1-52 for details.
2. Make sure that the power meter is ready to accept a trigger. This
is called the “wait-for-trigger” state . Sending a device clear, a *RST
or an ABORt forces the trigger system into the idle state. The
trigger system remains in the idle state until it is moved into the
“wait-for-trigger” state by executing an INITiate command.
The “wait-for-trigger” state is a term used only for remote
interface operation.
The TRIGger commands are used to synchronize power meter actions
with specified events. Figure 1-7 summarizes the power meter’s trigger
system.
1-50HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Triggering the Power Meter
Figure 1-7: Trigger System
TRIG:SOUR IMM
TRIG:SOUR BUS
TRIG:SOUR HOLD
SEQUENCE
OPERATION
STATE
IDLE
STATE
TRIG:SOURce
:ABORt
*RST
Idle State
INIT[:IMM]
INIT:CONT ON
YES
Wait - for - trigger
TRIG:DEL
Wait
TRIGGERED
Power Meter Measurement Actions
or
state
NO
YES
INIT:CONT ON
TRIG:IMMediate
NO
INITIATE
STATE
Is
EVENT
DETECTION
STATE
Idle State
Turning power on, sending an HP-IB CLEAR, sending a *RST or an
:ABORt forces the trigger system into the idle state. The trigger system
remains in the IDLE state until it is initiated by INITiate:CONTinuous
ON or INITiate:IMMediate. Once one of these conditions is satisfied the
trigger system moves to the initiate state.
HP EPM-441A/442A Programming Guide1-51
Power Meter Remote Operation
Triggering the Power Meter
Initiate State
If the trigger system is on the downward path, it travels directly through
the initiate state without any restrictions. If the trigger system is on the
upward path, and INIT iate:CONTinuous is ON , it exits downwards to the
event detection state. If the trigger system is on the upward path and
INITiate:CONTinuous is OFF, it exits upwards to the idle state.
Event Detection State
The trigger source specifies which event causes the trigger system to
travel through the event detection state. The trigger source is set with the
following command:
TRIGger:SOURce
There are three possible trigger sources.
•BUS
The trigger source is the HP-IB group execute trigger (<GET>), a
*TRG command, or the TRIGger:IMMediate command.
•HOLD
Triggering is suspended. The only way to trigger the power meter
is to send TRIGger:IMMediate.
•IMMediate
The power meter does not wait for any event and immediately
travels through the event detection state.
Querying the Trigger Source
The trigger source is queried with the following command:
TRIGger:SOURce
1-52HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Triggering the Power Meter
Trigger Delay
The power meter has the ability to insert a delay between receiving a
trigger and making the measurement. The delay is automatically
calculated by the power meter and depends on the current filter length.
The delay ensures that the analog circuitry and the digital filters in the
power meter have settled. It does not allow time for power sensor delay.
To enable the delay, use the following command:
TRIGger:DELay:AUTO ON
To disable the delay, use the following command:
TRIGger:DELay:AUTO OFF
NoteMEASure? and CONFigure automatically enable the delay.
Also, when the power meter is first powered on the delay is
enabled.
For the fastest possible measurements the delay should be
disabled.
HP EPM-441A/442A Programming Guide1-53
Power Meter Remote Operation
Getting the Best Speed Performance
Getting the Best Speed Performance
This section discusses the factors that influence the speed of operation
(number of readings/sec) of an HP EPM-441/2A power meter.
The following factors are those which have the greatest effect upon
measurement speed (in no particular order):
• The selected speed i.e. 20, 40 or 200 readings/sec.
• The trigger mode (for example, free run, trigger with delay etc.).
• The output format i.e. ASCii or REAL.
• The units used for the measurement.
• The command used to take a measurement.
In addition, in 200 reading/sec mode there are other influences which are
described in “200 Readings/Sec”, on page 1-56.
The following paragraphs give a brief description of the above factors and
how they are controlled from SCPI.
Speed
There are three possible speed settings 20, 40 and 200 readings/sec. These
are set using the SENSe:SPEed command and can be applied to each
channel independently (HP EPM-442A only). The speed setting controls
the cycle time of the measurement i.e., 50ms, 25ms and 5ms respectively.
In 20 and 40 readings/sec mode, full instrument functionality is available;
200 readings/sec is available only for E-series sensors and averaging,
offsets, limits, and ratio/difference math functions are disabled.
Refer to “Specifications” in chapter 5 of the User’s Guide to see the
influence of these speed settings on the accuracy and noise performance of
the power meter.
Trigger Mode
The power meter has a very flexible triggering system. For simplicity, it
can be described as having three modes:
1-54HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Getting the Best Speed Performance
Free run
A channel is in free run whenINITiate:CONTinuous is set to ON and
TRIGger:SOURce is set to IMMediate.
Trigger immediate
There are a variety of methods to achieve this:
TRIG:DEL:AUTO OFF
INIT:CONT OFF
TRIG:SOUR IMM
INIT
TRIG:SOUR BUS
INIT:CONT ON
TRIG
TRIG:DEL:AUTO OFF
TRIG:SOUR BUS
INIT:CONT ON
GET or *TRG
TRIG:DEL:AUTO OFF
INIT:CONT OFF
TRIG:SOUR IMM
READ?
Trigger with delay
This can be achieved using the same sequences above (apart from the
second) with TRIG:DEL:AUTO set to ON. Also, the MEAS? command
operates in trigger with delay mode.
In trigger with delay mode, a measurement is not completed until the
power meter filter is full. In this way, the reading returned is guaranteed
to be settled. In all other modes, the result returned is simply the current
result from the filter and may or may not be settled. This depends on the
current length of the filter and the number of readings that have been
taken since a change in power level.
With trigger with delay enabled, the measurement speed can be
calculated roughly using the following equation:
readings/sec = speed (as set by SENSe:SPEed) / filter length
HP EPM-441A/442A Programming Guide1-55
Power Meter Remote Operation
Getting the Best Speed Performance
For example, with a filter length of 4 and SENS:SPE set to 20,
approximately 5 readings/sec will be calculated by the power meter.
In general, free run mode will provide the best speed performance from the
power meter (especially in 200 readings/sec mode).
Output Format
The power meter has two output formats for measurement results: ASCii
and REAL. These formats can be selected using the FORMat command.
When FORMat is set to REAL, the result returned is in IEEE 754
floating-point format (note that the byte order can be changed using
FORMat:BORDer).
The REAL format is likely to be required only for 200 readings/sec mode as a
means to reduce bus traffic.
Units
The power meter can output results in either linear or log units. The
internal units are linear and therefore optimal performance will be
acheived when the results output are also in linear units (since the
overhead of performing a log function is removed).
Command Used
In free run trigger mode, FETC? must be used to retrieve a result.
In other trigger modes, there are a number of commands which can be used,
for example, MEAS?, READ?, FETC? Note that the MEAS? and READ?
commands are compound commands i.e., they perform a combination of
other lower level commands. In general, the best speed performance will be
achieved using the low level commands directly.
200 Readings/Sec
In the highest speed setting, the limiting factor tends to be the speed of the
controller being used to retrieve results from the power meter and to a
certain extent the volume of HP-IB traffic. The latter can be reduced using
the FORMat REAL command to return results in binary format. The former
is a combination of two factors:
1-56HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Getting the Best Speed Performance
•the hardware platform being used.
•the programming environment being used.
Note that it is unlikely that 200 readings/sec can be achieved when:
•you are using a 700 series HPUX workstation.
•you are using a low end PC.
•you are using a graphical programming environment (such as HP
VEE).
Dual Channel Considerations
With the dual channel instrument, consideration must be taken of what
operation is required on both channels. Both channels can achieve 20
readings/sec simultaneously, and 40 readings/sec simultaneously, but 200
readings/sec is not achievable on both channels at the same time. If only
single channel measurements are required, then the other channel should
be set to standby mode and not triggered.
The throughput for a channel set in the 200 readings/sec mode will be
affected by the speed mode of the other channel. However, in a situation
where fast measurements are required on one channel and slow
measurements on the other, it will be possible to perform more than one
measurement cycle on the fast channel for every measurement on the slow
channel. For example , if channel A is set to 40 readings /sec and channel B
is set to 20 readings/sec, it is possible to construct a loop with 2 reads from
channel A and one from channel B and still achieve the set readings per
second.
HP EPM-441A/442A Programming Guide1-57
Power Meter Remote Operation
How Measurements are Calculated
How Measurements are Calculated
Figure 1-8 details how measurements are calculated. It shows the order in
which the various power meter functions are implemented in the
measurement calculation.
Figure 1-8: How Measurements are Calculated
Upper Measurement Window
Upper Measurement Window
CALCulate1
Sensor A
:AVER1
Sensor A
:GAIN1
:GAIN2
:LIMit
:GAIN3
SENSe1
A
:MATH
“A” | “B”
“A-B” | “B-A”
“A/B” | “B/A”
:GAIN
:REL
UNIT1:POW
UNIT1:POW:RAT
MEAS1:POW:AC?
MEAS1:POW:AC:DIFF?
MEAS1:POW:AC:REL?
MEAS1:POW:AC:DIFF:REL?
MEAS1:POW:AC:RAT:REL?
MEAS1:POW:AC:RAT?
HPIB
FORMat
MEAS2:POW:AC:RAT?
MEAS2:POW:AC:RAT:REL?
MEAS2:POW:AC:DIFF:REL?
MEAS2:POW:AC:REL?
MEAS2:POW:AC:DIFF?
MEAS2:POW:AC?
:AVER1 :GAIN1:GAIN3:GAIN2
B
SENSe2
Sensor B
Sensor B
:LIMit
Upper Measurement Window
“A/B” | “B/A”
“A-B” | “B-A”
“A” | “B”
:MATH
CALCulate2
:GAIN
Lower Measurement Window
:REL
UNIT2:POW:RAT
UNIT2:POW
The MEASure commands in this figure can be replaced with the FETCh?
and READ? commands.
NoteAll references to channel B in the above diagram refer to the
HP EPM-442A only. The MEAS[1|2]:POW:AC? and
MEAS[1|2]:POW :AC:REL? are the only commands relevant to the
HP EPM-441A.
HP-IB
1-58HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
Status Reporting
Status reporting is used to monitor the power meter to determine when
events have occurred. Status reporting is accomplished by configuring and
reading status registers. The power meter has the following main
registers:
•Status Register
•Standard Event Register
•Operation Status Register
•Questionable Status Register
•Device Status Register
There are a number of other registers “behind” these. These are described
later.
The Status and Standard Event registers are read using the IEEE-488.2
common commands. These are the most commonly used registers and are
described in detail in this section.
The Operation and Questionable Status registers are read using the SCPI
STATus command subsystem.
HP EPM-441A/442A Programming Guide1-59
Power Meter Remote Operation
Status Reporting
The General Status Register Model
The generalized status register model shown in Figure 1-9 is the building
block of the SCPI status system. This model consists of a condition
register, a transition filter, an event register and an enable register. A set
of these registers is called a status group.
Figure 1-9: Generalized Status Register Model
Condition
Register
0
Bit 0
Bit 1
1
2
Bit 2
Bit 3
When a status group is implemented in an instrument, it always contains
all of the component registers. However, there is not always a
corresponding command to read or write to every register.
Transition
Filter
Event
Register
Enable
Register
Logical OR
Summary
Bit
Condition Register
The condition register continuously monitors the hardware and firmware
status of the power meter. There is no latching or buffering for this
register, it is updated in real time. Condition registers are read-only.
Transition Filter
The transition filter specifies which types of bit state changes in the
condition registers will set corresponding bits in the event register.
Transition filter bits may be set for positive transitions (PTR), negative
transitions (NTR), or both. Transition filters are read-write. They are
unaffected by *CLS or queries. After STATus:PRESet the NTR register is
set to 0 and all bits of the PTR are set to 1.
Event Register
The event register latches transition events from the condition register as
specified by the transition filter. Bits in the event register are latched and
once set they remain set until cleared by a query or a *CLS. Once set, an
event bit is no longer affected by condition changes. It remains set until
the event register is cleared; either when you read the register or when
you send the *CLS (clear status) command. Event registers are read-only.
1-60HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
Enable Register
The enable register specifies the bits in the event register that can
generate a summary bit. The instrument logically ANDs corresponding
bits in the event and enable registers and ORs all the resulting bits to
obtain a summary bit. Enable registers are read-write. Querying an
enable register does not affect it.
An Example Sequence
Figure 1-10 illustrates the response of a single bit position in a typical
status group for various settings. The changing state of the condition in
question is shown at the bottom of the figure. A small binary table shows
the state of the chosen bit in each status register at the selected times T1
to T5.
Figure 1-10: Typical Status Register Bit Changes
Case A
Case B
Case C
Case D
PTR
00
01
Condition
Summary Bit
Condition
Enable
NTR
0
0000
1
000
110
000
011
1
0
***
Summary Bit
Condition
Event
00
T1T2T3
*
Event
0
0
0
11
011
1
1
1
1
1
0
1
1
marks when event register is read
Condition
Event
0
0
0
0
Summary Bit
0
0
0
Condition
00
01
000
0
Summary Bit
Event
0100
0
01
T4
Condition
Event
0
00
0
0
00
T5
Summary Bit
0
0
0
HP EPM-441A/442A Programming Guide1-61
Power Meter Remote Operation
Status Reporting
How to Use Registers
There are two methods you can use to access the information in status
groups:
•the polling method, or
•the service request (SRQ) method.
Use the polling method when:
•your language/development environment does not support SRQ
interrupts.
•you want to write a simple, single purpose program and do not
want to add the complexity of setting an SRQ handler.
Use the SRQ method when you:
•need time critical notification of changes.
•are monitoring more than one device which supports SRQ
interrupts.
•need to have the controller do something else while it’s waiting.
•cannot afford the performance penalty inherent to polling.
1-62HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
The Condition Polling Method
In this polling method, the power meter has a passive role. It only informs
the controller that conditions have changed when the controller asks.
When you monitor a condition with the polling method, you must:
1. Determine which register contains the bit that monitors the
condition.
2. Send the unique HP-IB query that reads that register.
3. Examine the bit to see if the condition has changed.
The polling method works well if you do not need to know about the
changes the moment they occur. The SRQ method is more effective if you
must know immediately when a condition changes. Detecting an
immediate change in a condition using the polling method requires your
program to continuously read the registers at very short intervals. This is
not particularly efficient and there is a possibility that an event may be
missed.
HP EPM-441A/442A Programming Guide1-63
Power Meter Remote Operation
Status Reporting
The SRQ Method
When a bit of the Status Register is set and has been enabled to assert
SRQ (*SRE command), the power meter sets the HP-IB SRQ line true.
This interrupt can be used to interrupt your program to suspend its
current operation and find out what service the power meter requires.
(Refer to your computer and language manuals for information on how to
program the computer to respond to the interrupt).
To allow any of the Status Register bits to set the SRQ line true, you have
to enable the appropriate bit(s) with the *SRE command. For example,
suppose your application requires an interrupt whenever a message is
available in the output queue (Status Register bit 4, decimal weight 16).
To enable bit 4 to assert SRQ, you use the following command:
*SRE 16
NoteYou can determine which bits are enabled in the Status Register
using *SRE?. This command returns the decimal weighted sum of
all the bits.
Procedure
•Send a bus device clear message.
•Clear the event registers with the *CLS (clear status) command.
•Set the *ESE (standard event register) and *SRE (status byte
register) enable masks.
•Enable your bus controller’s IEEE-488 SRQ interrupt.
Examples
The following two examples are written in HP BASIC and illustrate
possible uses for SRQ. In both cases , it is assumed that the meter has
been zeroed and calibrated.
Example 1:
10 ! Program to generate an SRQ when a channel A sensor
20 ! connect or disconnect occurs
30 !
40 ASSIGN @Pm TO 713 ! Power meter HPIB address
50ON ON INTR 7 GOTO Srq_i! Define service request handler
60 CLEAR @Pm! Selective device clear
70 OUTPUT @Pm;”*CLS;*RST” ! Clear registers and reset meter
80 !
1-64HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
90 ! Configure the device status register so that a sensor
100 ! connect or disconnect on channel A will cause an SRQ.
110 !
120 OUTPUT @Pm;”STAT:DEV:ENAB 2”
130 OUTPUT @Pm;”STAT:DEV:NTR 2”
140 OUTPUT @Pm;”STAT:DEV:PTR 2”
150 OUTPUT @Pm;”*SRE 2”
160 !
170 ENABLE INTR 7;2 ! Enable an SRQ to cause an interrupt
180 LOOP ! Idle loop
190 ! Forever
200 END LOOP
210 !
220 ! When a SRQ is detected , the following routine will
service it.
230 !
240 Srq_i: !
250 St=SPOLL(@Pm)! Serial Poll (reads status byte)
260 IF BIT(St,1)=1 THEN ! Device status reg bit set ?
270 OUTPUT @Pm;”STAT:DEV:EVEN?” ! Yes , read register
280 ENTER @Pm;Event ! (this also clears it)
290 OUTPUT @Pm;”STAT:DEV:COND?”
300 ENTER @Pm;Cond
310 IF Cond=0 THEN
320 PRINT “Sensor disconnected”
330 ELSE
340 PRINT “Sensor connected”
350 END IF
360 END IF
370 GOTO 170 ! Return to idle loop
380 END
Example 2:
10 ! Program to generate an SRQ when an over limit
20 ! condition occurs.
30 !
40 ASSIGN @Pm TO 713 ! Power meter HPIB address
50 ON INTR 7 GOTO Srq_i ! Define service request handler
60 CLEAR @Pm ! Selective device clear
70 OUTPUT @Pm;”*CLS” ! Clear registers
80 OUTPUT @Pm;”SYST:PRES” ! Preset meter
90 !
HP EPM-441A/442A Programming Guide1-65
Power Meter Remote Operation
Status Reporting
100! Set upper limit to 2dBm and configure the operation
status
110 ! so that an over limit condition will cause an SRQ.
120 !
130 OUTPUT @Pm;”SENS:LIM:UPP 2DBM”
140 OUTPUT @Pm;”SENS:LIM:STAT ON”
150 OUTPUT @Pm;”STAT:OPER:PTR 4096”
160 OUTPUT @Pm;”STAT:OPER:ENAB 4096”
170 OUTPUT @Pm;”*SRE 128”
180 !
190 ENABLE INTR 7;2 ! Enable an SRQ to cause an interrupt
200 LOOP ! Idle loop
210 ! Forever
220 END LOOP
230 !
240 ! When a SRQ is detected , the following routine will
service it.
250 !
260 Srq_i: !
270 St=SPOLL(@Pm) ! Serial Poll (reads status byte)
280 IF BIT(St,7)=1 THEN ! Operation status bit set?
290 OUTPUT @Pm;”STAT:OPER?”! Yes , read register
300 ENTER @Pm;Oper ! (this also clears it)
310 OUTPUT @Pm;”STAT:OPER:ULF?”
320 ENTER @Pm;Ulf
330 IF Ulf=2 THEN PRINT “Over limit detected”
340 END IF
350 GOTO 190 ! Return to idle loop
360 END
1-66HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
HP EPM-441A/442A Programming Guide1-67
Power Meter Remote Operation
Status Reporting
Status Register
The Status System in the power meter is shown in Figure 1-11. The
Operation Status and Questionable Status groups are 16 bits wide, while
the Status Byte and Standard Event groups are 8 bits wide. In all 16-bit
groups, the most significant bit (bit 15) is not used and is always set to 0.
Figure 1-11: Status System
Device Status
Condition EventEnable
Questionable Status
Condition EventEnable
Output Queue
Standard Event
Logical OR
Logical OR
Error/Event Queue
0
1
2
QUE
MAV
ESB
RQS/MSS
OPR
*STB?
Status Byte
0
1
2
QUE
MAV
ESB
X
OPR
*SRE
Logical OR
Logical OR
Event
Enable
*ESR
*ESE
Operation Status
Logical OR
Condition EventEnable
1-68HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
The Status Byte
The status byte summary register reports conditions from other status
registers. Query data waiting in the power meter’s output buffer is
immediately reported through the “message available” bit (bit 4). Clearing
an event register clears the corresponding bits in the status byte summary
register. Reading all messages in the output buffer, including any pending
queries, clears the message available bit.
Table 1-3: Bit Definitions - Status Byte Register
Bit
Number
01 Not Used (Always set to 0)
12 Device Status Register summary bit.
24Error/Event Queue
38Questionable Status Register summary bit.
416Message Available
532Standard Event
664Request Service
7128Operation Status Register summary bit.
Decimal
Weight
Definition
One or more bits are set in the Device Status
Register (bits must be “enabled” in enable register)
One or more bits are set in the Questionable Status
Register (bits must be “enabled” in enable register).
Data is available in the power meter’s output buffer.
One or more bits are set in the Standard Event
register (bits must be “enabled” in enable register).
The power meter is requesting service (serial poll).
One or more bits are set in the Operation Status
Register (bits must be “enabled” in enable register).
HP EPM-441A/442A Programming Guide1-69
Power Meter Remote Operation
Status Reporting
Particular bits in the status byte register are cleared when:
•The standard event, Questionable status, operation status and
device status are queried.
•The error/event queue becomes empty.
•The output queue becomes empty.
The status byte enable register (SRE, service request enable) is cleared
when you:
•cycle the instrument power.
•execute a *SRE 0 command.
Using *STB? to Read the Status Byte
The *STB? (status byte query) command is similar to a serial poll except it
is processed like any other power meter command. The *STB? command
returns the same result as an IEEE-488 serial poll except that the request
service bit (bit 6) is not cleared if a serial poll has occurred. The *STB?
command is not handled automatically by the IEEE-488 bus interface
hardware and the command will be executed only after previous
commands have completed. Using the *STB? command does not clear the
status byte summary register.
The Standard Event Register
The standard event register reports the following types of instrument
events: power-on detected, command and syntax errors, command
execution errors, self-test or calibration errors, query errors, or when an
overlapped command completes following a *OPC command. Any or all of
these conditions can be reported in the standard event summary bit
through the enable register. You must write a decimal value using the
*ESE (event status enable) command to set the enable register mask.
1-70HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Table 1-4: Bit Definitions - Standard Event Register
Status Reporting
Bit
Number
01 Operation Complete
12 Not Used. (Always set to 0.)
24Query Error
38Device Error
416Execution Error
532Command Error
664Not Used. (Always set to 0.)
7128Power On
Decimal
Value
All overlapped commands following an
command have been completed.
A query error occurred, refer to error numbers 410 to
440 in the User’s Guide.
A device error occurred, refer to error numbers 310 to
350 in the User’s Guide.
An execution error occurred, refer to error mumbers
211 to 241 in the User’s Guide.
A command syntax error occurred, refer to error
numbers 101 to 161 in the User’s Guide.
Power has been turned off and on since the last time
the event register was read or cleared.
Definition
*OPC
The standard event register is cleared when you:
•send a *CLS (clear status) command.
•query the event register using the *ESR? (event status register)
command.
The standard event enable register is cleared when you:
•cycle the instrument power.
•execute a *ESE 0 command.
HP EPM-441A/442A Programming Guide1-71
Power Meter Remote Operation
Status Reporting
Questionable Status Register
The questionable status register provides information about the quality of
the power meter’s measurement results. Any or all of these conditions can
be reported in the questionable data summary bit through the enable
register. You must write a value using the
STATus:QUEStionable:ENABle command to set the enable register
mask.
The questionable status model is shown in the pullout at the end of this
chapter.
The following bits in these registers are used by the power meter.
Bit
Number
0 to 2-Not used
38POWer Summary
4 to 7-Not used
8256CALibration Summary
9512Power On Self Test
10 to 14-Not Used
15-Not used (always 0)
Decimal
Weight
Definition
1-72HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
The condition bits are set and cleared under the following conditions:
Bit Number MeaningEVENts Causing Bit Changes
Status Reporting
3 POWer
Summary
8 CALibration
Summary
This is a summary bit for the Questionable POWer
Register.
The condition bits are set and cleared under the following conditions:
Bit
Number
0CALibratingThis is a summary bit for the Operation
MeaningEVENts Causing Bit Changes
CALibrating Register.
SET: At beginning of zeroing
(CALibration:ZERO:AUTO ONCE) and at the
beginning of calibration (CALibration:AUTO
ONCE). Also for the compound command/query
CALibration[:ALL]?, this bit is set at the
beginning of the zero.
CLEARED: At the end of zeroing or calibration.
1-74HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
Bit
Number
4MEASuringThis is a summary bit for the Operation MEASuring
5Waiting for
10SENSeThis is a summary bit for the Operation SENSe
MeaningEVENts Causing Bit Changes
Register .
SET: When the power meter is taking a
measurement.
CLEARED: When the measurement is finished.
This is a summary bit for the Operation TRIGger
TRIGger
Register.
SET: When the power meter enters the “wait for
trigger” state. Refer to Figure 1-7.
CLEARED: When the power meter enters the “idle”
state. Refer to Figure 1-7.
Register.
SET: When the power meter is reading data from
the HP E-series power sensor EEPROM.
CLEARED: When the power meter is not reading
data from the HP E-series power sensor EEPROM.
11Lower
Limit Fail
12Upper
Limit Fail
This is a summary bit for the Lower Limit Fail
Register.
SET: If a power measurement is made and the lower
limit test fails.
CLEARED: If a power measurement is made and
the lower limit test is not enabled or the test is
enabled and passes.
This is a summary bit for the Upper Limit Fail
Register.
SET: If a power measurement is made and the
upper limit test fails.
CLEARED: If a power measurement is made and
the upper limit test is not enabled or the test is
enabled and passes.
HP EPM-441A/442A Programming Guide1-75
Power Meter Remote Operation
Status Reporting
Device Status Register
The device status register set contains bits which give device dependent
information.
The following bits in these registers are used by the power meter:
Bit
Number
Decimal
Weight
Definition
0-Not used
12Channel A sensor connected
24Channel B sensor connected
38Channel A sensor error
416Channel B sensor error
532Channel A sensor Front/Rear
664Channel B sensor Front/Rear
1416384Front Panel key press
1. HP EPM-442A only
1
1
1
1-76HP EPM-441A/442A Programming Guide
Power Meter Remote Operation
Status Reporting
The condition bits are set and cleared under the following conditions:
Bit
Number
1Channel A
2Channel B
3Channel A
4Channel B
MeaningEVENts Causing Bit Changes
sensor
connected
sensor
connected
error
error
SET: When a power sensor is connected to the
Channel A input.
CLEARED: When no power sensor is connected to
the Channel A input.
SET: When a power sensor is connected to the
Channel B input.
CLEARED: When no power sensor is connected to
the Channel B input.
SET: If the power sensor EEPROM on Channel A
has failed or if there are power sensors connected to
both the rear and front panel Channel A connectors.
CLEARED: In every other condition.
SET: If the power sensor EEPROM on Channel B
has failed or if there are power sensors connected to
both the rear and front panel Channel B connectors.
CLEARED: In every other condition.
5Channel A
Front/Rear
6Channel B
Front/Rear
14Front Panel
Key Press
SET: If a power sensor is connected to the
Channel A rear panel.
CLEARED: If a power sensor is connected to the
Channel A front panel.
SET: If a power sensor is connected to the
Channel B rear panel.
CLEARED: If a power sensor is connected to the
Channel B front panel.
This is an event, and DOES NOT set the condition
register. The bit will be set in the event register
which will be cleared when read. Note that the
transition registers are of no use for this bit.
HP EPM-441A/442A Programming Guide1-77
Power Meter Remote Operation
Status Reporting
Using the Operation Complete Commands
The *OPC? and *OPC commands allow you to maintain synchronization
between the computer and the power meter. The *OPC? query command
places an ASCII character 1 into the power meter’s output queue when all
pending power meter commands are complete. If your program reads this
response before continuing program execution, you can ensure
synchronization between one or more instruments and the computer.
The *OPC command sets bit 0 (Operation Complete) in the Standard
Event Status Register when all pending power meter operations are
complete. By enabling this bit to be reflected in the Status Register, you
can ensure synchronization using the HP-IB serial poll.
Procedure
•Send a device clear message to clear the power meter’s output
buffer.
•Clear the event registers with the *CLS (clear status) command.
•Enable operation complete using the *ESE 1 command (standard
event register).
•Send the *OPC? (operation complete query) command and enter
the result to assure synchronization.
•Send your programming command string, and place the *OPC
(operation complete) command as the last command.
•Use a serial poll to check to see when bit 5 (standard event) is set
in the status byte summary register. You could also configure the
power meter for an SRQ interrupt by sending *SRE 32 (status byte
enable register, bit 5).
1-78HP EPM-441A/442A Programming Guide
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.