Agilent 16517A Programmers Guide

Programmer’s Guide
Publication number 16517-97007 February, 2000
For Safety information, Warranties, and Regulatory information, see the pages behind the index
Copyright Agilent Technologies 1987-2000
All Rights Reserved
ii

In This Book

This guide, combined with the
Technologies 16500B/16501A Programmer’s Guide
the information needed to program the Agilent Technologies 16517A/18A logic analyzer module. Each module has its own reference to supplement the mainframe 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 get started.
Chapter 1 also contains:
Mainframe system commands that are
frequently used with the logic analyzer module
16517A/18A Logic Analyzer command
tree Alphabetic command-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, contains program examples of actual tasks that show you how to get started in programming the 16517A/18A logic analyzer. These examples are written in HP BASIC 6.2; however, the program concepts can be used in any other popular programming language that allows communications with either the GPIB or RS-232C buses.
, provides you with
Agilent
Programming the
1
Agilent Technologies
2
Format Menu Commands
3
Trigger Menu Commands
4
Waveform Menu Commands
5
Listing Menu Commands
6
Compare Menu Commands
7
Symbols Commands
8
Data and Setup Commands
9
Programming Examples
Index
iii
Error messages for the 16517A/18A are noted in the text of many of the commands and also included in generic system error messages in the
Technologies 16500B/16501A Programmer’s Guide
.
Agilent
iv

Contents

Part 1 General Information
1 Programming the HP 16517A/18A
Selecting the Module 1–3 Programming the Logic Analyzer 1–3 Mainframe Commands 1–5 Command Set Organization 1–8 Module Status Reporting 1–11 MESE<N> 1–12 MESR<N> 1–14
Part 2 Commands
2 Format Menu Commands
FORMat 2–4 CLOCk (State mode only) 2–5 LABel 2–6 REMove 2–7 SOFFset (State Mode Only) 2–8 SYNC 2–9 THReshold 2–9 TYPE 2–10
3 Trigger Menu Commands
Qualifier 3–7 TRIGger (TRACe) 3–10 ACQuisition (WIDetiming 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
SAMPclk (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
4 Waveform Menu Commands
WAVeform 4–8 ACCumulate 4–9 ACQuisition (WIDetiming 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 SAMPclk (State Mode Only) 4–25 SIZE 4–26 SOFFset (State Mode Only) 4–27 SPERiod 4–28 TAVerage 4–29 TMAXimum 4–29
Contents–2
TMINimum 4–30 TPOSition 4–30 VRUNs 4–31 XCONdition 4–32 XOTime 4–33 XPATtern 4–33 XSEarch 4–34 XTIMe 4–35
5 List Menu Commands
LIST 5–8 ACQuisition (Timing Mode Only) 5–9 CLRPattern 5–10 CLRStat 5–10 COLumn 5–11 DATA 5–12 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 SAMPclk (State Mode Only) 5–21 SHOW (State Mode Only) 5–22 SOFFset (State Mode Only) 5–23 SPERiod 5–24 TAVerage 5–25 TMAXimum 5–25 TMINimum 5–26 TPOSition 5–26 VRUNs 5–28
Contents
Contents–3
Contents
XCONdition 5–28 XOTag 5–29 XOTime 5–30 XPATtern 5–30 XSEarch 5–31 XSTate 5–32 XTAG 5–33 XTIMe 5–34
6 Compare 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
7 Symbol Subsystem Commands
SYMBol 7–4 BASE 7–5 PATTern 7–6 RANGe 7–6 REMove 7–7 WIDTh 7–8
8 DATA and SETup Commands
Data Format 8–3 :SYSTem:DATA 8–4 Section Header Description 8–6 Section Data 8–6
Contents–4
Data Preamble Description 8–6 Acquisition Data Description 8–10 SYSTem:SETup 8–13
Part 3 Programming Examples
9 Programming Examples
Making a timing analyzer measurement 9–3 Making a state analyzer measurement 9–5 Transferring the logic analyzer configuration 9–9 Transferring the logic analyzer acquired data 9–11 Checking for measurement completion 9–15 Making a Compare Measurement 9–17 Using the COMPare:DATA? Query 9–22
Contents
Index
Contents–5
Contents–6
Part 1
Programming the Agilent Technologies 16517A/18A 1-1
1
General Information
General Information
1
Programming the Agilent Technologies 16517A/18A
1–1
Introduction
This chapter introduces you to the basic command structure used to program the Agilent Technologies 16517A/18A logic analyzer. Also included is an example program that sets up the timing analyzer for a basic timing measurement. Additional program examples are in chapter 9.
1–2
Programming the Agilent Technologies 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 numeric reference for the slot location of the logic analyzer (1 through 10 refers to slot A through J respectively). For example, if the logic analyzer is in slot E, then the command:
:SELect 5
would select this module. For more information on the select command, refer to the Agilent Technologies 16500B/16501A Programmer’s Guide.
:SELect
followed by the

Programming the Logic Analyzer

A typical logic analyzer program will do the following:
select the appropriate module
specify the analyzer type
assign pods
assign labels
set pod thresholds
specify a trigger condition
set up the display
specify acquisition type
start acquiring data
1–3
Example
Programming the Agilent Technologies 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 "OUTPUT" statements in the previous example refer to the device address required for programming over either GPIB or RS-232C. Refer to your controller manual and programming language reference manual for information on initializing the interface.
Program Comments
Line 10 selects the logic analyzer in slot C. Line 20 specifies the wide timing mode. Line 30 sets up the Format menu by assigning the label COUNT, and
assigning a polarity and channels to the 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. Line 70 inserts the label "COUNT" in the Waveform menu. Line 80 specifies the Single run mode. Line 90 starts data acquisition.
1–4
Programming the Agilent Technologies 16517A/18A

Mainframe Commands

Mainframe Commands
These commands are part of the Agilent Technologies 16500B/16501A mainframe system and are mentioned here only for reference. For more information on these commands, refer to the Agilent Technologies 16500B/16501A Programmer’s Guide.
CARDcage? Query
The CARDcage query returns a string of integers which identifies the modules that are installed in the mainframe. The returned string is in two parts. The first five two-digit numbers identify the card type. The identification number for the 16517A logic analyzer is 04 and the identification number for the 16518A is 05. A "−1" in the first part of the string indicates no card is installed in the slot.
The five, single-digit numbers in the second part of the string indicate which slots have cards installed, which card has the controlling software for the module, and where the master card is located.
Example
4,5,-1,-1,32,1,1,0,0,5
A returned string of card (ID number 5) is loaded in slot B and an 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 ( installed in slots A and B with the master card in slot B. The "0" indicates an empty slot, or the module software is not recognized or, is not loaded. The last digit (5) in this group indicates a single module card is loaded in slot E. Complete information for the CARDcage query is in the Agilent Technologies 16500B/16501A Programmer’s Guide.
4,5,-1,-1,32,1,1,0,0,5
2,2,0,0,5
means that an 16518A expansion
) indicate that a two-card module is
1–5
Programming the Agilent Technologies 16517A/18A
Mainframe Commands
MENU Command/query
The MENU command 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 specified). The query returns the currently selected and displayed menu.
The menus for the 16517A/18A Logic Analyzer are: X,0 — Format X,1 — Trigger X,2 — Waveform X,3 — Listing X,4 — Not used X,5 — Compare X,6 — Not used X,7 — Skew Adjust
SELect Command/query
The SELect command selects which module or intermodule will have parser control. SELect 0 selects the intermodule, SELect 1 through 10 selects modules A through J respectively. Values −1 and −2 select software options 1 and 2. The SELect query returns the currently selected module.
STARt Command
The STARt command starts the specified module or intermodule. If the specified module is configured in an intermodule arming tree, STARt will start all modules configured for intermodule.
1–6
Programming the Agilent Technologies 16517A/18A
Mainframe Commands
STOP Command
The STOP command stops the specified module or intermodule. If the specified module is configured for intermodule, STOP will stop all modules configured in an intermodule arming tree.
STARt and STOP are Overlapped Commands. Overlapped Commands allow execution of subsequent commands while the logic analyzer operations initiated by the Overlapped Command are still in progress. For more information, see *OPC and *WAI commands in Chapter 5 of the Agilent Technologies 16500B/16501A Programmer’s Guide.
RMODe Command/query
The RMODe command specifies the run mode (single or repetitive) for a module or intermodule. If the selected module is configured in an intermodule arming tree, the intermodule run mode will be set by this command. The RMODe query returns the current setting.
SYSTem:ERRor? Query
The SYSTem:ERRor query returns the oldest error in the error queue. In order to return all the errors in the error queue, a simple FOR/NEXT loop can be written to query the queue until all errors are returned. Once all errors are returned, the query will return zeros.
SYSTem:PRINt Command/query
The SYSTem:PRINt command initiates a print of the screen or listing buffer over the current printer communication interface. The SYSTem:PRINt query sends the screen or listing buffer data over the current controller communication interface.
MMEMory Subsystem
The MMEMory Subsystem provides access to both internal disc drives for loading and storing configurations.
INTermodule Subsystem
The INTermodule Subsystem commands are used to specify intermodule arming between multiple modules.
1–7
Programming the Agilent Technologies 16517A/18A

Command Set Organization

Command Set Organization
The command set for the 16517A/18A is divided into subsystems. The subsystem commands are covered in their individual chapters starting with Chapter 2, "Format Menu Commands."
Each of these chapters contains a description of the subsystem, syntax diagrams, and the commands in alphabetical order. The commands are shown in long form and short form using upper and lowercase letters. For example, LABel indicates that the long form of the command is LABEL and the short form is LAB. Each of the commands contain a description of the command and its arguments, the command syntax, and a programming example.
Figure 1-1 on the following page shows the command tree for the 16517A/18A logic analyzer module. The (x) following the SELect command at the top of the tree represents the slot number in which the logic analyzer module is installed. The number may range from 1 through 10, representing slots A through J, respectively.
1–8
Figure 1-1
Programming the Agilent Technologies 16517A/18A
Command Set Organization
16517A/18A Command Tree
1–9
Programming the Agilent Technologies 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 MMODe LIST, WAVeform 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
Command Subsystem
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 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
Programming the Agilent Technologies 16517A/18A

Module Status Reporting

Module Status Reporting
Each module reports its status to the Module Event Status Register (MESR<N>), which in turn reports to the Combined Event Status Register (CESR) in the Agilent Technologies 16500B/16501A mainframe (see Agilent Technologies 16500B/16501A Programmer’s Guide chapter 6). The Module Event Status Register is enabled by the Module Event Status Enable Register (MESE<N>).
The MESE<N> and MESR<N> instructions are not used in conjunction with the SELect command, so they are not listed in the 16517A/18A’s command tree.
The following descriptions of the MESE<N> and MESR<N> instructions provide the module specific information needed to enable and interpret the contents of the registers.
Figure 1-2
Module Status Reporting
1–11
Programming the Agilent Technologies 16517A/18A

MESE<N>

MESE<N>
Command
<enable_mask>
Example
Query
<N>
:MESE<N><enable_mask>
The MESE<N> command sets the Module Event Status Enable register bits. The MESE register contains a mask value for the bits to enable 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> specifies the module (1 through 10 refers to the module in slot A through J). The second parameter specifies the enable value in decimal.
Refer to table 1-2 for information about the Module Event Status register bits, bit weights, and what each bit masks for the module. Complete information for status reporting is in chapter 6 of the Agilent Technologies 16500B/16501A Programmer’s Guide.
{1|2|3|4|5|6|7|8|9|10}
integer from 0 to 255
OUTPUT XXX;": MESE5 1"
number of slot in which the module resides
:MESE<N>?
Returned Format
Example
The MESE query returns the current setting in decimal.
[:MESE<N>]<enable_mask><NL>
OUTPUT XXX;": MESE5?"
1–12
Programming the Agilent Technologies 16517A/18A
Table 1-2 Module Event Status Enable Register
Bit Weight Enables
7128 Not Used
6 84 Not Used
5 32 External clock period specification
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-Measurement complete
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 MESE enables the corresponding bit in the MESR, and a zero disables the bit.
MESE<N>
1–13
Programming the Agilent Technologies 16517A/18A

MESR<N>

MESR<N>
Query
Returned Format
<status>
Example
<N>
:MESR<N>?
The MESR<N> query returns the contents of the Module Event Status register in decimal. When you read the MESR, the value returned is the total bit weights of all bits that 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 parameter 1 through 10 refers to the module in slot A through J respectively.
[MESR<N>]<status><NL>
{1|2|3|4|5|6|7|8|9|10}
integer from 0 to 255
OUTPUT XXX;": MESR5?"
number of slot in which the module resides
1–14
Table 1-3 Module Event Status Register
Bit Weight Condition
7128Not used
6 64 Not used
5 32 1 = External clock period out of specification
0 = External clock period met specification
4 16 1 = Default skew values are being used
or 1 = Memory error could not be corrected during redundancy test 0 = Skew values adjusted and no memory errors
3 8 1 = Search could not place X/O markers
0 = Search placed X/O markers
2 4 1 = Trigger found
0 = Trigger not found
1 2 1 = Run until condition satisified
0 = Run until condition not satisified
0 1 1 = Measurement complete
0 = Measurement did not complete
Programming the Agilent Technologies 16517A/18A
MESR<N>
1–15
1–16
Part 2
Format Menu Commands 2-1
2
Trigger Menu Commands 3-1
3
Waveform Menu Commands 4-1
4
Listing Menu Commands 5-1
5
Compare Menu Commands 6-1
6
Symbols Commands 7-1
7
Data and Setup Commands 8-1
8
Commands
Commands
Loading...
+ 174 hidden pages