HP 53150A Series Programming Manual

Microwave frequency counter

Quick Links

HP 53150A/151A/152A
Microwave Frequency Counter
Programming
Guide
Table of Contents
loading

Summary of Contents for HP 53150A Series

  • Page 1 Programming Guide HP 53150A/151A/152A Microwave Frequency Counter...
  • Page 3 Programming Guide This guide describes how to program the HP 53150A, 53151A, and 53152A Microwave Frequency Counters. The information in this guide applies to instruments having the number prefix listed below, unless accompanied by a “Manual Updating Changes” package indicating otherwise.
  • Page 4 HP receives notice of such from the mains power source to defects during the warranty the product’s ground circuitry. period, HP will, at its option, either repair or replace products WARNING Indicates earth (ground) which prove to be defective.
  • Page 5: Table Of Contents

    Related Documentation Command Summary Introduction Chapter Summary Front Panel to SCPI Command Map HP 53150A/151A/152A Command Summary SCPI Conformance Information IEEE 488.2 Common Commands HP 53150A/151A/152A SCPI Subsystem Commands 2-12 Std/New Column 2-12 Parameter Form Column 2-12 *RST Response 2-19...
  • Page 6 Contents Connecting the Counter to a Computer To Connect With the HP-IB IEEE 488.1 Interface Capabilities To Connect With the RS-232 Serial Interface Remote/Local Operation 3-11 Overview of Command Types and Formats 3-12 Common Command Format 3-12 SCPI Command and Query Format...
  • Page 7 Contents Programming the Counter for Status Reporting 3-41 Determining the Condition of the Counter 3-41 Resetting the Counter and Clearing the Remote Interface—Example 1 3-42 Using the Standard Event Status Register to Trap an Incorrect Command—Example 2 3-42 Using the Operation Status Register to Alert the Computer When Measuring has Completed—Example 3 3-43...
  • Page 8 Programming Examples 3-54 Using HP BASIC 3-54 Using C 3-55 List of the Programming Examples 3-55 Making a Frequency Measurement (HP BASIC) 3-56 Making a Frequency Measurement (QuickBASIC) 3-57 Making a Frequency Measurement (C) 3-58 Command Reference Introduction :ABORt Command...
  • Page 9 Contents :TRIGger Subsystem 4-43 Common Commands 4-44 *CLS (Clear Status Command) 4-45 *DDT (Define Device Trigger Command) *DDT? (Define Device Trigger Query) 4-46 *ESE (Standard Event Status Enable Command) *ESE? (Standard Event Status Enable Query) 4-47 *ESR? (Event Status Register Query) 4-49 *IDN? (Identification Query) 4-50...
  • Page 10 Contents Programming Guide...
  • Page 11: Before You Start

    Before You Start ...
  • Page 12: Introduction

    SCPI standard. If you have programmed any HP instruments that have been released over the last few years, you have probably seen a general trend toward the techniques specified in the SCPI standard.
  • Page 13: Getting Started

    NOTE With two minor exceptions, the only difference between programming the Counter using the HP-IB interface and the RS-232 serial interface is the manner in which you connect the Counter to the computer. These exceptions are: 1. The Counter sends a command prompt over the RS-232 interface (but not the HP-IB) after receiving and executing each command.
  • Page 14: New Users

    Counter. (In Chapter 3, “Programming Your Counter for Remote Operation,” there are programming examples provided in HP BASIC, Microsoft® QuickBASIC, and Borland® Turbo C.) However, whatever language you use, the command strings that control the Counter remain the same.
  • Page 15: Experienced Programmers

    If you have programmed other HP-IB instruments, you are probably familiar with many of the concepts and techniques discussed in this guide. Using the SCPI commands is also very similar to using the earlier HP-IB commands. The main difference between the two command sets is the hierarchy of the subsystem commands.
  • Page 16: Programming Guide Contents

    Chapter 1 Before You Start ... Programming Guide Contents Programming Guide Contents The following information is contained in this guide: • Table of Contents • Chapter 1 (this chapter),“Before You Start ...,” is a preface that introduces you to the programming guide. •...
  • Page 17: Assumptions

    Assumptions This guide assumes the Counter is correctly installed and interfaced to an external computer. If it is not, and you intend to use the HP-IB, see the IEEE HP-IB Interconnection information in Hewlett-Packard Company, Tutorial Description of the Hewlett-Packard Interface Bus, 1987. (See the section in this chapter titled “Related Documentation”...
  • Page 18: Related Documentation

    Counter. Additional information that may be useful is contained in the following publications: 1. HP 53150A/151A/152A Microwave Frequency Counter Operating Guide (HP Part Number 53150-90001) 2. Beginner's Guide to SCPI (HP Part Number H2325-90002, July 1990 Edition). 3. Beginner's Guide to SCPI, Barry Eppler (Hewlett-Packard Press, Addison-Wesley Publishing Co. 1991).
  • Page 19 7. Hewlett-Packard Company, BASIC 5.0/5.1 Interfacing Techniques Vol 2., Specific Interfaces, 1987. This HP BASIC manual contains a good non-technical description of the HP-IB (IEEE 488.1) interface in Chapter 12, “The HP-IB Interface.” Subsequent revisions of HP BASIC may use a slightly different title for this manual or chapter.
  • Page 20 Chapter 1 Before You Start ... Related Documentation 1-10 Programming Guide...
  • Page 21 Command Summary A Quick Reference...
  • Page 22: Command Summary Introduction

    1 The section titled “Front Panel to SCPI Command Map” provides maps that show the front-panel keys and their corresponding (or related) SCPI commands. 2 The section titled “HP 53150A/151A/152A Command Summary” lists the IEEE 488.2 Common Commands and SCPI Subsystem commands in Table 2-1 and Table 2-2, respectively.
  • Page 23: Front Panel To Scpi Command Map

    When you see quotation marks in a command’s parameter (shown in the Parameter Form column in Table 2-2), you must send the quotation marks with the command. Refer to the section titled “Using HP BASIC” on page 3-54 of this guide for details on how to use double quotes or single quotes to enclose the string parameter of a command.
  • Page 24 Chapter 2 Command Summary Front Panel to SCPI Command Map Shift + Freq Offset Shift + Pwr Offset Rate MODIFY Shift + HPIB Freq Menu Offset Offset HPIB Reset/Local Reset/ Rate Resol Local On/Off Shift Clear Enter Resolution Shift + On/Off FREQ POWER...
  • Page 25 Chapter 2 Command Summary Front Panel to SCPI Command Map INITitiate[:IMMediate] TRIGger[:SEQuence]:HOLDoff [SENSe]:FREQuency:OFFSet [SENSe]:POWer:AC:REFerence [SENSe]:AVERage:COUNt [SENSe]:AVERage:STATe SYSTem:COMMunicate:GPIB:ADDRess [SENSe]:FREQuency:RESolution DISPlay:BACKground[:STATe] [SENSe]:FUNCtion [SENSe]:POWer:AC:REFerence:STATe [SENSe]:FREQuency:OFFSet:STATe [SENSe]:FUNCtion Figure 2-1. Front Panel Control to SCPI Command Map (Part 2 of 2) Programming Guide...
  • Page 26 Chapter 2 Command Summary Front Panel to SCPI Command Map Freq Menu Offset Shift + Menu Reset/ Rate Local REF OSC On/Off Shift Clear SAVE RECALL CH1 LPF BAUD PRESET Instrument ID OP HRS BATT VOLTAGE DO SELF TEST PWR CORR Figure 2-2.
  • Page 27 Chapter 2 Command Summary Front Panel to SCPI Command Map [:SENSe]:ROSCillator:SOURce *SAV *RCL :INPut:FILTer[:LPASs][:STATe] [:SENSe]:FILTer:FM:AUTO :SYSTem:COMMunicate:SERial[:RECeive]:BAUD *RST *IDN? See Service Manual See Service Manual *TST? MEMory:CLEar[:NAME] MEMory:DATA [:SENSe]:CORRection:CSET:SELect [:SENSe]:CORRection:CSET:STATe Figure 2-2. Front Panel Menu to SCPI Command Map (Part 2 of 2) Programming Guide...
  • Page 28: Hp 53150A/151A/152A Command Summary

    Instruments (SCPI) commands in tabular format. IEEE 488.2 Common Commands are listed first, followed by SCPI commands. SCPI Conformance Information The SCPI commands used in the HP 53150A/151A/152A Counters are in conformance with the SCPI Standard Version 1995.0. The SCPI command set consists of the following: •...
  • Page 29: Ieee 488.2 Common Commands

    Table 2-1 lists the IEEE 488.2 Common Commands supported by the HP 53150A/151A/152A in alphabetical order by mnemonic, name, and function. More information concerning the operation of IEEE 488.2 status-reporting commands and structure can be found in the “Status Reporting”...
  • Page 30 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-1. IEEE 488.2 Common Commands Mnemonic Command Name Function *CLS Clear Status Clears all event status registers summarized in the status byte and empties the Error Queue. *DDT Define Device Trigger...
  • Page 31 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-1. IEEE 488.2 Common Commands (Continued) Mnemonic Command Name Function *SRE? Service Request Enable Queries the Service Request Enable register. Query *STB? Status Byte Query Queries the Status Byte and Master Summary Status bit.
  • Page 32: Hp 53150A/151A/152A Scpi Subsystem Commands

    The category of “New” consists of commands that could be: • SCPI approved but are not yet in the SCPI manual • HP approved and submitted for SCPI approval. • Not approved at all. The “New” commands operate as defined in this guide.
  • Page 33 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary Keyword/Syntax Parameter Form Std/New Comments :ABORt Event; no query. Resets the trigger system and aborts any measurement in progress. Places the trigger system in the IDLE state.
  • Page 34 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/New Comments Measurement Instructions :CONFigure[:SCALar]: See Configures the and instrument to perform the below. specified measurement. :CONFigure? Returns the function...
  • Page 35 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/New Comments :MEMory Subsystem. Manages instrument memory. :CLEAr[:NAME] Event; no query. Restores the frequency values in the named correction profile to the default values and sets all loss values to zero.
  • Page 36 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/New Comments [:SENSe] (cont.) :FREQuency Subtree. Controls the frequency-measuring capabilities of the instrument. :OFFSet [frequency unit] Sets a reference frequency for all other absolute frequency settings in the instrument.
  • Page 37 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/New Comments Subsystem. Controls the SCPI-defined :STATus (Operation and Questionable) status-reporting structures. :OPERation Subtree. :CONDition? Query only. Queries the Operation Condition Status Register.
  • Page 38 Chapter 2 Command Summary HP 53150A/151A/152A Command Summary Table 2-2. HP 53150A/151A/152A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/New Comments Subsystem. Collects the functions that are :SYSTem not related to instrument performance. :COMMunicate Subtree. Collects together configuration of control/communication interfaces.
  • Page 39: Rst Response

    SCPI error queue.) The states of command settings affected by the *RST command are described in Table 2-3. Table 2-4 lists command settings that are unaffected by *RST. Table 2-3. HP 53150A/151A/152A *RST State Command Header Parameter State ...
  • Page 40 Chapter 2 Command Summary *RST Response Table 2-4. Unaffected by *RST Item *PRE :MEMory:NSTates? :STATus subsystem—all command settings :SYSTem subsystem—all command settings 2-20 Programming Guide...
  • Page 41 Programming Your Counter for Remote Operation...
  • Page 42: Programming Your Counter For Remote Operation Introduction

    Counters using SCPI and IEEE 488.2 commands. With two minor exceptions, the only difference between programming these Counters using the HP-IB interface and the RS-232 serial interface is the manner in which you connect the Counter to the computer. These exceptions are: 1.
  • Page 43: Chapter Summary

    Chapter 3 Programming Your Counter for Remote Operation Introduction Chapter Summary Connecting the Counter to a Computer pg. 3-5 • Overview of Command Types and Formats pg. 3-12 • • Elements of SCPI Commands pg. 3-13 • Using Multiple Commands pg.
  • Page 44: Where To Find Some Specific Information

    3-18 • • Program Messages pg. 3-19 • Response Messages pg. 3-21 Programming Examples Making a Frequency Measurement (HP BASIC) pg. 3-56 • • Making a Frequency Measurement (QuickBASIC) pg. 3-57 • Making a Frequency Measurement (C) pg. 3-58...
  • Page 45: Connecting The Counter To A Computer

    To Connect With the HP-IB To connect the Counter to a computer using the HP-IB, install an HP-IB cable (such as the HP 10833A cable) between the two units, as shown in Figure 3-1. Computer (Rear Panel) HP 10833A/B/C/D...
  • Page 46 Changing the HP-IB Address Press and release the Shift key, and then press HPIB (Resol). The HPIB ADDR menu is displayed, the current HP-IB address is shown to the right of the blinking indicator (>), and the LED indicator between the arrow keys flashes.
  • Page 47 Connecting the Counter to a Computer To Connect With the RS-232 Serial Interface The HP 53150A, 53151A, and 53152A Frequency Counters use an RJ12 modular connector for the RS-232 interface. This connector is accessible through the back panel of the counter, as shown in Figure 3-2.
  • Page 48 Chapter 3 Programming Your Counter for Remote Operation Connecting the Counter to a Computer Assembling the DB-25/RJ12 Adapter and the Cable Use the following procedure to wire the adapter and assemble the cable: Obtain a male DB25 to female RJ12 adapter, such as the Voltrex MAK206F (manufactured by SPC Technology) or equivalent, and either a 6-conductor male-to-male RJ12 cable of a suitable length or a similar length of 6-conductor, flat telephone cable and two RJ12 plugs.
  • Page 49 Chapter 3 Programming Your Counter for Remote Operation Connecting the Counter to a Computer DB-25F (Female) RJ12 (Male) Pin 4: GND GRN (GND) Pin 3: RXD Pin 2: TXD BLK (TXD) RED (RXD) (Viewed from front side of the connectors) SPC Technology Voltrex Brand Part number MAK206 F DB-25F (female) to RJ12 (male) Adapter...
  • Page 50 Chapter 3 Programming Your Counter for Remote Operation Connecting the Counter to a Computer RJ12 Modular Plug SPC Technology Part number TA 30-6 Wire Wire No. Color No. Color Pin # Pin # SPC Technology, 6-Conductor Flat Telephone Wire Part number TXW6151 Figure 3-4.
  • Page 51 Figure 3-5. RS-232 Serial Interconnection Remote/Local Operation When the counter is connected to a computer via the HP-IB, and it is in Remote mode, the Rmt indicator is visible on the display, and the Counter settings cannot be affected using the front-panel controls. The Reset/Local key can be used to manually return the counter to local control (if local-lockout is off).
  • Page 52: Overview Of Command Types And Formats

    Chapter 3 Programming Your Counter for Remote Operation Overview of Command Types and Formats Overview of Command Types and Formats There are two types of HP 53150A/151A/152A programming commands: IEEE 488.2 Common Commands and Standard Commands for Programmable Instruments (SCPI). The format of each type of command is described in the following paragraphs.
  • Page 53: Elements Of Scpi Commands

    (or keywords with colon separators), program data, and terminators. These elements are sent to the Counter over the HP-IB or the RS-232 interface as a sequence of ASCII data messages. Examples of a typical Common Command and Subsystem Command are: OUTPUT 712;"...
  • Page 54 Uppercase letters indicate the abbreviated spelling for the command. For better program readability, you may send the entire keyword. The HP 53150A/151A/152A accepts either command form and is not case sensitive. For example, if the command syntax shows DISPlay, then DISP and DISPLAY are both acceptable forms.
  • Page 55 Chapter 3 Programming Your Counter for Remote Operation Elements of SCPI Commands Examine the portion of the [:SENSe] subsystem shown below: [:SENSe] :FREQuency :RESolution The root-level keyword [:SENSe] is an optional keyword. To set the Counter's frequency resolution, you can use either of the following: :SENS:FREQ:RES :FREQ:RES Programming Guide...
  • Page 56 A string parameter is delimited by either single quotes or double quotes. Within the quotes, any characters in the ASCII 7-bit code may be specified. The following HP BASIC statement sends a command containing a parameter: OUTPUT 703;"FUNC ‘FREQ’"...
  • Page 57 Chapter 3 Programming Your Counter for Remote Operation Elements of SCPI Commands Parameter Separator If you send more than one parameter with a single command, you must separate adjacent parameters with a comma. Query Parameters All selectable parameters (except Common Commands) can be queried to return the minimum, maximum, and DEFault values they are capable of being set to by sending a MINimum, MAXimum, or DEFault parameter after the “?.”...
  • Page 58 Chapter 3 Programming Your Counter for Remote Operation Elements of SCPI Commands Suffix Multipliers Table 3-2 lists the suffix multipliers that can be used with suffix elements (except PCT and DEG). Table 3-2. Suffix Multipliers DEFINITION MNEMONIC NAME 1E15 PETA 1E12 TERA GIGA...
  • Page 59: Using Multiple Commands

    Program Messages are a combination of one or more properly formatted SCPI Commands. Program messages always go from a computer to the Counter. They are sent to the Counter over the Counter's HP-IB or serial interface as a sequence of ASCII data messages.
  • Page 60 Chapter 3 Programming Your Counter for Remote Operation Using Multiple Commands When multiple subsystem commands are sent in one program message, the first command is always referenced to the root node. Subsequent commands, separated by “;”, are referenced to the same level as the preceding command if no “:”...
  • Page 61: Overview Of Response Message Formats

    The output message remains in the queue until it is read or another command is issued. When read, the message is transmitted across the HP-IB or the serial interface to the computer. You read the message by using some type of enter statement that includes the device address and an appropriate variable.
  • Page 62 Chapter 3 Programming Your Counter for Remote Operation Overview of Response Message Formats response data ^END = ASCII character decimal 10 NOTE ^END = EOI asserted concurrent with last byte ; = multiple response separator (ASCII character decimal 59) , = data separator within a response (ASCII character decimal 44) Figure 3-9.
  • Page 63 Chapter 3 Programming Your Counter for Remote Operation Overview of Response Message Formats Response Message Data Types Table 3-3 contains explanations of response data types. Table 3-3. Response Message Data Types Type Description This numeric representation has an implicit radix point. ...
  • Page 64 Chapter 3 Programming Your Counter for Remote Operation Overview of Response Message Formats Table 3-3. Response Message Data Types (Continued) Type Description A string response consists of ASCII characters enclosed by double quotes. For example, string data is used for the “” portion of :SYST:ERR? response and for [:SENS]:FUNC? response.
  • Page 65: Status Reporting

    Chapter 3 Programming Your Counter for Remote Operation Status Reporting Status Reporting The HP 53150A, 53151A, and 53152A status registers conform to the SCPI and IEEE 488.2 standards. Figure 3-10 shows all of the status-register groups and queues in the Counter.
  • Page 66 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Questionable Data Status Register Group NOTES: 1. The numbers that are in parentheses and positioned Bits above the arrows represent the integer formed by the Not Used 0 to 2 binary weighting of the corresponding bit.
  • Page 67 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Status Byte Register and Service Request Enable Register Error/Event Queue Questionable Data Status Register Group Status Byte Service Request Register Enable Register (Logical AND) & Status of & Output Queue &...
  • Page 68 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Table 3-4. Status Byte Register WEIGHT SYMBOL DESCRIPTION — — Not used — — Not used Error/Event Queue Not Empty Questionable Data/Signal Status Register Summary Bit Message Available Summary Bit Standard Event Status Register Summary Bit RQS/MSS Request Service/Master Status Summary Bit...
  • Page 69 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Output Queue is not empty. This bit is set FALSE (zero) when the Output Queue is empty. • Bit 5 (ESB) summarizes the Standard Event Status Register. This bit indicates whether or not one of the enabled Standard Event Status Register events have occurred since the last reading or clearing of the Standard Event Status Register.
  • Page 70 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Standard Event Status Register Group Standard Event Standard Event Enable Register Status Register & Operation Complete & Not Used & Query Error Device-Dependent Error & Execution Error & Command Error &...
  • Page 71 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Table 3-5. Standard Event Status Register BIT WEIGHT SYMBOL DESCRIPTION Operation Complete — (RQC) Not used because this instrument cannot request permission to become active IEEE 488.1 controller-in- charge. Query Error Device-Specific Error Execution Error Command Error...
  • Page 72 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Errors -400 through -499 are query errors. • Bit 3 (Device-Specific Error) is an event bit which indicates an operation did not properly complete due to some condition of the Counter.
  • Page 73 Chapter 3 Programming Your Counter for Remote Operation Status Reporting The Operation and Questionable Data Status Register Groups The Operation and Questionable Data Status Register Groups have the following registers: • a condition register • one or more transition filters •...
  • Page 74 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Condition Register A condition register continuously monitors the hardware and firmware status of the Counter. There is no latching or buffering for this register; it is updated in real time. Reading a condition register does not change its contents.
  • Page 75 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Table 3-6. Transition Filter Definition Positive Negative Transition Transition Transition Which Causes the Event-Bit to be set TRUE Filter Bit Filter Bit TRUE FALSE positive transition FALSE TRUE negative transition TRUE TRUE either a positive or negative transition...
  • Page 76 Chapter 3 Programming Your Counter for Remote Operation Status Reporting To read the event registers use: :STATus:OPERation[:EVENt]? :STATus:QUEStionable[:EVENt]? Use event register queries or *CLS to clear event registers. Event Enable Register An event enable register selects which event bits in the corresponding event register can generate a summary bit.
  • Page 77 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Operation Status Register Group The Operation Status Register Group monitors conditions which are part of the Counter's normal operation and has a complete set of registers that consist of the following: •...
  • Page 78 Chapter 3 Programming Your Counter for Remote Operation Status Reporting A detailed description of each bit in the Operation Status Register follows: • Bits 0-3 are not used. • Bit 4 (Measuring) is a condition bit which indicates the Counter is actively measuring.
  • Page 79 Chapter 3 Programming Your Counter for Remote Operation Status Reporting Questionable Data Status Register Group The Questionable Data Status Register Group monitors SCPI-defined conditions. NOTE For this register group, the transition filter is fixed as PTR with all bits set to ones. This cannot be changed or queried. Table 3-8 lists the Questionable Data Status Register bits and briefly describes each bit.
  • Page 80 Chapter 3 Programming Your Counter for Remote Operation Status Reporting • Bit 12 (Hardware Summary) This condition is TRUE when an internal hardware fault has been detected, either in normal operation or by the self test. • Bit 13 is not used. •...
  • Page 81 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter for Status Reporting Programming the Counter for Status Reporting Determining the Condition of the Counter The Counter has status registers that are used to indicate its condition. There are four register groups that can be examined individually, or used to alert a computer.
  • Page 82 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter for Status Reporting Resetting the Counter and Clearing the Remote Interface—Example 1 Before attempting any programming, it is a good idea to set the Counter to a known state. The following command grouping shows how to reset the Counter.
  • Page 83 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter for Status Reporting Using the Operation Status Register to Alert the Computer When Measuring has Completed—Example 3 The following command grouping illustrates how to use the Operation Status register and the Status Byte register to alert the computer when measuring has completed.
  • Page 84 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter for Status Reporting Do you want Skip this section ("Status Reporting"). to do Status Reporting? Use the following: Reset and initialize the Counter :STAT:OPER:ENAB 6704 as follows: This enables any of the available bits to Device Clear generate a summary bit to the Status Byte Register.
  • Page 85 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter for Status Reporting From sheet 1 of 2 Initiate a Counter function. Do you For example, use the following: want to send a Service Request (SRQ) INIT interrupt to the computer? This initiates the selected measurement.
  • Page 86 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter to Display Results Programming the Counter to Display Results Configuring the Counter's Display The Counter has three display modes: 1. Raw results. This display mode is used on power-up. 2.
  • Page 87 Chapter 3 Programming Your Counter for Remote Operation Commands for Displaying Results Commands for Displaying Results Command for Displaying Raw Results The following command always causes raw measurement results to be displayed: *RST Turns off all offsets. Commands for Displaying Relative Results FREQ:OFFS:STAT ON Turns on offsets.
  • Page 88 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter to Synchronize Measurements Programming the Counter to Synchronize Measurements Synchronizing Measurement Completion There are three commands for synchronizing the end of a measurement and computer transfer of data: 1. The *WAI command 2.
  • Page 89 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter to Synchronize Measurements Using the *WAI Command This command is most useful when only the Counter is on the bus, and you want the Counter to send the data when it is ready. In this example, the Counter is instructed to take 50 measurements and return the average for these 50 measurements.
  • Page 90 50th measurement is complete. Read the Counter. The program waits until the Counter returns a 1. (The HP-IB timeout must be set so that it is longer than the expected measurement time.) Using the *OPC Command to Assert SRQ This method is recommended when the Counter is interfaced with many other instruments, any of which can assert SRQ.
  • Page 91 Chapter 3 Programming Your Counter for Remote Operation Programming the Counter to Synchronize Measurements Set up program to specify service routine and enable interrupt when SRQ is asserted: :INIT Start measurements. *OPC Enable OPC bit. The program can do other things while it is waiting for SRQ. When SRQ occurs, and the Counter has been identified as the cause of the SRQ, ask for the data: DATA?
  • Page 92 Chapter 3 Programming Your Counter for Remote Operation Writing SCPI Programs Writing SCPI Programs Figure 3-15 is a general summation of how to write SCPI programs. It shows a typical sequence you might go through in the process of writing a program.
  • Page 93 Chapter 3 Programming Your Counter for Remote Operation Writing SCPI Programs Reset and initialize the Counter as follows: Device Clear :ABORt Do you want to average? SRE 0 ESE 0 :STAT:PRES Configure Averaging. Do you See Averaging in Chapter 3. want to do Status Reporting? Configure status reporting.
  • Page 94: Programming Examples

    Chapter 3 Programming Your Counter for Remote Operation Programming Examples Programming Examples In this section, you will see how to program the HP 53150A/151A/152A to make common measurements. Examples are provided in the following programming languages: • HP BASIC •...
  • Page 95 Chapter 3 Programming Your Counter for Remote Operation Programming Examples Using C The C examples assume you have an HP 82335A HP-IB Interface card inside your IBM PC or compatible. List of the Programming Examples The following examples are provided: 1.
  • Page 96 Chapter 3 Programming Your Counter for Remote Operation Programming Examples Making a Frequency Measurement (HP BASIC) 10 ! This program sets up the counter to make 10 frequency 20 ! measurements on channel 2. 30 ! The results are displayed on the computer CRT.
  • Page 97 ‘get the result CALL IOENTERS(source&ng, freqs(i), 23, actf%) ‘Read the ASCII characters PRINT “Frequency”; i; “= “; freqs(i) NEXT i ‘ Subroutine to send command to HP 5315xA/ SUB sendhp (code$) CALL iooutputs(source, code$, LEN(code$)) END SUB Programming Guide 3-57...
  • Page 98 #include “CFUNC.H” void sendhp(char *); /* function to send command to counter */ /* global data */ long ctr=703; /* Counter is at address 03. HP-IB is at select code 7 */ error; void main() long isc=7; /* Select code 7 int state=1;...
  • Page 99 Chapter 3 Programming Your Counter for Remote Operation Programming Examples getch(); /* Function to send command to HP 5315xA */ void sendhp(hpib_cmd) char *hpib_cmd; char hpcmd[80]; /* Variables used by function */ int length; strcpy(hpcmd, hpib_cmd); length=strlen(hpcmd); error=IOOUTPUTS(ctr, hpcmd, length);...
  • Page 100 Chapter 3 Programming Your Counter for Remote Operation Programming Examples 3-60 Programming Guide...
  • Page 101 Command Reference A Dictionary...
  • Page 102 This chapter describes the SCPI Subsystem commands and the IEEE 488.2 Common Commands for the HP 53150A/151A/152A Microwave Frequency Counters. The information in this chapter is intended to help you program the Counter over its HP-IB or RS-232 serial interface. The commands are presented in alphabetical order.
  • Page 103 Chapter 4 Command Reference Introduction • The short form of keywords is shown in uppercase. • Quotation marks may be part of the command's parameter; the quotation marks shown must be sent to the Counter. • Unless otherwise noted, a command is sequential (not overlapped).
  • Page 104 Chapter 4 Command Reference :ABORt Command :ABORt Command :ABORt COMMAND This command causes the Counter to abort, as quickly as possible, any measurement in progress. The :ABORt command is not complete until the current measurement is stopped. The execution of an ABORt command sets false any Pending Operation Flags that were set true by initiation of measuring.
  • Page 105 When activity is subsequently detected (a measurable signal is applied, a front-panel key is pressed, or a setting is changed by a command sent over the HP-IB or the RS-232 interface), the display backlight is restored to its previous state (i.e., if the backlight was set to OFF, it remains off;...
  • Page 106 Chapter 4 Command Reference :DISPlay Subsystem :DISPlay:ENABle . . . COMMAND Sets or queries whether the entire display (annunciators and indicators, with the exception of Rmt) is visible. • Single ASCII-encoded byte, 0 or 1. QUERY RESPONSE • A value of 0 indicates OFF; a value of 1 indicates ON. •...
  • Page 107 Chapter 4 Command Reference Group Execute Trigger (GET) Group Execute Trigger (GET) COMMAND The full capability of the Group Execute Trigger IEEE 488.1 interface function is implemented in the Counter. This function permits the Counter to have its operation initiated over the Bus. In response to the IEEE 488.1 Group Execute Trigger (GET) remote interface message (while the Counter is addressed to listen), the Counter performs the action defined by the *DDT command (see page 4-46).
  • Page 108 Chapter 4 Command Reference :INITiate Subsystem :INITiate Subsystem This subsystem controls the initiation of a measurement. :INITiate:CONTinuous . . . COMMAND Sets or queries the state of continuously initiated measurements. When CONTinuous is set to OFF, no measurements are made until CONTinuous is set to ON or :INITiate[:IMMediate] is received.
  • Page 109 Chapter 4 Command Reference :INPut Subsystem :INITiate[:IMMediate] COMMAND This event command causes the instrument to initiate either a single measurement or a block of measurements. This command is an overlapped command (see IEEE 488.2, Section COMMENT 12). Beginning a measurement or block of measurements with an :INITiate[:IMMediate] sets the Pending Operation Flag to true.
  • Page 110 Chapter 4 Command Reference :MEASure Subsystem :MEASure Subsystem The :MEASure subsystem commands allow you to configure the Counter, initiate measurements, and place the results in the Output Queue using a minimum number of commands. These commands are described in detail in this section.
  • Page 111 Chapter 4 Command Reference :MEASure Subsystem Table 4-1. Summary of the Measurement Instruction Commands Command Description :MEASure query This command is the simplest to use, but it allows little flexibility. This command lets the Counter configure itself for an optimal measurement, initiate the measurement, and return the result;...
  • Page 112 Chapter 4 Command Reference :MEASure Subsystem :CONFigure[:SCALar]: [,] COMMAND Configures the instrument to perform the specified function but does not initiate the measurement. • Use :INITiate:FETCh? or :READ? to make and query a measurement. COMMENTS • Parameters (other than ) can be defaulted by substituting the keyword DEFault.
  • Page 113 Chapter 4 Command Reference :MEASure Subsystem • If an parameter is outside the measurement capabilities of the Counter model, an error is generated, and the command does not execute. • See “Descriptions of the Measurement Functions” on page 4-16 for a description of each of the measurement functions.
  • Page 114 Chapter 4 Command Reference :MEASure Subsystem :MEASure[:SCALar]:? [,] COMMAND This query provides a complete measurement sequence: configuration, measurement initiation, and query for result. • This query is used when generic measurement is acceptable, and fine COMMENTS adjustment of Counter settings is not necessary. •...
  • Page 115 Chapter 4 Command Reference :MEASure Subsystem :READ?[[:SCALar]:]? COMMAND This query provides a method for performing a :FETCh? on fresh data. • This command is commonly used in conjunction with a :CONFigure COMMENTS command to provide a capability similar to :MEASure?, in which the application programmer is allowed to provide fine adjustments to the instrument state by issuing the corresponding commands between :CONFigure and :READ?.
  • Page 116 Chapter 4 Command Reference :MEASure Subsystem Descriptions of the Measurement Functions Table 4-2 lists the available measurement functions, the parameters that can be used with them, and the valid values for . Table 4-2. The , , and for the Measure Instruction Commands ...
  • Page 117 Chapter 4 Command Reference :MEASure Subsystem :MEASure[:SCALar]:POWer[:AC] [[,]] [,(@2)] This command measures power. FUNCTION DESCRIPTION range: -40 to +10 dBm default: 0.00 0.01 resolution: is supported only for compatibility with other description: instruments. values: 0.01 dB | MIN | MAX | DEF 0.01 dB default: ...
  • Page 118 Chapter 4 Command Reference :MEASure Subsystem Using :MEAsure This is the simplest Measurement Instruction command to use, but it does not offer much flexibility. :MEASure causes the Counter to configure itself for a default measurement, starts the measurement, and queries the result.
  • Page 119 Chapter 4 Command Reference :MEASure Subsystem For example, use :CONF:FREQ 5 GHZ, 1HZ to configure a default frequency measurement, where 1 Hz is the required resolution, and 5 GHz is the expected value. :READ? to start the measurement and query the result. Using :CONFigure with :INITiate and :FETCh? The :READ? query is composed of the :INITiate command, which starts the measurement, and the :FETCh? command, which returns the results...
  • Page 120 Chapter 4 Command Reference :MEMory Subsystem :MEMory Subsystem This subsystem manages the instrument's memory. :MEMory:DATA . . . , COMMAND Stores and queries data in the named power-correction profile. • Data points are returned in format. QUERY RESPONSE •...
  • Page 121 Chapter 4 Command Reference :MEMory Subsystem :MEMory:CLEAR[:NAME] . . . COMMAND Resets the contents of the named power-correction profile to the default configuration. • Valid profile names: CORR1, CORR2, . . . CORR9 COMMENTS • The data currently stored in non-volatile memory for the named correction profile is discarded.
  • Page 122 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe] Subsystem The [:SENSe] subsystem commands are divided into several sections. Each section, or subtree, deals with controls that directly affect instrument-specific settings and not those related to the signal-oriented characteristics. [:SENSe]:AVERage[STATe] . . . COMMAND Turns averaging ON and OFF.
  • Page 123 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:CORRection:CSET:SELect . . . COMMAND Selects a power-correction profile by name from nine available profiles. Valid profile names: CORR1, CORR2, . . . CORR9 • *RST: CORR1 COMMENTS • The correction-profile setting is applied for the current session only. To store the profile selection in non-volatile memory, issue a *SAV command.
  • Page 124 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:DATA? . . . [] COMMAND Queries the current measurement result data of the :SENSe subsystem. Valid : “[SENSe:][XNONE:]FREQuency [1] | 2” “[SENSe:][XNONE:]POWer [2]” • Frequency values are returned in Hz as ASCII bytes in NR1 format. QUERY RESPONSE •...
  • Page 125 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:FREQuency:OFFSet . . . [] COMMAND Sets a reference frequency for all other absolute frequency settings in the instrument. The acceptable range for the parameter is 0 to 50 GHz. RANGE The offset frequency can be specified in Hz, KHz, or MHz only. UNITS •...
  • Page 126 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:FREQuency:RESolution . . . [] COMMAND Sets the resolution of the frequency measurement. The allowable settings for and are: 1 Hz, 10 Hz, 100 Hz, 1 KHz, 10 KHz, 100 KHz, and 1 MHz. •...
  • Page 127 Chapter 4 Command Reference [:SENSe]:FUNCtion Subtree [:SENSe]:FUNCtion Subtree This subtree controls the sensor functions. [:SENSe]:FUNCtion[:OFF] . . . [,] COMMAND Sets or queries the sensor functions to be sensed by the Counter. The strings are: "[XNONe:]FREQuency [1 | 2]" "[XNONe:]POWer [2]"...
  • Page 128 Chapter 4 Command Reference [:SENSe]:FUNCtion Subtree [:SENSe]:FUNCtion[:ON] . . . [,] COMMAND Selects the sensor functions to be sensed by the Counter. The supported strings are: “[XNONe:]FREQuency [1 | 2]” “[XNONe:]POWer [2]” • The query form of this command returns a comma-separated list of QUERY RESPONSE functions that are ON.
  • Page 129 Chapter 4 Command Reference [:SENSe]:FUNCtion Subtree [:SENSe]:FUNCtion:STATe? . . . COMMAND This query-only command returns a Boolean value that indicates whether the specified is currently ON or OFF. See [:SENSe]:FUNCtion[:ON] on page 4-28 for valid COMMENT strings. [:SENSe]:POWer Subtree This subtree controls the power-measurement function.
  • Page 130 Chapter 4 Command Reference [:SENSe]:FUNCtion Subtree [:SENSe]:ROSCillator Subtree This subtree controls the Reference Oscillator. [:SENSe]:ROSCillator:SOURce . . . COMMAND Sets or queries the current reference timebase to INTernal or EXTernal. A sequence of ASCII-encoded bytes: INT or EXT QUERY RESPONSE •...
  • Page 131 Chapter 4 Command Reference :STATus Subsystem :STATus Subsystem The :STATus subsystem commands allow you to specify or examine the status of the Operation Status Register group and the Questionable Data/Signal Register group. :STATus:OPERation Subtree The :STATus:OPERation subtree commands allow you to examine the status of the Counter monitored by the Operation Status Register Group, shown in Figure 4-1.
  • Page 132 Chapter 4 Command Reference :STATus Subsystem :STATus:OPERation:CONDition? COMMAND Queries the status of the Operation Condition Status Register. • Numeric data transferred as ASCII bytes in format. QUERY RESPONSE • Range is 0 to 32,767. • The query response value is an integer formed by the binary weighting of the bits.
  • Page 133 Chapter 4 Command Reference :STATus Subsystem :STATus:OPERation[:EVENt]? COMMAND Queries the status of the Operation Event Status Register. • Numeric data transferred as ASCII bytes in format. QUERY RESPONSE • Range is 0 to 32,767. • The query response value is an integer formed by the binary weighting of bits.
  • Page 134 Chapter 4 Command Reference :STATus Subsystem :STATus:OPERation:NTRansition | COMMAND Sets or queries the negative transition filter for the Operation status reporting structure. The range of the or parameter is RANGE 0 to 32,767. Numeric data transferred as ASCII bytes in format. QUERY RESPONSE •...
  • Page 135 Chapter 4 Command Reference :STATus Subsystem • The value of unused bits is zero when queried and is ignored when set. • A TRUE bit in the positive transition filter specifies that a positive (FALSE to TRUE) transition of the corresponding bit in the Operation Condition Status Register generates the corresponding event in the Operation Event Status Register.
  • Page 136 Chapter 4 Command Reference :STATus Subsystem :STATus:QUEStionable Subtree The :STATus:QUEStionable subtree commands allow you to examine the status of the Counter monitored by the Questionable Data/Signal Status Register Group, shown in Figure 4-3. The Questionable Status Group consists of a condition register, two transition registers, an event register, and an enable register.
  • Page 137 Chapter 4 Command Reference :STATus Subsystem None RELATED FRONT-PANEL KEYS :STATus:QUEStionable:ENABle . . . | COMMAND Sets or queries the Questionable Data Event Status Enable Register. The range of the or parameter is RANGE 0 to 32,767. Numeric data transferred as ASCII bytes in ...
  • Page 138 Chapter 4 Command Reference :STATus Subsystem Condition Status Register; this allows the Questionable Data Status Register to detect changes in conditions. • An event becomes TRUE when the associated condition makes the transition specified by the transition filters. • The event bits, once set, are “sticky”—i.e., they cannot be cleared until they are read, even if they do not reflect the current status of a related condition.
  • Page 139 The default setting is address 19. • This value is unaffected by *RST. • To change the HP-IB address used at power-on, save the instrument settings using the *SAV 0 command after changing the HP-IB address. Shift + HPIB RELATED...
  • Page 140 Chapter 4 Command Reference :SYSTem Subsystem :SYSTem:COMMunicate:SERial:BAUD . . . COMMAND Sets or queries the baud rate. The possible BAUD rate values that can be entered for the RANGE parameter are: 1200, 2400, 4800, 9600, 14400, and 19200.
  • Page 141 Chapter 4 Command Reference :SYSTem Subsystem • The queue is cleared (emptied) on *CLS, power-on, or upon reading he COMMENTS last error from queue. • If the Error Queue overflows, the last error in the queue is replaced with the error -350, “Queue overflow”. Any time the queue overflows, the least recent errors remain in the queue and the most recent error is discarded.
  • Page 142 Chapter 4 Command Reference :SYSTem Subsystem Table 4-3. Front Panel Keys and Key Codes Key Name Key Code Key Name Key Code Reset/Local Chan Select Rate Display Power Offset On/Off (Frequency) Resol Offset On/Off (Power) Shift Up Arrow Clear Down Arrow +/–...
  • Page 143 Chapter 4 Command Reference :TRIGger Subsystem :TRIGger Subsystem :TRIGger[SEQuence | STARt]:HOLDoff . . . COMMAND When INIT:CONT is ON, this command determines the rate at which measurements are made by setting a delay between measurements. Its setting corresponds to the front-panel rate setting as follows: 0.0 = FAST;...
  • Page 144 Chapter 4 Command Reference Common Commands Common Commands The IEEE 488.2 Common Commands are general-purpose commands that are common to all instruments (as defined in IEEE 488.2). These commands are generally not related to measurement configuration. They are used for functions like resetting the instrument, identification, or synchronization.
  • Page 145 Chapter 4 Command Reference Common Commands *CLS (Clear Status Command) *CLS COMMAND Clears all event registers summarized in the status byte (Standard Event Status Register, Operation Event Status Register, and Questionable Data Event Status Register) and clears the Error Queue. •...
  • Page 146 Chapter 4 Command Reference Common Commands *DDT (Define Device Trigger Command) *DDT? (Define Device Trigger Query) *DDT COMMAND *DDT? Sets or queries the action that the device executes when it receives the IEEE 488.1 Group Execute Trigger (GET) interface message (page 4-7) or a *TRG common command.
  • Page 147 Chapter 4 Command Reference Common Commands *ESE (Standard Event Status Enable Command) *ESE? (Standard Event Status Enable Query) *ESE | COMMAND *ESE? Sets or queries the Standard Event Status Enable Register, shown in Figure 4-3. The parameter and query response value, when rounded to an integer value and expressed in base 2 (binary), represents the bit values of the Standard Event Status Enable Register.
  • Page 148 Chapter 4 Command Reference Common Commands 0 to 255 RANGE RESOLUTION Numeric data transferred as ASCII bytes in format. QUERY RESPONSE • At power-on, the Standard Event Status Enable Register is cleared COMMENTS (value is 0). • This value is unaffected by *RST and *SAV/*RCL.
  • Page 149 Chapter 4 Command Reference Common Commands *ESR? (Event Status Register Query) *ESR? COMMAND Queries the Standard Event Status Register, shown in Figure 4-4. This event register captures changes in conditions, by having each event bit correspond to a specific condition in the instrument. An event becomes TRUE when the associated condition makes the defined transition.
  • Page 150 Chapter 4 Command Reference Common Commands *IDN? (Identification Query) *IDN? COMMAND Queries the Counter identification. A sequence of ASCII-encoded bytes: QUERY RESPONSE HEWLETT PACKARD, , , • This query should be the last query in a terminated program message; COMMENTS if it is not the last query, an error -440 is generated.
  • Page 151 Chapter 4 Command Reference Common Commands *OPC (Operation Complete Command) *OPC COMMAND This event command enables the OPC bit (bit 0) in the Standard Event Status Register to be set when a triggered action is complete. See the section titled “Standard Event Status Register” on page 3-30 of this guide for a detailed description of the Standard Event Status Register's Operation Complete bit.
  • Page 152 Chapter 4 Command Reference Common Commands *PRE (Parallel Poll Enable Register) PRE? (Parallel Poll Enable Register Query) *PRE COMMAND *PRE? Sets or queries the value of the parallel poll enable register. QUERY RESPONSE 0-255 RANGE • The parallel poll enable register is eight bits wide and has the same COMMENTS bit definitions as the status byte.
  • Page 153 Chapter 4 Command Reference Common Commands *RST (Reset Command) *RST COMMAND This event command performs an instrument reset. The reset performs the following: • sets instrument settings to their *RST states, and • places the instrument in “Operation Complete Idle State” and “Operation Complete Query Idle State.”...
  • Page 154 Chapter 4 Command Reference Common Commands *SAV (Save Command) *SAV | COMMAND This command stores the current state of the instrument in register 0 of local non-volatile memory when *RCL or is executed or Recall is selected from the menu using the front-panel controls.
  • Page 155 Chapter 4 Command Reference Common Commands *SRE (Service Request Enable Command) *SRE? (Service Request Enable Query) *SRE | COMMAND *SRE? Sets or queries the Service Request Enable Register, which is shown in Figure 4-5. The parameter and query response value, when rounded to an integer value and expressed in base 2 (binary), represents the bit values of the Service Request Enable Register.
  • Page 156 Chapter 4 Command Reference Common Commands • At power-on, this value is cleared (set to 0). COMMENTS • This value is unaffected by *RST, *CLS, and *SAV/*RCL. None RELATED FRONT-PANEL KEYS 4-56 Programming Guide...
  • Page 157 Chapter 4 Command Reference Common Commands *STB? (Status Byte Query) *STB? COMMAND Queries the Status Byte Register, shown in Figure 4-6. This register is cleared at power-on. This query does not directly alter the Status Byte Register (including the MSS/RQS bit) or anything related to the generation of SRQ. Bits Used 0 to 1...
  • Page 158 Chapter 4 Command Reference Common Commands *TRG (Trigger Command) *TRG COMMAND This command is the device-specific analog of the IEEE 488.1 Group Execute Trigger (GET) interface message (page 4-7), and has exactly the same effect. The *TRG command performs the action defined by the *DDT command (page 4-46).
  • Page 159 1 Band 1 Threshold 20 Unused 2 Band 2 RF Threshold 21 Front Panel Hardware 3 Band 2 IF Through Threshold 22 HP-IB 4 Band 2 IF Heterodyne Threshold 23 EEPROM Instrument Configuration Data 5 Heterodyne Path 24 EEPROM Service Data...
  • Page 160 Chapter 4 Command Reference Common Commands The following are tested: COMMENTS EEPROM Front-panel components Measurement hardware Power supply outputs Shift + Menu (DO SELF TEST) RELATED FRONT-PANEL KEYS 4-60 Programming Guide...
  • Page 161 Chapter 4 Command Reference Common Commands *WAI (Wait-to-Continue Command) *WAI COMMENTS This command prevents the instrument from executing any further commands or queries until all pending operations are complete. The only way to cancel this “holdoff” is by device clear, power-on, *RST, or *CLS. See the section titled “Using the *WAI Command”...
  • Page 162 Chapter 4 Command Reference Common Commands 4-62 Programming Guide...
  • Page 163 Errors...
  • Page 164 Chapter 5 Errors Introduction Introduction This chapter explains how to read error messages from the Counter, discusses the types of errors, and provides a table of all of the Counter's error messages and their probable causes. Programming Guide...
  • Page 165 Chapter 5 Errors Reading an Error Reading an Error Executing the :SYSTem:ERRor? command reads the oldest error from the error queue and erases that error from the queue. The :SYST:ERR? response has the form: , An example response is: -113,”Undefined header”...
  • Page 166 Chapter 5 Errors Error Queue Error Queue As errors are detected, they are placed in an error queue. The error queue is a first in, first out queue. That is, if more than one error has occurred, the first error in the queue is read out with :SYST:ERR?. Subsequent responses to :SYST:ERR? continue until the queue is empty.
  • Page 167 Chapter 5 Errors Error Types Error Types Error numbers are categorized by type as shown in Table 5-1. The error codes that can be generated by the HP 53151A/152A/153A Counters are listed in Table 5-2. Table 5-1. Error Types Error Number...
  • Page 168 Chapter 5 Errors Error Types Command Error An in the range [−100 to −199] indicates that an IEEE 488.2 syntax error was detected by the Counter's parser. The occurrence of any error in this class causes the command error bit (bit 5) in the Event Status Register to be set.
  • Page 169 An attempt is being made to read data from the output queue when no output is either present or pending. • Data in the output queue was lost. Error List Table 5-2 lists and describes the error messages generated by the HP 53150A/151A/152A Counters. Programming Guide...
  • Page 170 Chapter 5 Errors Error Types Table 5-2. Errors Number Error String Cause No error The error queue is empty. Every error in the queue has been read (:SYSTem:ERRor? query) or the queue was cleared by power-on or *CLS. -100 Command error This is the generic syntax error used if the Counter cannot detect more specific errors.
  • Page 171 Chapter 5 Errors Error Types Table 5-2. Errors (Continued) Number Error String Cause -131 Invalid suffix The suffix does not follow the syntax described in IEEE 488.2 or the suffix is inappropriate for the Counter. -134 Suffix too long The suffix contained more than 12 characters. -138 Suffix not allowed A suffix was encountered after a numeric element that does not allow...
  • Page 172 Chapter 5 Errors Error Types Table 5-2. Errors (Continued) Number Error String Cause -211 Trigger ignored Indicates that a GET or *TRG was received and recognized by the Counter but was ignored. -213 Init ignored Indicates that a request for a measurement initiation was ignored as another measurement was in progress.
  • Page 173 Chapter 5 Errors Error Types Table 5-2. Errors (Continued) Number Error String Cause -420 Query UNTERMINATED Indicates that a condition causing an UNTERMINATED Query error occurred. For example, the Counter was addressed to talk and an incomplete program message was received. -430 Query DEADLOCKED Indicates that a condition causing a DEADLOCKED Query error...
  • Page 174 Chapter 5 Errors Error Types 5-12 Programming Guide...
  • Page 175 ABORt command command warning status bit 3-39 3-40 ACSII 4-59 Common Commands 2-10 ADDRess 2-18, 4-39 *CLS 2-10 address *DDT 2-10 HP-IB 3-6 4-39 *DDT? 2-10 Applications *ESE 2-10 4-47 ASCII format 3-55 *ESE? 2-10 4-47 Assumptions *ESR? 2-10...
  • Page 176 2-10 conformance 4-51 IEEE488.2 4-44 Parallel Poll Enable Register 2-10 connecting the Counter to a 4-52 computer Parallel Poll Enable Register connecting with the HP-IB Query 2-10 connecting with the RS-232 serial Recall 2-10 interface Recall Command 4-52 CORRection 2-15...
  • Page 177 Index Data type error Event Enable Register, 3-33 3-36 3-37 data, measurement 4-24 Event Register 3-33 3-35, 3-37 DATA? 2-15 Event Status Register Query 2-10 4-49 data-point 4-20 3-31 3-31 Execution Error 5-6, 5-9 Define Device Trigger Command 2-10 definition Define Device Trigger Query 2-10 status bit...
  • Page 178 Index HOLDoff 2-18 Invalid character holdoff 4-61 Invalid character data How to Use This Guide Invalid character in number HP 53131A/132A SCPI Subsystem Invalid expression Commands 2-12 Invalid outside macro definition HP BASIC Invalid separator HP Basic, using 3-54 Invalid string data...
  • Page 179 Index Missing parameter output queue 4-51 negative pulse width 4-27 4-28 Parallel Poll Enable Register 2-10 4-52 negative transition filter 2-17 Parallel Poll Enable Register negative transition filter register 3-37 Query 2-10 2-12 parallel poll response 2-10 4-50 No Error Parameter error 5-10 4-59...
  • Page 180 Index Query INTERRUPTED 5-10 3-31 query parameters 3-17 4-57 Query UNTERMINATED 5-11 RQS/MSS 3-29 Query UNTERMINATED after RS-232 4-39 indefinite response 5-11 QUEStionable 2-17 4-36 4-37 Save 2-10 4-54 Questionable Data Condition Status Save Command 4-54 Register 2-17 4-36 SCALar 4-12 4-13 4-14...
  • Page 181 4-23 STATus Subsystem 4-31 SELF 2-18 STATus subsystem commands 4-31 Self-Test 2-12 Self-Test Error Values 4-59 string Self-test failed 5-10 HP BASIC 3-54 Self-Test Query 2-11 4-59 parameters 3-54 self-test, internal 4-59 String data not allowed SENSe 2-15 4-22 4-25...
  • Page 182 Index SENSe 4-22 STATus 4-31 version, SCPI 4-42 OPERation VOLTage 2-14 CONDition? 4-32 voltage SYSTem 4-39 maximum 4-27 4-28 subsystem error minimum 4-27 4-28 SYSTem ERRor? 4-40 Wait-to-Continue 2-11 Suffix error Command 4-61 Suffix not allowed WINDow Suffix too long writing programs, general 3-52 Summary of the Measurement...
  • Page 183 Technical Support: If you need technical assistance with a Hewlett-Packard test and measurement product or application, please contact the Hewlett-Packard office or distributor in your country. Asia Pacific: Australia/New Zealand: Hungary Hewlett-Packard Australia Ltd. (1) 252 4705 31-41 Joseph Street Hong Kong Ireland Blackburn, Victoria 3130...
  • Page 185 Continued from front matter. . . Warranty (contd) HP will be liable for damage to Safety Considerations rating and type (for example, tangible property per incident (contd) normal blow, time delay). Do not HP does not warrant that the up to the greater of $300,000 or...
  • Page 186 Manual Part Number 53150-90002 Printed in U.S.A, NOVEMBER 1997...

This manual is also suitable for:

53152a series53151a series

Table of Contents