HP 1650B Owner's manual

Programming Reference
HP 1650B/HP 1651 B Logic Analyzers
Em
HEWLETT
PACKARD
@Copyright Hewlett-Packard Company 1989
Manual Number 0165040913 Printed in the U.S.A. August 1989


Product
Warranty
This Hewlett-Packard product has a warranty against defects in material
and workmanship for a period of one year from date of shipment. During
warranty period, Hewlett-Packard Company will, at its option, either
repair or replace products that prove to be defective.
For warranty service or repair, this product must be returned to a service
facility designated by Hewlett-Packard. However, warranty service for
products installed by Hewlett-Packard and certain other products
designated by Hewlett-Packard will be performed at the Buyer’s facility at
no charge within the Hewlett-Packard service travel area. Outside
Hewlett-Packard service travel areas, warranty service will be performed
at the Buyer’s facility only upon Hewlett-Packard’s prior agreement and
the Buyer shall pay Hewlett-Packards round trip travel expenses.
For products returned to Hewlett-Packard for warranty service, the Buyer
shall prepay shipping charges to Hewlett-Packard and Hewlett-Packard
shall pay shipping charges to return the product to the Buyer. However,
the Buyer shall pay all shipping charges, duties, and taxes for products
returned to Hewlett-Packard from another country.
Hewlett-Packard warrants that its software and firmware designated by
Hewlett-Packard for use with an instrument will execute its programming
instructions when properly installed on that instrument. Hewlett-Packard
does not warrant that the operation of the instrument software, or
firmware will be uninterrupted or error free.
Limitation of Warranty
The foregoing warranty shall not apply to defects resulting from improper
or inadequate maintenance by the 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.
HEWLETT-PACKARD SPECIFICALLY DISCLAIMS THE
IMPLIED WARRANTIES OR MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.

Exclusive Remedies
THE REMEDIES PROVIDED HEREIN ARE THE BUYER’S SOLE
AND EXCLUSIVE REMEDIES. HEWLETT-PACKARD SHALL
NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER
BASED ON CONTRACT, TORT, OR ANY OTHER LEGAL
THEORY.
Assistance
Product maintenance agreements and other customer assistance
agreements are available for Hewlett-Packard products.
For any assistance, contact your nearest Hewlett-Packard Sales and
Service Office.
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 Bureau of Standards, to the extent allowed by the
Bureau’s calibration facility, and to the calibration facilities of other
International Standards Organization members.
Safety
This product has been designed and tested according to International
Safety Requirements. To ensure safe operation and to keep the product
safe, the information, cautions, and warnings in this manual must be
heeded.

Printing History
New editions are complete revisions of the manuai. Update packages,
which are issued between editions, contain additional and replacement
pages to be merged into the manual by the customer. The dates on the
title page change only when a new edition or a new update is published.
No information is incorporated into a reprinting unless it appears as a
prior update; the edition does not change when an update is incorporated.
A software code may be printed before the date; this indicates the version
level of the software product at the time of the manual or update was
issued. Many product updates and
fLves
do not require manual changes
and, conversely, manual corrections may be done without accompanying
product changes. Therefore, do not expect a one-to-one correspondence
between product updates and manual updates.
Edition 1
August 1989 01650-90913

List of Effective Pages
The List of Effective Pages gives the data of the current edition and of any
pages changed in updates to that edition. Within the manual, any page
changed since the last edition will have the date the changes were made
printed on the bottom of the page. If an update is incorporated when a
new edition of the manual is printed, the change dates are removed from
the bottom of the pages and the new edition date is listed in Printing
History and on the title page.
Pages Effective Date
All
August 1989

Contents
Chapter 1
Introduction to Programming an Instrument
Introduction ..............................................
..l-
1
Programming Syntax
........................................ l-2
Talking
to the Instrument
.................................. l-2
Instruction Syntax
......................................... l-2
Output Command ......................................... l-3
Device Address
...........................................
1-3
Instructions
..............................................
1-3
Instruction Header ........................................
1-3
White Space. .............................................
1-4
Instruction Parameters
.....................................
l-4
Header Types ............................................ l-4
Combining Commands from the Same Subsystem
.............. l-6
Duplicate Keywords
.......................................
1-6
Query Usage
............................................. l-7
Program Header Options ..................................
1-8
Parameter Syntax Rules
...................................
. l-8
Instruction Terminator
................................... l-10
Selecting Multiple Subsystems
............................. l-10
Programming an Instrument
................................. l-11
InitiaIization
............................................. l-11
Example Program ........................................
1-12
Program Overview
.......................................
1-12
Receiving Information from the Instrument
.................
. l-12
Response Header Options ...............................
.l-13
Response Data Formats ..................................
1-14
String Variables ......................................... l-l.5
Numeric Base
...........................................
1-16
Numeric Variables .......................................
1-16
Definite-Length Block Response Data ..................... .l-17
Multiple Queries ......................................... .l-18
Instrument Status
........................................
1-18
HP
1650B/HP
16518
Programming Reference Contents-l

Chapter 2
Programming Over HP-IB
Introduction ..............................................
..2- 1
Interface Capabilities ........................................ 2-l
Command and Data Concepts
................................
.2-l
Addressing ................................................
.2-2
Communicating Over the HP-IB Bus (HP 9000 Series
200/3OO
Controller) ...............................................
..2- 3
Local, Remote, and Local Lockout
............................
-2-4
BusCommands
...........................................
..2- 5
Device Clear ............................................
.2-5
Group Execute Trigger (GET) .............................
.2-5
Interface Clear (IFC) .....................................
.2-5
Chapter 3
Programming Over RS-232C
Introduction ..............................................
..3- 1
Interface Operation .......................................... 3-l
Cables ...................................................
..3- 2
Minimum Three-Wire Interface with Software Protocol
..........
.3-2
Extended Interface with Hardware Handshake .................
.3-3
Cable Example ..............................................
3-4
Configuring the Instrument Interface
..........................
.3-5
Interface Capabilities .......................................
.3-5
Protocol ......
..~........................................3-
5
Data Bits ................................................
3-6
Communicating Over the RS-232C Bus
(HP 9000 Series
200/3OO
Controller)
............................
.3-6
Lockout Command
.........................................
.3-7
Chapter
4Programming and Documentation Conventions
Introduction ..............................................
..4- 1
Truncation Rule ............................................
.4-l
Infinity Representation ......................................
.4-2
Sequential and Overlapped Commands ........................
.4-2
Response Generation ........................................
4-2
Syntax Diagrams
...........................................
.4-2
Notation Conventions and Definitions .........................
.4-2
The Command Tree
........................................
.4-4
Contents-2 HP 1650B/HP 16518
Programming Reference

CommandTypes..........................................4-
4
Tree Traversal Rules ......................................
4-4
Examples ................................................
4-4
Command Set Organization ..................................
.4-8
Subsystems
...............................................
4-8
ProgramExamples
........................................
..4- 9
Chapter 5
Common Commands
Introduction ................................................ 5-l
*as
................................................
.5-3
*ESE
.................................................
5-4
*ESR
.................................................
5-6
*IDN
...............................................
..5- 8
*opt
................................................
.5-9
*RST
..............................................
.5-10
*SRE.. ............................................
..5-11
*sTB
...............................................
.5-13
*wAI
...............................................
.5-15
Chapter 6
System Commands
Introduction .................................
:.
............
.6-l
ARMBnc
...........................................
..6 -4
DATA................................................6-
5
Section Header Description ...............................
.6-8
Section Data ............................................
.6-8
Data Preamble Description ................................
.6-8
Acquisition Data Description .............................
.6-11
DSP
.................................................
6-18
ERRor...............................................6-19
HEADer.............................................6-
U)
KEY. ................................................
6-21
LER .................................................
6-23
LOCKout
..........................................
..6-2 4
LONGform...........................................6-
25
MENU ..............................................
6-26
MESE ...............................................
6-27
MESR ...............................................
.6-29
PPOWer
...........................................
..6-3 1
PRINt
.............................................
..6-3 2
HP lSSOB/HP 1651B
Programming Reference Contents-3

RMODe
...........................................
..6-3 3
SETup..
........................................... ..6-.
STARt...............................................6-
36
STOP
...............................................
.6-37
Chapter 7
MMEMory Subsystem
Introduction ................ ................................
7-1
AUToload
..........................................
..7- 4
CATaIog
............................................
..7- 5
COPY ...............................................
.7-6
DOWNload
.........................................
..7- 7
INITiaIize
...........................................
..7- 8
LOAD................................................7-
9
LOAD.. ........................................... ..7-10
PACK .............................................
..7-11
PURGe..
.......................................... ..7-12
REName..
......................................... ..7-13
STORe
.............................................
.7-14
UPLoad
...........................................
..7-
15
Chapter 8
DLlSt Subsystem
Introduction .............................................. ..8- 1
DLISt
................... ..............................
8-2
COLumn
.................. ............................
8-3
LINE ............. ....................................
8-5
Chapter 9
WLlSt Subsystem
Introduction ................................................ 9-l
WLISt
...............................................
.9-2
OSTate
.............................................
..9- 3
XSTate
............................................. ..9- 4
OTIMe
.............................................
..9- 5
XTIMe
.............................................
..9- 6
Contents-4 HP 1650B/HP 16518
Programming Reference

Chapter 10
MACHine Subsystem
Introduction .............................................
..lO-
1
MACHine
cN>.
....................................
. lO-3
ARM ...............................................
. lO-4
ASSign...............................................lO-
5
AUToscale..
.......................................
..lO-
6
NAME .............................................
.lO-7
TYPE ..............................................
. lO-8
Chapter 11
SFORmat Subsystem
Introduction .............................................
..ll-
1
SFORmat
.......................................... ..ll- 3
CLOCk
.............................................
.11-4
CPERiod
..........................................
..ll-
5
LABel
.............................................
..ll-
6
MASTer
...........................................
..ll-
8
REMove
...........................................
..ll-
9
SLAVe
........................................... ..ll-10
THReshold
.......................................
..ll-11
Chapter 12
STRace Subsystem
Introduction .............................................
..12-
1
STRace
............................................
..12- 4
BRANch
...........................................
..12-
5
FIND................................................12-
8
PREStore
.........................................
..12-10
RANGe
..........................................
..12-12
RESTart
..........................................
..l2-14
SEQuence
........................................
..l2-16
STORe
............................................
.12-17
TAG .....................................
.
.......
..12-19
TERM ............................................
.12-21
HP 1650B/HP 1651B
Programming Reference
Conter..::s-5

Chapter 13
SLlSt Subsystem
Introduction ...............................................
13-1
SLISt
.......... ......................................
13-5
coLumn
................ ............................
U-6
DATA ..............................................
13-8
LINE ...............................................
u-9
MMODe
.........................................
..l3-10
OPATtem
........................................
..13-11
OSEarch
.........................................
..l3-13
OSTate
...........................................
..13-14
OTAG ........ .....................................
13-15
RUNTiI
..........................................
..13-16
TAVerage
..........................................
13-18
TMAXimum
...... ..................................
13-19
TMINiium
.........................................
13-20
VRUNs
..........................................
..13-2 1
XOTag
.............................................
13-22
XPATtern
.............. ............................
13-23
XSEarch
............................................
13-25
XSTate
...... .......................................
Es-26
XTAG
.............................................
13-27
Chapter 14
SWAVeform Subsystem
Introduction.. ...........................................
..14-
1
SWAVeform..
.......................................
.14-3
Accumulate ..............
..-......*.:
...............
14-4
DELay...............................................14-
5
INSert
...............................................
14-6
RANGe..............................................14-
7
REMove
............ .................................
14-8
Contents-6
HP
1650B/HP
1651B
Programming Reference

Chapter 15
SChart Subsystem
Introduction ...............................................
15-1
SCHart
..............................................
15-3
ACCumuIate
.........................................
15-4
HAxis
...............................................
15-5
VAxis..
.............................................
15-6
Chapter 16
COMPare Subsystem
Introduction ...............................................
16-1
COMPare
............................................
16-3
CMASk
.............................................
.16-4
COPY ...............................................
16-5
DATA ..............................................
.16-6
FIND
................................................
16-8
RANGe
..............................................
16-9
RUNTiI
.............................................
16-10
Chapter 17
TFORmat Subsystem
Introduction ..............................................
.17-l
TFORmat
............................................
17-2
LABel
...............................................
17-3
REMove
.............................................
17-5
THReshold
...........................................
17-6
Chapter 18
mRace
Subsystem
Introduction ...............................................
18-1
lTRace
.............................................
18-3
AMODe
.............................................
18-4
DURation
.........................................
..18-
5
EDGE ..............................................
18-6
GLITch
...........................................
..18- 8
PATTern
............................................
18-9
HP 1650B/HP
16518
Programming Reference Contents-7

Chapter 19
TWAVeform Subsystem
Introduction ...............................................
19-1
TWAVeform
.........................................
19-5
Accumulate ........................................
.19-6
DELay
..............................................
19-7
INSert
.............................................
..19- 8
MMODe
..........................................
..19-
9
OCONdition
.......................................
.19-10
OPATtern
..........................................
19-11
OSEarch
.........................................
..19-13
OTIMe
...........................................
..19-14
RANGe
..........................................
..19-
15
REMove
..........................................
..19-16
RUNTil
............................................
19-17
SPERiod
..........................................
..19-19
TAVerage
........................................
..19-
20
TMAXimum
......................................
..19-2
1
TMINiium
.........................................
19-22
VRUNs
..........................................
..19- 23
XCONdition
........................................
19-24
XOTime
..........................................
..19-2 5
XPATtern
........................................
..19-
26
XSEarch
............................................
19-28
XTIMe
...........................................
..19-2 9
Chapter 20
SYMBol Subsystem
Introduction ...............................................
20-l
SYMBol
.............................................
20-3
BASE .............................................
..~-
4
PATTern
..........................................
..2O- 5
RANGe
...........................................
..2O- 6
REMove
..........................................
...20-
7
WIDTh
............................................
..20- 8
Contents-8 HP 1650B/HP 16518
Programming Reference

Appendix A
Message Communication and System Functions
Introduction ............................................... A-l
Protocols
..................................................
A-2
Functional Elements ..................................... A-2
Protocol Overview
.......................................
A-3
Protocol Operation. ......................................
A-3
Protocol Exceptions
...................................... A-4
Syntax Diagrams
...........................................
A-5
Syntax Overview
............................................
A-5
Device Listening Syntax
...................................
A-8
Device Talking Syntax
...................................
A-21
Common Commands
.......................................
A-27
Appendix B
Status Reporting
Introduction ............................................... B-l
Event Status Register
.....................................
B-3
Service Request Enable Register ...........................
B-3
Bit Definitions ...........................................
B-3
Key Features
............................................
B-4
Serial Poll .................................................
B-6
Using Serial Poll (HP-IB) .................................
B-6
Parallel Poll ...............................................
B-8
Polling HP-IB Devices ...................................
B-10
Configuring Parallel Poll Responses .......................
B-10
Conducting a Parallel Poll ................................
B-11
Disabling Parallel Poll Responses .........................
B-11
HP-IB Commands ......................................
B-12
Appendix C
Error Messages
Device Dependent Errors ................................. C-l
Command Errors ........................................
C-2
Execution Errors ........................................ c-3
Internal Errors .......................................... c-4
Query Errors
............................................
C-5
Index
HP 1650B/HP 16518
Programming Reference Contents-9


Introduction to
Programming an Instrument
1
Introduction
This chapter introduces you to the basics of remote programming. The
programming instructions explained in this book conform to the
IEEE
488.2
Standard Digital Interface for Programmable
Instrumentation. These programming instructions provide a means of
remotely controlling the HP
1650B/51B.
There are three general
categories of use. You can:
l
Set up the instrument and start measurements
l
Retrieve setup information and measurement results
l
Send measurement data to the instrument
The instructions listed in this manual give you access to the measurements
and front panel features of the HP 165OB/51B. The complexity of your
programs and the tasks they accomplish are limited only by your
imagination. This progr
amming reference is designed to provide a
concise description of each instruction.
Chapter 1 is divided into two sections. The first section (pages 2
-
10)
concentrates on program syntax, and the second section (pages 11
-
17)
discusses programming
an instrument. Read either chapter 2
“Progr amming Over HP-IB” or chapter 3 “Programming Over RS-232C”
for information concerning the physical connection between the
HP
1650B/51B
and your controller. Chapter 4, “Programming and
Documentation Conventions,” gives an overview of all instructions and
also explains the notation conventions used in our syntax definitions and
examples. The remaining chapters (5 through 20) are used to explain
each group of instructions.
HP 1650B/HP 16518 Introduction to Programming an Instrument
Programming Reference l-1

Programming
Syntax
Talking to the
In general, computers acting as controllers communicate with the
Instrument
instrument by sending and receiving messages over a remote interface,
such as HP-IB or
RS232C.
Instructions for programming the HP
1650B/51B will normally appear as ASCII character strings embedded
inside the output statements of a “host” language available on your
controller. The host language’s input statements are used to read in
responses from the HP 1650B/51B.
For example, HP 9000 Series 200/300 BASIC uses the OUTPUT
statement for sending commands and queries to the HP
1650B/51B.
After
a query is sent, the response is usually read in using the ENTER
statement. All progr
amming examples in this manual are presented in
BASIC. The following BASIC statement sends a command which causes
the HP 1650B/51B’s machine 1 to be a state analyzer:
OUTPUT XXX;" :MACHINEl:TYPE
STATE" <terminator>
Each part of the above statement is explained in the following pages.
instruction Syntax
To program the instrument remotely, you must have an understanding of
the command format and structure expected by the instrument. IEEE
488.2’s syntax rules govern how individual elements such as headers,
separators, parameters and terminators may be grouped together to form
complete instructions. Syntax definitions are also given to show how
query responses will be formatted. Fiie l-l shows the main syntactical
parts of a typical program statement.
INSTRVCTIDN
/
OUTPUT
XXX:“:SYSTEM:MENU
DISPLAY.2”
Figure
l-l.
Program Message Syntax
Introduction to Programming an instrument HP
1650B/HP
16518
l-2
Programming Reference

Output Command
The output command is entirely dependant on the language you choose to
use. Throughout this manual HP 9000 Series 200/300 BASIC 4.0 is used in
the programmin
g examples. People using another language will need to
find
the equivalents of BASIC commands like OUTPUT, ENTER and
CLEAR in order to convert the examples. The instructions for the
HP 1650B/51B are always shown between the double-quotes.
Device Address
The location where the device address must be specified is also dependant
on the host language which you are using. In some languages, this could
be specified outside the output command. In BASIC, this is always
specified after the keyword OUTPUT. The examples in this manual use a
generic address of XXX. When writing programs, the number you use
will depend on the cable you use in addition to the actual address. If you
are using an HP-IB, see chapter 2. RS-232C users should refer to
chapter 3.
instructions
Instructions (both commands and queries) normally appear as a string
embedded in a statement of your host language, such as BASIC, Pascal or
C. The only time a parameter is not meant to be expressed as a string is
when the instruction’s syntax definition specifies c block data
>
. There
are only five instructions which use block data.
Instructions are composed of two main parts: The header, which specifies
the command or query to be sent; and the parameters, which provide
additional data needed to clarify the meaning of the instruction.
Instruction Header
The instruction header is one or more keywords separated by colons (:).
The command tree in figure
4-l
(in chapter 4) illustrates how all the
keywords can be joined together to form a complete header.
The example in figure l-l shows a command. Queries are indicated by
adding a question mark (?) to the end of the header. Many instructions
can be used as either commands or queries, depending on whether or not
you have included the question mark. The command and query forms of
an instruction usually have different parameters. Many queries do not use
any parameters.
HP 1650B/HP 16518
Programming Reference introduction to Programming an Instrument
1-3

White Space
Instruction Parameters
Header Types
When you look up a query in this programming reference, you’ll find a
paragraph labeled “Returned Format” under the one labeled “Query
Syntax” The syntax definition by “Returned format” will always show the
instruction header in square brackets, like
[:SYSTem:MENLJ].
What this
really means is that the text between the brackets is optional, but it’s also a
quick way to see what the header looks like.
White space is used to separate the instruction header from the
instruction parameters. If the instruction does not use any parameters,
you do not need to include any white space. White space is defined as one
or more spaces. ASCII defines a space to be character 32 (in decimal).
Tabs can used only if your controller first converts them to space
characters before sending the string to the instrument.
Instruction parameters are used to clarify the meaning of the command or
query. They provide necessary data, such as whether a function should be
on or off, which waveform is to be displayed, or which pattern is to be
looked for. Each instruction’s syntax definition shows the parameters, as
well as the values they accept. This chapter’s “Parameter Syntax Rules”
section has all of the general rules about acceptable values.
When an instruction has more than one parameter they are separated by
commas (,). You are allowed to include spaces around the commas.
There are three types of headers: Simple Command; Compound
Command; and Common Command.
Simple Command Header.
Simple command headers contain a single
keyword. START and STOP are examples of simple command headers
typically used in this instrument. The syntax is:
<function
>
<terminator
z
When parameters (indicated by c data
>)
must be included with the
simple command header (for example, :RMODE SINGLE) the syntax is:
<function
>
-z
white space
>
c
data
>
c terminator
>
Compound Command Header.
Compound command headers are a
combination of two or more program keywords. The first keyword selects
the subsystem, and the last keyword selects the function within that
Introduction to Programming an instrument HP 1650B/HP 16518
1-4 Programming Reference
This manual suits for next models
1
Table of contents
Other HP Measuring Instrument manuals
Popular Measuring Instrument manuals by other brands

Diehl Metering
Diehl Metering HYDRUS 171A installation guide

Saveometer
Saveometer 2652 user guide

Velleman
Velleman DVM805 quick start guide

Powerfix Profi
Powerfix Profi 278296 Operation and safety notes

Array Solutions
Array Solutions PowerMaster Series manual

Sierra
Sierra InnovaMass 240 series instruction manual

Crossbow Technology
Crossbow Technology CXM539 user manual

LOVATO ELECTRIC
LOVATO ELECTRIC DME D120T1 instruction manual

Hanna Instruments
Hanna Instruments HI 93731 instruction manual

ProMinent
ProMinent Ammonia operating manual

Sencore
Sencore DigiPro DA795 Operation manual

Rae
Rae UltraRAE PGM-7200 Operation and maintenance manual