Page
Page
Organization
The HP 16500C/16501A Programmer’s
The
Guide is organized in three parts
Part
Chapter 8 contains error message descriptions
Part 1 General Information
2Programming Over HP-IB
3 Programming Over RS-232-C
4 Programming Over LAN
5Programming and Documentation Conventions
6Message Communication and System Functions
7Status Reporting
Error Messages
11SYSTem Subsystem
12MMEMory Subsystem
13INTermodule Subsystem
14TGTctrl Subsystem
Index
Page
Page
Page
Page
•Set up the system and start measurements
Retrieve setup information and measurement results from the measurement modules
•Send measurement data to the measurement modules
Programmer’s Guide
RS-232-C,or Ethernet LAN
connected, most of the remote operation of the expansion frame is
transparent. The only time a programming command is affected by the
presence of the expansion frame is when the number of slots is specified or
returned from a query
See Also
Talking to Individual System Modules
Initialization
exists) into the system
program the Logic Analysis System
command
1–5
Instruction Syntax
Figure
1–6
Device Address
Instruction Header
1–7
Instruction Terminator
[:SYSTem:MENU]
White Space
Instruction Parameters
1–8
Header Types
Simple Command Header
<function><terminator
When parameters (indicated by <data>) must be included with the simple
command header, the syntax is: <function><white_space><data> <terminator
Duplicate Keywords
Common Command Header
*<command header><terminator
Combined Commands in the Same Subsystem
:SLIST:MMODE PATTERN
Query Usage
:SELECT 2:TWAVEFORM:RANGE
1–11
Program Header Options
Either of the following examples turns on the headers and long form
Long form:
Short form:
1–12
Parameter Data Types
Numeric data
The following numbers are all equal:
1–13
String data
Keyword data
1–14
Selecting Multiple Subsystems
:<instruction header><data><terminator
1–15
places the answer in its output queue. The answer remains in the
output queue until it is read or until another command is issued
When read, the message is transmitted across the bus to the
designated listener (typically a controller). The input statement for
handling the response message
Response Header Options
<instruction_header><space><data><terminator
:SYSTEM:HEADER ON/OFF
:SYSTEM:LONGFORM
with HEADER OFF:
Response Data Formats
SELECT 2:MACHINE1:
TFORMAT: LAB? ’ADDR’ query
String Variables
Numeric Base
+1.00000E-05
Definite-LengthBlock Response Data
1.E-5
Multiple Queries
System Status
modules. By checking the system status, you can find out whether an
operation has been completed, whether a module is receiving triggers, and
more
and the installed modules
Page
Page
(HP-IB
Programming Over HP-IB
Interface Capabilities
Programmer’s Guides
Chapter 3, "Configuring Communications" in the HP 16500C User’s
Reference
HP-IBBus Addressing
Interface Select Code (Selects the Interface)
Instrument Address (Selects the Instrument)
Local, Remote, and Local Lockout
Hint
Bus Commands
Device Clear
Group Execute Trigger (GET)
Interface Clear (IFC)
Page
Page
Interface Operation
Minimum Three-WireInterface with Software Protocol
•Pin 5 SGND (Signal Ground)
•Pin 3 TD (Transmit Data from Logic Analysis System)
• Pin 2 RD (Receive Data into Logic Analysis System)
3–4
Extended Interface with Hardware Handshake
Pin
RTS (Request To Send) is an output from the Logic Analysis
System which can be used to control incoming data flow
CTS (Clear To Send) is an input to the Logic Analysis System
Cable Examples
HP 9000 Series
Configuring the Logic Analysis System Interface
HP Vectra Personal Computers and Compatibles
•HP 24542G, DB-9(F)to DB-25(M),3 meter
•HP 24542H, DB-9(F)to DB-25(M),3 meter, shielded
•HP 45911-60009, DB-9(F)to DB-25(M),1.5 meter
•Baud Rate: 110, 300, 600, 1200, 2400, 4800, 9600, or 19.2k
•Stop Bits: 1, 1.5, or
•Parity: None, Odd, or Even
•Protocol: None or XON/XOFF
•Data Bits:
RS-232-CBus Addressing
The controller and the HP 16500C Logic Analysis System must be in the
the controller must have the capability to send and receive 8-bitdata
For more information on the RS-232-Cinterface, refer to the HP 16500C
Logic Analysis System User’s Reference. For information on RS-232-C
Lockout Command
:LOCKout OFF
Page
Page
Communicating with the HP 16500C
Password Protection and File Protection
UNIX
DOS
You must be connected as the control user to program the HP 16500C
Controlling the HP 16500C
The \system\program file
The
file
•echo a string from the command line to \system\program
Echoing Commands
Copying Command Files
File clear.txt:
Now copy the file to the HP 16500 system. At the DOS prompt enter:
4–7
Writing to \system\program from a Program
Writing to
Queries
Resetting the File Pointer
4–8
The following example in C opens the \system\program file and sends
directory
4–9
4–10
Sending Commands to the HP 16500C Socket
You can also connect directly to the parser socket and type commands
parser socket
The following C program opens a socket and sends a query to request the
the socket will eventually close without receiving a response
To send the command which will run the analyzer and acquire data, enter:
4–12
Page
Page
Page
Page
Programming and Documentation Conventions
Truncation Rule
The truncation rule for the keywords used in headers and parameters is:
There are some commands that do not conform to the truncation rule by design
These will be noted in their respective description pages
Infinity Representation
STARt
STOP
Notation Conventions and Definitions
The Command Tree
Command Types
System Commands
START
Common Commands
Page
Tree Traversal Rules
MMEMORY
:MMEMORY
INITIALIZE
OUTPUT
In the first line of this example, the subsystem selector is implied for the
of the command tree
Another way to send these commands is by placing MMEMORY: before the
STORE command as shown in the second line of this example
to the root of the command tree. The parser can then see the
Command Set Organization
There are four subsystems in the mainframe. In the command tree (figure
•SYSTem – controls some basic functions of the instrument
•MMEMory – provides access to the internal disk drive
•INTermodule – provides access to the Intermodule bus (IMB)
Subsystems
Alphabetic Command Cross-Reference
5–11
Program Examples
Keywords in long form, numbers using the decimal format
Keywords in short form, numbers using an exponential format
Keywords in short form using lowercase letters, numbers using a suffix
5–12
Page
IEEE Standard Codes, Formats, Protocols, and Common Commands
488.1compatible instruments may or may not conform to the IEEE
Protocols
Functional Elements
Input Buffer
Output Queue
Parser
Protocol Overview
Protocol Operation
Commands are executed in the order they are received
6–4
Syntax Diagrams
Protocol Exceptions
Execution Error
Device-specific
Error
Page
Syntax Overview
A program message is terminated by a
<NL
<PMT
•Multiple data parameters are separated by a comma
Page
Upper/Lower Case Equivalence
SINGLE
single
<white space
<white space
Suffix Unit The suffix units that the instrument will accept are shown in table
6–10
Page
Page
Status Reporting
7–3
Event Status Register
*SRE
*SRE
MAV - message available
ESB - event status bit
Bit Definitions
MSG - message
PON - power on
URQ - user request
CME - command error
Key Features
LCL - remote to local
Indicates whether a remote to local transition has occurred
MSB - module summary bit
Operation Complete
7–7
Serial Poll
Using Serial Poll (HP-IB)
The program command for serial poll using HP BASIC 6.2 is
The serial poll operation can be conducted in the following manner:
1Enable interrupts on the bus
Parallel Poll
*PRE
*PRE
*IST
7–10
Polling HP-IBDevices
Conducting a Parallel Poll
7–12
Disabling Parallel Poll Responses
The following statement disables device 5 only:
Parallel Poll Unconfigure Command
Parallel Poll Configure Command
HP-IBCommands
Parallel Poll Enable Command
Parallel Poll Disable Command
Parallel Poll Commands
7–14
Page
Page
Device Dependent Errors
Execution Errors
Query Errors
Page
Page
Page
Page
*CLS
*ESE
*ESR
*IDN
*IST
Common Commands
This program message initializes the disk, selects the module in slot A
then stores the file. In this example, :MMEMORY must be sent again
in order to re-enterthe memory subsystem and store the file
Status Registers
9–4
*CLS
*ESE <mask
*ESE
*ESR
Standard Event Status Register
9–8
*IDN
*IST
Page
*OPC
*OPC
*OPT
*PRE <mask
*PRE
*RST (Reset)
HP 16500C Parallel Poll Enable Register
*SRE <mask
*SRE
*STB
*TRG
*TST
*WAI
Page
Page
SELECT
The mainframe commands are:
BEEPer
MESE
CAPability
Mainframe Commands
10–3
Figure 10-1(continued)
10–4
Mainframe Parameter Values
10–5
Command:BEEPer [{ON|1}|{OFF|0}]
:BEEPer
:CAPability
:CARDcage
Card Identification Numbers
10–9
:CESE <value
:CESE
:CESR
10–12
Command:EOI {{ON|1}|{OFF|0}}
:EOI
:LER
Command:LOCKout {{ON|1}|{OFF|0}}
:LOCKout
Command:MENU <module>[,<menu>]
:MENU
Command:MESE<N> <enable_value
Query:MESE<N
:MESR<N
:RMODe {SINGle|REPetitive}
:RMODe
:RTC
Command:SELect <module
:SELect
10–22
Command:SETColor {<color>,<hue>,<sat>,<lum>|DEFault}
:STARt
:STOP
:XWINdow {{OFF|0} | {ON|1}[,<display>]}
Page
•DATA
•DSP
•ERRor
•HEADer
•LONGform
SYSTem Subsystem
11–3
SYSTem Parameter Values
11–4
Command:SYSTem:DATA <block_data
Query:SYSTem:DATA
Command:SYSTem:DSP <string
:SYSTem:ERRor? [NUMeric|STRing]
Command:SYSTem:HEADer {{ON|1}|{OFF|0}}
:SYSTem:HEADer
Command:SYSTem:LONGform {{ON|1}|{OFF|0}}
:SYSTem:LONGform
:SYSTem:PRINt SCReen[,DISK, <pathname> [,<msus>], {BTIF|CTIF|PCX|EPS}]
:SYSTem:PRINt? {SCReen|ALL}
Command:SYSTem:SETup <block_data
Query:SYSTem:SETup
Page
Page
AUToload
MSI
CATalog
PACK
CD (change directory)
MMEMory Subsystem
12–3
Figure 12-1(Continued)
12–4
12–5
MMEMory Parameter Values
12–6
:MMEMory:AUToload
:MMEMory:CATalog? [[ALL|FULL][,<msus>]]
Command:MMEMory:CD <directory_name> [,<msus>]
Command:MMEMory:COPY <name>[,<msus>],<new_name>[,<msus>]
Command:MMEMory:DOWNload <name>[,<msus>],<description>, <type>,<block_data
File Types
12–12
Command:MMEMory:IDENtify? [<msus>]
:MMEMory:INITialize [{LIF|DOS}[,<msus>]]
Command:MMEMory:LOAD[:CONfig] <name>[,<msus>][,<module>]
Command:MMEMory:LOAD:IASSembler <IA_name>[,<msus>],{1|2} [,<module>]
Command:MMEMory:MKDir <directory_name> [,<msus>]
Command:MMEMory:MSI [<msus>]
Query:MMEMory:MSI
Command:MMEMory:PACK [<msus>]
Command:MMEMory:PURGe <name>[,<msus>]
:MMEMory:PWD? [<msus>]
Command:MMEMory:REName <name>[,<msus>],<new_name
:MMEMory:STORe[:CONfig] <name>[,<msus>]
<description>[,<module>]
:MMEMory:UPLoad? <name>[,<msus>]
:MMEMory:VOLume? [<msus>]
Page
Page
Page
INTermodule Subsystem
13–3
Figure 13-1(continued)
13–4
:INTermodule
:INTermodule:DELete {ALL|OUT|<module>}
Query:INTermodule:HTIMe
:INTermodule:INPort {{ON|1}|{OFF|0}}
:INTermodule:INPort
:INTermodule:INSert
{<module>|OUT},{GROUP|<module>}
Command:INTermodule:OUTDrive {{0|NORMal}|{1|OPENcllctr}}
:INTermodule:OUTDrive
:INTermodule:OUTPolar {{0|HIGHtrue}|{1|LOWtrue}}
Query:INTermodule:OUTPolar
Command:INTermodule:OUTType {{0|FEEDthru} | {1|LATChed} | {2|PULse}}
:INTermodule:OUTType
:INTermodule:PORTEDGE <edge_spec
:INTermodule:PORTEDGE
:INTermodule:PORTLEV {TTL|ECL|<user_lev>}
Query:INTermodule:PORTLEV
Command:INTermodule:SKEW<N> <setting
:INTermodule:SKEW<N
TREE
<module> <port_out
Group Run
COUT
13–15
Query:INTermodule:TREE
Query:INTermodule:TTIMe
Page
Page
Page
TGTctrl Subsystem
14–3
Figure 14-1(continued)
14–4
:TGTctrl
:TGTctrl:ALL<N
:TGTctrl:AVAILable
Command:TGTctrl:BITS<N> <mask
Query:TGTctrl:BITS<N
:TGTctrl:CURSTate<N
Command:TGTctrl:DRIVe<N> {{NORMal|0}|{OPENcllctr|1}}
Query:TGTctrl:DRIVe<N
Command:TGTctrl:LASTstate<N> <state
Query:TGTctrl:LASTstate<N
Command:TGTctrl:NAMe<N> <name
Query:TGTctrl:NAMe<N
Command:TGTctrl:PULse<N
:TGTctrl:SIGNal<N> {{OFF|0}|{ON|1}}
:TGTctrl:SIGNal<N
Query:TGTctrl:SIGSTatus<N
:TGTctrl:STATEs<N> <value_0>[,<value_1
<value_7>]
:TGTctrl:STATEs<N
Command:TGTctrl:STEP<N
Command:TGTctrl:TOGgle<N
Command:TGTctrl:TYPe<N> {{TOGgle|0} | {PULse|1} | {SEQuence|2}}
Query:TGTctrl:TYPe<N
Page
Page
Page
Page
Programming Examples
Transferring the Mainframe Configuration
SYSTem:SETup
SYSTem:SETup
SYSTem:DATA
15–4
15–5
Checking for Intermodule Measurement Completion
15–6
Sending Queries to the Logic Analysis System
15–7
15–8
Getting ASCII Data with PRINt? ALL Query
PRINt? ALL
You must select the mainframe, which is always
SELECT
You must select the proper menu. The only menus that allow you to use the
Reading the disk with the CATalog? ALL query
CATALOG? ALL query with DOS disks
15–10
Reading the Disk with the CATalog? Query
truncated at 51 characters
Printing to the disk
15–12
Index–1
Index
Index–2
Index–3
Index–4