Agilent 16517A Programmers Guide

Pro grammer’s Guid e
Publication number 16517-97000 First edition, July 1993
For Safe ty info rmation, Wa rranties, and Re gulatory information, see the pages behind the index
Copyright Hewlett-Packard Company 1987, 1990, 1993 All Rights Reserved
HP 16517A/18A 4-GS a/s Timing and 1- GSa/s Synchronous Sta te L ogic A nalyzer
ii

In This Book

co mmunic ations w i th either the HP-IB or R S-232C buses.
1
Programming the
HP 16517A/18A
This guide, combined with the HP 16500B/16501A Pr ogrammer’ s Guide, provides you with the information needed to program the HP 16517A/18A logic analyzer module. Each module has its own reference to supplement the m ainframe manual since not all mainframes will be configured with the same modules.
This guide is organized in three parts. Part 1 consists of chapter 1 whichs contains general information and instructions to help you ge t sta rted.
Chapter 1 also contains:
Mainframe system commands t hat are
frequently used with the logic a nalyzer module
HP 16517A/18A Logic Analyzer
command tree Alphab etic com mand-to-subsystem
directory
Part 2 consists of chapters 2 through 7 which contain the subsystem commands for the logic analyzer and chapter 8 which contains information on the SYSTem:DATA and SYSTem:SETup commands for this module.
Part 3, chapter 9, conta ins program examples of actual tasks that show you how to get started in programming the HP HP 16517A/18A logic analyzer. These examples are written in HP BASIC
6.2; however, the program concepts can be used in any other popula r programming lang uage that allows
2
3
4
5
6
7
8
9
Format Menu Commands
Trigger Menu Commands
Waveform Menu Commands
Listing Menu Commands
Compare Menu Commands
Symbols Commands
Data and Setup Commands
Programming Examples
Index
iii
Error mes sages for the HP 16517A/18A are noted in the text of many of the commands and also included in generic system error messages in the HP 16500B/16501A Programmer’s Guide.
iv

Contents

Part 1Part 1 General InformationGeneral Information
11 Pr ogramming the HP 16517A/18AProgramming the HP 16517A/18A
Selecting the Mod ule 1 –3 Programming the Logic Analyzer 1–3 Mainframe Commands 1–5 Command Set Organization 1–8 Module S tatus R eporting 1–11 MESE<N> 1–12 MESR<N> 1–14
Part 2Part 2 CommandsCommands
22 Format Menu CommandsFormat Menu Commands
FORMat 2–4 CLOCk (State mode o nly) 2 –5 LABel 2–6 REMove 2–7 SOFFse t (State Mode Only ) 2– 8 SYNC 2–9 THRes h o ld 2–9 TYPE 2–10
33 Trigger Menu CommandsTrigger Menu Commands
Qualifier 3–7 TRIGger (TRACe) 3–10 AC Quisition (WIDe timing Type Only) 3– 11 ARMedby 3–11 BRANch 3–12 CLEar 3–14 DURation (Timing mode only) 3–15 EDGE ( Timing Mode Only) 3–17 FIND 3–18 PATTern 3–20 REName 3–21
Contents–1
Contents
SA MPclk (State Mode Only) 3 –22 SEQuence 3–23 SETUPHOLDA (Timing Mode Only) 3–24 SETUPHOLDB ( Timing Mode Only) 3–25 SETUPHOLDC ( Timing Mode Only) 3–26 SPERiod 3–27 TIMER 3–28 TPOSition 3–29
44 Waveform Menu CommandsWaveform Menu Commands
WAVeform 4–8 ACCumulate 4–9 AC Quisition (WIDe timing Type Only) 4– 10 CENTer 4–10 CLRPattern 4–11 CLRStat 4–11 DELay 4–12 INSert 4–13 LABel 4–14 MINus 4–15 MMODe 4–16 OCONdition 4–17 OPATtern 4–18 OSEarch 4–19 OTIMe 4–20 OVERlay 4–21 PLUS 4–22 RANGe 4–23 REMove 4–23 RUNTil 4–24 SA MPclk (State Mode Only) 4 –25 SIZE 4–26 SOFFse t (State Mode Only ) 4– 27 SPERiod 4–28 TAVerage 4–29 TMAXimum 4–29 TMINimum 4–30
Contents–2
TPOSition 4–30 VRUNs 4–31 XCO Ndition 4–32 XOTime 4–33 XPATtern 4–33 XSEarch 4–34 XTIMe 4–35
55 Lis t Menu CommandsList Menu Commands
LIST 5–8 ACQ uisition (Timing Mode Only ) 5–9 CLRPattern 5–10 CLRStat 5–10 COLumn 5–11 DATA 5– 1 2 LINE 5–12 MMODe 5–13 OCONdition 5–14 OPATtern 5–15 OSEarch 5–16 OSTate 5–17 OTAG 5–17 OTIMe 5–18 OVERlay 5–19 REMove 5–19 RUNTil 5–20 SA MPclk (State Mode Only) 5 –21 SHOW (State Mo de Only) 5–22 SOFFse t (State Mode Only ) 5– 23 SPERiod 5–24 TAVerage 5–25 TMAXimum 5–25 TMINimum 5–26 TPOSition 5–26 VRUNs 5–28 XCO Ndition 5–28 XOTag 5–29
Contents
Contents–3
Contents
XOTime 5–30 XPATtern 5–30 XSEarch 5–31 XSTate 5–32 XTAG 5–33 XTIMe 5–34
66 Compare Menu CommandsCompare Menu Commands
COMPare 6–4 CLEar 6–5 CMASk 6–5 COPY 6–6 DATA 6–7 FIND 6–8 LINE 6–9 MENU 6–10 RANGe 6–10 RUNTil 6–11 SET 6–12
77 Symbol Subsystem CommandsSymbol Subsystem Commands
SYMBol 7–4 BASE 7–5 P ATTern 7–6 RANGe 7–6 REMove 7–7 WIDTh 7–8
88 DATA and SETup CommandsDATA and SETup Commands
Data Format 8–3 :SYSTem:DATA 8–4 Section Header De scription 8–6 Section Dat a 8–6 Data Preamble Description 8–6 Acquisition D ata Descrip tion 8–10 SYSTem:SETup 8–13
Contents–4
Part 3Part 3 Programm ing Examp lesProgramming Examples
99 Programm ing Examp lesProgramming Examples
Making a t iming analyzer measurement 9–3 Making a st at e analyzer measurement 9–5 Transferring the logic analyzer configuration 9–9 Transferring the logic analyzer acquired data 9–11 Checking for meas urement completion 9–15 Making a Compare Measurement 9–17 Using the COMPare: DATA? Query 9–2 2
IndexIndex
Contents
Contents–5
Contents–6
Part 1
11 Programming the HP 16517A/18A 1-1

General Information

1

P rogra mming the HP 16517A/18A

1–1
Introduction
This chapter introduces yo u to the ba sic command structure used to progra m the HP 16517A/18A logic ana lyzer. Also included is an exam ple program that sets up the timing a nalyzer for a basic timing measurement. Additional program examples are in chapter 9.
1–2
Programming the HP 16517A/18A
Selecting the Module
Selecting the Module
Before you can program the logic analyzer, you must first "select" it. This directs your commands to the logic analyzer.
To select the module, use the system command :SELect followed by the numeric reference for the slot location of the logic analyzer (1 through 10 refers to s lot A through J respectively). For example, if the logic ana lyzer is in slot E, then the command:
:SELect 5
would select this module. For more information on the se lect command, refer to the HP 16500B/16501A P rogrammer’s G uide.
Programming the Log ic Analyzer
A typical logic analyzer p rogram will do the following:
select the appropriate module
specify the analyzer type
assign pods
assign labels
se t pod threshold s
specify a trigger condition
se t up the d ispl ay
specify acquisition ty pe
start acquiring data
1–3
Example
Programming the HP 16517A/18A
Programming the Logic Analyzer
The following example program sets up the logic analyzer to make a simple timing analyzer measurement.
10 OUTPUT XXX;":SELECT 3" 20 OUTPUT XXX;":FORMAT:TYPE WIDETIMING" 30 OUTPUT XXX;":FORMAT:LABEL ’COUNT’,POS,0,255" 40 OUTPUT XXX;":TRIGGER:PATTERN ’patt1’, ’COUNT’, ’#HFF’" 50 OUTPUT XXX;":WAVEFORM:RANGE 1E− 6" 60 OUTPUT XXX;":MENU 3,2" 70 OUTPUT XXX;":WAVEFORM:INSERT ’COUNT’" 80 OUTPUT XXX;":RMODE SINGLE" 90 OUTPUT XXX;":START" 100 END
The three Xs (XXX) after the "OUTP UT" statements in the previous example refer to the device address required for programming over either H P-IB or RS-23 2C. Re f er to your controller manual a nd programming language reference manu al for in f ormation on initializing th e interface.
Program CommentsProgram Comments
Line 10 selects the logic analyzer in slot C. Line 20 specifies the wide timing mode. Line 30 se ts up the Format menu by assigning the label COUNT, and
assigning a polarity and channels to th e label. Line 40 selects the trigger pattern for the timing analyzer. Line 50 sets the range to 1 µs (10 times 100 ns/div). Line 60 changes the onscreen display to the Waveform menu. Lin e 70 inserts the la bel "COUNT" in the Waveform menu. Lin e 80 specifies th e Single run m ode. Line 90 starts da ta acquisition.
1–4
Programming the HP 16517A/18A
Mainframe Commands
Mainframe Commands
These commands are pa rt of the HP 16500B/16501A mainframe system and are mentioned here only for re f erence. For more info rmation on these comm ands, refer to the HP 16500B/16501A Prog rammer’s Guide .
CARDcage? Qu e ry CARDcage? Qu e ry
The CARDcage query returns a string of integers which identifies the modules that are installed in the mainframe. T he returned string is in two parts. The fi rst five two-d igit n umbers identify the card type. The identification number for the HP 16517A logic analyzer is 04 and the identification number for the HP 16518A is 05. A "1" in the first p art of the string indicates no card is installe d in the slot.
The five, s ingle-digit numbers in the s econd part of the s tring indicate which slots have cards installed, w hich card h as the con trolling software f or the module, a nd where the ma ster ca rd is located.
Example 4,5,-1,-1,32,1,1,0,0,5
A returned s tring of 4,5,-1,-1,32,1,1,0,0,5 means that an HP 16518A expansion card (ID number 5) is loaded in slot B and an HP 16517A master card (ID number 4) is loaded in slot A. The next two slots (C and D) are empty (1) . Slot E contains a logic analyzer module (ID number 32).
The next group of numbers (2,2,0,0,5) indicate that a two-card module is insta lled in slots A and B with the maste r card in slot B. The "0 " ind icate s an empty s lot, or the module software is not recognized or, is not loade d. The last d igit (5) in this g roup indic ates a single module card is loaded in slot E. C omplete information for the C AR Dcage qu ery is in the HP 16500B/16501A Programmer’s Guide.
1–5
Programming the HP 16517A/18A
Mainframe Commands
MENU Command/query MENU Command/query
The MENU co m mand selects a new displayed menu. The first parameter (X) specifies the desired module. The optional, second parameter specifies the desired menu in the module. It defaults to 0 if it is not spe cified). The query returns t he currently selected and displayed menu.
The menus for the HP 16517A/18A Logic Analyzer are: X,0 — Format X,1 — Trigger X,2 — Wa v eform X,3 — Listing X,4 — Not used X,5 — Compare X,6 — Not used X,7 — Skew Adjust
SELect Command/querySELect Command/query
The S ELect command se lects which module or intermodule will have pa rse r control. SELect 0 se lects the intermodule, SELect 1 through 10 s elects modules A through J respectively. Values 1 a nd 2 select software options 1 and 2. The SELect query returns the currently selected module.
STARt Command STARt Command
The STARt c ommand starts the specifi ed modul e or intermo dule. If the specified modu le is configured in an intermo dule a rming tree, STARt will start all modu les configured for in termodu le.
1–6
Programming the HP 16517A/18A
Mainframe Commands
STOP Command STOP Command
The STOP command stops the specified module or intermodule. If the specified module is co nfig ured for in termodu le, STOP will s top all modu les configured in an intermodule arming tree.
STARt a nd STOP are Overlapped Commands. Overlapped Commands allow execution of subsequent commands while the logic analyzer operations initiated by the Overlapped Command a re still in progre ss . For more information, see *OPC and *WAI commands in Chapter 5 of the HP 16500B/16501A Programmer’s Guide.
RMODe Command/query RMODe Command/query
The RMODe command specifies the run mode (sing le o r repetitive) for a module or intermodule. If the selected module is configured in an intermodule arming tree, the intermo dul e run mode will be set by this co mmand. T he RMODe query r etu rns th e cur r en t settin g.
SYSTem:ERRor? Query SYSTem:ERRor? Query
The SYSTem:ERRor quer y ret urns t he oldest error in the er r or queue. In orde r to return all the errors in the error que u e, a simple FOR/NEXT lo op can be written to query the queue until all errors are returned. Once all errors are returned, th e query will return zeros.
SYSTem:PRINt Command/query SYSTem:PRINt Command/query
The SYSTem:PRINt command initiat es a print of the scr een or list ing buffer over t he current printer communication int er face. The SYSTem:PRI Nt query sends the screen or listing buffer data over the current controller communication interface.
MMEMory Subsystem MMEMory Subsystem
The MM EM o ry S ub system provides access to both internal disc drives for lo ading and storing configurations .
INTermodule Subsystem INTermodule Subsystem
The INTermodule Subsystem commands are used to specify intermodule arming between multiple modules.
1–7
Programming the HP 16517A/18A
Command Set Organization
Command Set Organization
The command set for the HP 16517A/18A is divided into subsystems. The subs ys tem commands are covered in their individual chapters s tarting with Chapter 2, "Format Menu C ommands."
Each of these chapters contains a de scription of the subsystem, syntax diagrams, and the commands in alphabetical order. The commands are sho wn in long form and short form using upper and lowercase letters. For example, LABe l indi cates th at the lo ng fo rm of the command is LABEL an d the short form is LAB. Each of the commands contain a description of the com mand a nd its arguments, the com m and syntax, and a progra m m ing example.
Figure 1-1 on the following page shows the command tree for the HP 16517A/18A logic analyzer module. The (x) following the SELect co mmand at the top of the tree rep resents the slot num ber in w hic h the lo gic analyz er mo dule is installed. T he num be r may range from 1 through 10, representing slots A through J, respect ively.
1–8
Figure 1-1
Programming the HP 16517A/18A
Command Set Organization
HP 16517A/18A Command Tree
1–9
Programming the HP 16517A/18A
Command Set Organization
Table 1-1
Alphabetical Command-to-Subsystem Directory
Command Subsystem
ACCumulate WAVeform ACQuisition LIST, TRIGger, WAVeform ARMedby TRIGger BASE SYMBol BRANch TRIGger CENter WAVeform CLEar COMPare, TRIGger CLOCk FORMat CLRPattern LIST, WAVeform CLRStat LIST, WAVeform CMASk COMPare COLumn LIST COPY COMPare DATA COMPare, LIST DELay WAVeform DURation TRIGger EDGE TRIGger FIND COMPare, TRIGger INSert WAVeform LABel FORMat, WAVeform LINE COMPare, LIST MENU COMPare MINus WAVeform
Command Subsystem
MMODe LIST, WAVefor m OCONdition LIST, WAVeform OPATtern LIST, WAVeform OSEarch LIST, WAVeform OSTate LIST OTAG LIST OTIMe LIST, WAVeform OVERlay LIST, WAVeform PATTern SYMBol, TRIGger PLUS WAVeform RANGe COMPare, SYMBol,
WAVeform
REMove FORMat, LIST, SYMBol,
WAVeform REName TRIGger RUNTil COMPare, LIST,
WAVeform SAMPclk LIST, TRIGger, WAVeform SEQuence TRIGger SET COMPare SETUPHOLDA TRIGger SETUPHOLDB TRIGger SETUPHOLDC TRIGger SHOW LIST
Command Subsystem
SIZE WAVeform SOFFset FORMat, LIST, WAVeform SPERiod LIST, TRIGger, WAVeform SYNC FORMat TAVerage LIST, WAVeform THReshold FORMat TIMER TRIGger TMAXimum LIST, WAVeform TMINimum LIST, WAVeform TPOSition LIST, TRIGger, WAVeform TYPE FORMat VRUNs LIST, WAVeform WIDTh SYMBol XCONdition LIST, WAVeform XOTag LIST XOTime LIST, WAVeform XPATtern LIST, WAVeform XSEarch LIST, WAVeform XSTate LIST XTAG LIST XTIMe LIST, WAVeform
1–10
Figure 1-2
Programming the HP 16517A/18A
Module Status Reporting
Module Status R eporting
Each module reports its status to the Module Event Status Register (MESR<N>), which in turn reports to the Co mbined Event Status Register (CESR) in the HP 16500B/16501A mainframe (see HP 16500B/16501A Programmer’s Gui de chapter 6) . The Module Event Status Register is enabled by the Module Event Status Enable Register ( MESE<N>).
The M ESE<N> and MES R<N> instructions are not use d in conjunction with the SELect command, so they are not listed in the HP 16517A/18A’s command tree.
The following des criptions of the MESE<N> and MESR<N> instruction s provide the mo dule s pe cific informa tion needed to ena ble and interpre t the contents of the registers.
Module Status Reporting
1–11
Programming the HP 16517A/18A
MESE<N>
MESE<N>
Command :MESE<N><enable_mask>
The MESE<N> command sets the Module Event Status Enable register bits. The M ESE r egister co ntain s a mask value for the b its to e nab le in the MESR register. A one in the MESE will enable the corresponding bit in the MESR, a zero will disable the bit.
The first parameter <N> spe cifi es the module (1 thr ough 10 refers to the module in slot A through J). The second parameter specifies the enable value in d ecimal.
Refer to table 1-2 for information about the Module Event Status register bits, bit we ights, and what eac h bit masks for the mo dule. Co mpl ete information for status reporting is in chapter 6 of the HP 16500B /16501A Programmer’s Gu i de.
<N> {1|2|3|4|5|6|7|8|9|10} number of slot in which the module resides
<enable_mask> integer from 0 to 255
Example OUTPUT XXX;":MESE5 1"
Query :MESE<N>?
T he MESE q ue r y retur ns the curre nt s etting in de cim al.
Returned Format [:MESE<N>]<enable_mask><NL>
Example OUTPUT XXX;":MESE5?"
1–12
Table 1-2 Module Event Status Enable Register
Bit Weight Enables
7 128 Not Used 6 84 Not Used 5 32 External clock period specificat ion 4 16 Default skew values or memory error 3 8 Pattern searches failed 2 4 Trigger found 1 2 RNT-Run until satisified 0 1 MC-Measur ement complete
Programming the HP 16517A/18A
MESE<N>
The Module Event Status Enable Register contains a mask value for the bits to be enabled in the Module Event Status Register (MESR). A one in the ME SE en ables the corresponding bit in th e MESR, and a zero disable s the bit.
1–13
Programming the HP 16517A/18A
MESR<N>
MESR<N>
Query :MESR<N>?
The M ESR<N> query returns the c ontents of the Modul e Event Statu s register in decimal. When you read the MESR, the value returned is the total bit weights of all bits th at are set at the time the register is read. Reading the register clears the Module Event Status Register.
Table 1-3 shows each bit in the Module Event Status Register and their bit weights for this module.
The param eter 1 th r ough 10 re fers to the module in slot A through J re spectiv ely.
Returned Format
<status> integer from 0 to 255
[MESR<N>]<status><NL>
<N> {1|2|3|4|5|6|7|8|9|10} number of slot in which the module resides
Example OUTPUT XXX;":MESR5?"
1–14
Table 1-3 Module Event Status Register
Bit Weight Condition
7 128 Not used 6 64 Not used 5 32 1 = External clock period out of specification
0 = External clock period met specification
Programming the HP 16517A/18A
MESR<N>
4 16 1 = Default skew values are being used
3 8 1 = Search could not place X/O markers
2 4 1 = Trigger found
1 2 1 = Run until condition satisified
0 1 1 = Measur ement complete
or 1 = Memory er ror could not be corrected during redundancy test 0 = Skew values adjusted and no memory errors
0 = Search placed X/O markers
0 = Trigger not found
0 = Run until condition not satisified
0 = Measurement did not complete
1–15
1–16
Part 2
22 Format Menu Commands 2-1 33 Trigger Menu Commands 3-1 44 Waveform Menu Commands 4-1 55 Listing Menu Co m m ands 5-1 66 Compare Menu Commands 6-1 77 Symbols C ommands 7-1 88 Da ta and S etup Comm ands 8-1

C ommands

2

Format Menu C ommands

2–1
Introduction
The Format menu comm ands allow you a cc ess the FO Rmat subsystem which contains the following commands:
CLOCk
LABel
REMove
SOFFset
SYNC
THReshold
TYPE
2–2
Loading...
+ 171 hidden pages