Download  Print this page

HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter.
Hide thumbs

Advertisement

HP 53131A/132A 225 MHz
Universal Counter
Programming
Guide

Advertisement

   Related Manuals for HP 53131A/132A 225 MHz

   Summary of Contents for HP 53131A/132A 225 MHz

  • Page 1 Programming Guide HP 53131A/132A 225 MHz Universal Counter...
  • Page 3: Programming Guide

    Programming Guide This guide describes how to program the HP 53131A/132A 225 MHz Universal Counter. The information in this guide applies to instruments having the number prefix listed below, unless accompanied by a “Manual Updating Changes” package indicating otherwise. SERIAL NUMBER PREFIX: 3546 to 3622 (HP 53131A)
  • Page 4 Copyright Hewlett-Packard Certification Safety Considerations Safety Considerations Company 1996 and Warranty (contd) General Certification All Rights Reserved. This product and related Reproduction, adaptation, or Hewlett-Packard Company documentation must be translations without prior certifies that this product met reviewed for familiarization Indicates earth (ground) written permission is its published specification at...
  • Page 5: Table Of Contents

    Keys to SCPI Command Map 2-6 MEASURE Keys to SCPI Command Map 2-8 Gate & ExtArm Key to SCPI Command Map 2-10 Gate & ExtArm Key to SCPI Command Map — For HP 53131A (and HP 53132A With S/N Prefix Below 3646) 2-13...
  • Page 6 Operation Introduction 3-2 Chapter Summary 3-2 Where to Find Some Specific Information 3-2 Where to Find HP BASIC Programming Examples 3-3 Where to Find QuickBASIC Programming Examples 3-3 Where to Find Turbo C Programming Examples 3-3 Configuring the HP-IB 3-4...
  • Page 7 How to Program the Counter for Status Reporting 3-38 Determining the Condition of the Counter 3-38 Resetting the Counter and Clearing the HP-IB Interface— Example 1 3-38 Using the Standard Event Status Register to Trap an Incorrect HP-IB command— Example 2 3-39 Programming Guide...
  • Page 8 Commands for Enabling and Disabling the Display 3-45 How to Program the Counter to Synchronize Measurements 3-46 Synchronizing Measurement Completion 3-46 Resetting the Counter and Clearing the HP-IB Interface 3-46 Using the *WAI Command 3-46 Using the *OPC? Command 3-47...
  • Page 9 (HP BASIC) 3-66 To Read and Store Calibration Information (HP BASIC) 3-68 To Perform a Time Interval Calibration (HP BASIC) 3-69 To Optimize Throughput (HP BASIC) 3-73 To Use Macros (HP BASIC) 3-75 To Make a Frequency Measurement (QuickBASIC) 3-77...
  • Page 10 Contents Command Reference Introduction 4-2 :ABORt Command 4-4 :CALCulate Subsystems 4-5 :CALCulate[1] Subsystem 4-7 :CALCulate[1]:MATH Subtree 4-9 :CALCulate2 Subsystem 4-11 :CALCulate2:LIMit Subtree 4-12 :CALCulate3 Subsystem 4-19 :CALCulate3:AVERage Subtree 4-19 :CALCulate3:LFILter Subtree 4-23 :CALibration Subsystem 4-26 :CALibration:SECurity Subtree 4-28 :CONFigure Subsystem 4-30 Device Clear 4-31 :DIAGnostic Subsystem 4-32 :DISPlay Subsystem 4-37...
  • Page 11 HP 53132A With S/N Prefix Below 3646) 4-95 [:SENSe]:TINTerval:ARM Subtree (HP 53131A and HP 53132A With S/N Prefix Below 3646) 4-95 [:SENSe]:TINTerval Subtree (HP 53132A With S/N Prefix 3646 and Above) 4-98 [:SENSe]:TINTerval:ARM:ESTART and :ESTOP Subtrees (HP 53132A With S/N Prefix 3646 and Above) 4-98...
  • Page 12 Contents *IDN? (Identification Query) 4-130 *LMC? (Learn Macro Query) 4-131 *OPC (Operation Complete Command) 4-132 *OPC? (Operation Complete Query) 4-133 *OPT? (Option Identification Query) 4-134 *PMC (Purge Macro Command) 4-135 *RCL <NRf> (Recall Command) 4-136 *RST (Reset Command) 4-137 *SAV <NRf> (Save Command) 4-138 *SRE <NRf>...
  • Page 13: Before You Start

    Before You Start ...
  • Page 14: Introduction

    SCPI standard. If you have programmed any HP instruments that have been released over the last few years, you will have seen a general trend toward the techniques specified in the SCPI standard.
  • Page 15: Differences Between Prior And Current Revisions Of The Hp 53131a/132a

    Firmware Revisions (3317, 3335, or 3402) ” to get an overview of the differences between the earlier firmware revisions and current firmware revision. If you have an HP 53132A with a serial number prefix below 3646, read the subsection titled “HP 53132A Time Interval Delay Arming ” on page 1-5.
  • Page 16 Chapter 1 Before You Start ... Differences Between Prior and Current Revisions of the HP 53131A/132A Measurements If your Counter contains other than the current firmware revision, the following measurement capabilities are different: Ratio channel selections Ratio 2 to 1 and Ratio 3 to 1 (for those counters equipped with Channel 3) are not available.
  • Page 17: Hp 53132a Time Interval Delay Arming

    50% level. HP 53132A Time Interval De lay Arming HP 53131A and HP 53132A Counters with a serial number prefix below 3646 are identical in their TI arming modes. Both only offer Time Interval Delay, where the STOP trigger of a time interval measurement can be delayed by a user -specified time.
  • Page 18: Getting Started

    FORTRAN before you can use the command set defined in this guide to control the Counter. (In Chapter 3, “Programming Your Universal Counter for Remote Operation,” there are programming examples provided in HP BASIC, Microsoft QuickBASIC, and Borland Turbo C.) However, whatever language you use, command strings that control the Counter remain the same.
  • Page 19: Learning To Program The Counter

    Command Maps” in Chapter 2. Read Chapter 3, “Programming Your Universal Counter for Remote Operation,” for an overview of the SCPI concepts as they relate to the HP 53131A/132A Universal Counter. Look at the flowcharts, which illustrate some of the decisions you must make when programming the Counter.
  • Page 20: Applications

    Chapter 1 Before You Start ... How to Use This Guide Review the remaining information in this guide to determine what is applicable to your programming requirements. If you need more information than is contained in this guide, see the section in this chapter titled “Related Documentation.”...
  • Page 21: Programming Guide Contents

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

    Additional information that you may find useful can be found in the following publications: 1. HP 53131A/132A Operating Guide (HP Part Number 53131-90043) 2. Beginner’ s Guide to SCPI (HP Part Number H2325-9000 2, July 1990 Edition). 3. Beginner’ s Guide to SCPI, Barry Eppler (Hewlett-Packard Press, Addison-Wesley Publishing Co.
  • Page 23 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. This manual is the best reference on I/O for HP BASIC programmers.
  • Page 24 Chapter 1 Before You Start ... Related Documentation 1-12 Programming Guide...
  • Page 25 Command Summary A Quick Reference...
  • Page 26: Command Summary Introduction

    1 The section titled “ Front Panel to SCPI Command Maps,” provides maps that show the front-panel keys and their corresponding (or related) SCPI commands. 2 The section titled “ HP 53131A/132A Command Summary,” lists the IEEE 488.2 Common and the SCPI Subsystem commands in tables 2-1 and 2-2, respectively.
  • Page 27: Front Panel To Scpi Command Maps

    (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” in Chapter 3 (page 3-61) of this guide for details on how to use double quotes or single quotes to enclose the string parameter of a command.
  • Page 28: Input Channels Conditioning Keys To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Input Channels Conditioning Keys to SCPI Command Map _____________________________ For TI 1 TO 2 (Time Interval measurements) only Channel 3 is optional. Figure 2-1. Input Channels Conditioning Keys to SCPI Command Map (Part 1 of 2) Programming Guide...
  • Page 29: Input Channels Conditioning Keys To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Input Channels Conditioning Keys to SCPI Command Map (Cont.) [:SENSe]:EVENt[1|2]:LEVel[:ABSolute]:AUTO ON|OFF b 1 . [:SENSe]:EVENt[1|2]:LEVel[:ABSolute] <numeric_value> [V] b 2 . [:SENSe]:EVENt[1|2]:LEVel:RELative <numeric_value> [PCT] [:SENSe]:EVENt[1|2]:SLOPe POSitive | NEGative d 1 . [:SENSe]:EVENt[1|2]:HYSTeresis:RELative 100 * d 2 .
  • Page 30: Instrument Control, Utility, Recall, And Save & Print Keys To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Instrument Control, Utility, Recall, and Save & Print Keys to SCPI Command Map Figure 2-2. Instrument Control, Utility, Recall, and Save & Print Keys to SCPI Command Map (Part 1 of 2) Programming Guide...
  • Page 31 Chapter 2 Command Summary Front Panel to SCPI Command Maps Instrument Control, Utility, Recall, and Save & Print Keys to SCPI Command Map (Cont .) *IDN? No command c 1 . [:SENSe]:ROSCillator:SOURce INTernal c 2 . [:SENSe]:ROSCillator:SOURce EXTernal c 3 . [:SENSe]:ROSCillator:SOURce:AUTO ON No command (see Calibration menu, Figure 2-6) No command No command...
  • Page 32: Measure Keys To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps MEASURE Keys to SCPI Command Map Figure 2-3. MEASURE Keys to SCPI Command Map (Part 1 of 2) Programming Guide...
  • Page 33 Chapter 2 Command Summary Front Panel to SCPI Command Maps MEASURE Keys to SCPI Command Map (Cont.) [:SENSe]:FUNCtion[:ON] “ [:][XNONe:]FREQuency [1 | 2 | 3] ” [:SENSe]:FUNCtion[:ON] “ [:][XNONe:]FREQuency:RATio [1,2 | 1,3 | 2,1 | 3,1] ” [:SENSe]:FUNCtion[:ON] “ [:][XNONe:]TOTalize [1] ” [:SENSe]:FUNCtion[:ON] “...
  • Page 34: Gate & Extarm Key To Scpi Command Map

    Time,+/-Width, Interval Dutycycle (HP 53131A/132A) (HP 53131A/132A) (HP 53131A/132A) (HP 53131A/132A) (HP 53131A and HP 53132As with S/N prefix below 3646 ) See page 2-14 for HP 53132A (with S/N prefix 3646 and above). Auto Arming: Auto Arming: Auto Arming:...
  • Page 35 Chapter 2 Command Summary Front Panel to SCPI Command Maps Gate & ExtArm Key to SCPI Command Map (Cont.) Freq, Period, Ratio Auto Arming: [:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate [:SENSe]:FREQuency:ARM:STOP:SOURce IMMediate Digits Arming: [:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate [:SENSe]:FREQuency:ARM:STOP:SOURce DIGits [:SENSe]:FREQuency:ARM:STOP:DIGits <numeric_value> Time Arming: [:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate [:SENSe]:FREQuency:ARM:STOP:SOURce TIMer [:SENSe]:FREQuency:ARM:STOP:TIMer <numeric_value>...
  • Page 36 Chapter 2 Command Summary Front Panel to SCPI Command Maps Gate & ExtArm Key to SCPI Command Map (Cont.) Totalize Auto Arming: [:SENSe]:TOTalize:ARM[:STARt]:SOURce IMMediate [:SENSe]:TOTalize:ARM:STOP:SOURce IMMediate Time Arming: b 1 . [:SENSe]:TOTalize:ARM[:STARt]:SOURce IMMediate b 2 . [:SENSe]:TOTalize:ARM:STOP:SOURce TIMer [:SENSe]:TOTalize:ARM:STOP:TIMer <numeric_value> [S] External Arming: [:SENSe]:TOTalize:ARM[:STARt]:SOURce EXTernal [:SENSe]:TOTalize:ARM[:STARt]:SLOPe POSitive | NEGative...
  • Page 37: Gate & Extarm Key To Scpi Command Map - For Hp 53131a (and Hp 53132a With S/n Prefix Below 3646)

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Gate & ExtArm Key to SCPI Command Map — For HP 53131A (and HP 53132A With S/N Prefix Below 3646) Time Interval (HP 53131A and HP 53132A With S/N Prefix Below 3646)
  • Page 38: Gate & Extarm Key To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Gate & ExtArm Key to SCPI Command Map (Cont.)— For HP 53132A (With S/N Prefix 3646 and Above) Time Interval (HP 53132A With S/N Prefix 3646 and Above ) Auto Arming: TSTART: AUTO b 1 .
  • Page 39: Gate & Extarm Key To Scpi Command Map

    Front Panel to SCPI Command Maps Gate & ExtArm Key to SCPI Command Map (Cont.) — For HP 53132A (With S/N Prefix 3646 and Above) Time Interval (HP 53131A and HP 53132A With S/N Prefix Below 3646) Auto Arming: [:SENSe]:TINTerval:ARM:ESTART:LAYer2:SOURce IMMediate [:SENSe]:TINTerval:ARM:ESTOP:LAYer2:SOURce IMMediate b 1 .
  • Page 40: Limits And Math Keys To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps LIMITS and MATH Keys to SCPI Command Map Figure 2-5. LIMITS and MATH Keys to SCPI Command Map (Part 1 of 2) 2-16 Programming Guide...
  • Page 41 Chapter 2 Command Summary Front Panel to SCPI Command Maps LIMITS and MATH Keys to SCPI Command Map (Cont.) :CALCulate2:LIMit:UPPer[:DATA] <numeric_value> [HZ | S | DEG] :CALCulate2:LIMit:LOWer[:DATA] <numeric_value> [HZ | S | DEG] :CALCulate2:LIMit:STATe OFF | ON b 1 . :INITiate:AUTO OFF b 2 .
  • Page 42: Calibration Menu To Scpi Command Map

    Chapter 2 Command Summary Front Panel to SCPI Command Maps Calibration Menu to SCPI Command Map Figure 2-6. Calibration Menu to SCPI Command Map (Part 1 of 2) 2-18 Programming Guide...
  • Page 43 Chapter 2 Command Summary Front Panel to SCPI Command Maps Calibration Menu to SCPI Command Map (Cont.) :CALibration:SECurity:STATe? :DIAGnostic:CALibration:INPut1:OFFSet:AUTO ONCE :DIAGnostic:CALibration:INPut2:OFFSet:AUTO ONCE :DIAGnostic:CALibration:INPut1:GAIN:AUTO ONCE :DIAGnostic:CALibration:INPut2:GAIN:AUTO ONCE :DIAGnostic:CALibration:TINTerval:QUICk :DIAGnostic:CALibration:TINTerval:FINE[1 | 2 | 3 | 4] :DIAGnostic:CALibration:ROSCillator:AUTO ONCE c 1 . :CALibration:SECurity:CODE <new_code> :CALibration:SECurity:STATe ON, <present_code>...
  • Page 44: Hp 53131a/132a Command Summary

    SCPI commands. SCPI Conformance Information The SCPI commands used in the HP 53131A/132A are in conformance with the SCPI Standard Version 1992.0. The SCPI command set consists of the following: Common commands as defined in IEEE 488.2-1987— listed and summarized in Table 2-1.
  • Page 45: Ieee 488.2 Common Commands

    Chapter 2 Command Summary Front Panel to SCPI Command Maps IEEE 488.2 Common Commands The Common Commands are general purpose commands that are common to all instruments (as defined in IEEE 488.2). Common Commands are easy to recognize because they all begin with an “*” (for example, *RST, *IDN?, *OPC ). These commands are generally not related to measurement configuration.
  • Page 46 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-1. IEEE 488.2 Common Commands Mnemonic Command Name Function *CAL? Calibration Causes the Counter to perform an internal interpolator self- calibration and returns a response that indicates whether or not the instrument completed the self-calibration without error.
  • Page 47 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-1. IEEE 488.2 Common Commands (Continued) Mnemonic Command Name Function *OPT? Option Identification Query Identifies the options installed in the Counter. *PMC Purge Macro Command Deletes all macros previously defined using the *DMC command.
  • Page 48: Hp 53131a/132a 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 49 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary Keyword/Syntax Parameter Form Std/ Comments :ABORt Event; no query. Aborts measurement in progress. :CALCulate[1] Subsystem. Performs post-acquisition math processing (scale and offset) and data transfer on the data acquired by a SENSe function.
  • Page 50 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments :CALCulate2 (Cont.) :LIMit (Cont.) Subtree. An abbreviation for Fail COunt. :FCOunt :LOWer? Query only. Returns the number of limit test failures at the lower limit.
  • Page 51 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments :CALCulate3 (Cont.) Subtree. Limit FILter for statistics. :LFILter Subtree. :LOWer [:DATA] <numeric_value> [HZ | S | Sets the statistics filter lower limit.
  • Page 52 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments :DIAGnostic (Cont.) :CALibration (Cont.) :ROSCillator Subtree. ROSCillator is an abbreviation for Reference OSCillator. ONCE | OFF ONCE calibrates the timebase. This command is...
  • Page 53 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments Subsystem. Controls the initiation of measurements. :INITiate <Boolean> AUTO ON enables the Counter to automatically stop :AUTO measuring on a limit test failure.
  • Page 54 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments Measurement Instructions See <parameters> and Configures instrument to perform :CONFigure[:SCALar]:<function> <source_list> in table specified measurement. on the next page.
  • Page 55 (e.g., time interval, phase, and frequency ratio) would use (@1), (@2) to specify a measurement between channel 1 and channel 2. For HP 53131A firmware revision s below 3335, only Ratio 1 to 2 and Ratio 1 to 3 were offered . **** This <function>...
  • Page 56 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments Subsystem. Manages instrument :MEMory memory. Subtree. :DELete <string> Event; no query. Deletes the macro with :MACRo the name specified by the string parameter.
  • Page 57 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments [:SENSe] (Cont.) Subtree. Queries the characteristics of the “ trigger :EVENt3 event” for channel 3 input. :LEVel Subtree.
  • Page 58 Query only. Returns the frequency value of the external reference oscillator. ______________________________ For HP 53131A firmware revision s below 3335, only Ratio 1 to 2 and Ratio 1 to 3 were offered. 2-34 Programming Guide...
  • Page 59 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments [:SENSe] (Cont.) :ROSCillator (Cont.) INTernal | EXTernal Sets the selection of a reference timebase. :SOURce :AUTO <Boolean>...
  • Page 60 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments [:SENSe] (Cont.) :TOTalize (Cont.) :ARM (Cont.) :STOP Subtree. POSitive | NEGative Sets the slope of the external stop arm signal used :SLOPe in external arming totalize measurements.
  • Page 61 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2. HP 53131A/132A SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments Subsystem. Collects the functions that are not :SYSTem related to instrument performance. Subtree. Collects together configuration of :COMMunicate control/communication interfaces.
  • Page 62 Chapter 2 Command Summary HP 53131A/132A Command Summary Table 2-2A. HP 53132A (S/N Prefix 3646 and Above) Time Interval Arming SCPI Command Summary Keyword/Syntax Parameter Form Std/ Comments [:SENSe] (Cont.) Subtree. Controls the time interval (including :TINTerval Time Interval, Rise Time, Fall Time, Dutycycle, and Pulse Width functions) measuring capabilities of the instrument.
  • Page 63 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-2A. HP 53132A (S/N Prefix 3646 and Above) Time Interval Arming SCPI Command Summary (Continued) Keyword/Syntax Parameter Form Std/ Comments [:SENSe] (Cont.) :TINTerval (Cont.) :ARM (Cont.) :ESTOP (Cont.) [:LAYer[1]]...
  • Page 64: Rst Response

    SCPI error queue.) The states of commands affected by the *RST command are described in Table 2- 3. Since the HP 53131A and HP 53132A have different arming capabilities for Time Interval measurements , sub-tables (Table 2-3A and Table 2-3B) are provided.
  • Page 65 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-3. HP 53131A/132A *RST State (Continued) Command Header Parameter State <NRf> 0 (i.e., disabled) :FORMat[:DATA] ASCii | REAL ASCii :HCOPy:CONTinuous <Boolean> :INITiate:AUTO <Boolean> :INITiate:CONTinuous <Boolean> :INPut[1|2]:ATTenuation 1 | 10...
  • Page 66 Chapter 2 Command Summary *RST Response Table 2-3A. HP 53131A (and HP 53132A With S/N Prefix Below 3646)Time Interval *RST State Command Header Parameter State [:SENSe]:TINTerval:ARM[:STARt]:SLOPe POSitive | NEGative POSitive [:SENSe]:TINTerval:ARM[:STARt]:SOURce IMMediate | EXTernal IMMediate [:SENSe]:TINTerval:ARM:STOP:SOURce IMMediate | TIMer IMMediate [:SENSe]:TINTerval:ARM:STOP:TIMer <numeric_value>...
  • Page 67 Chapter 2 Command Summary Front Panel to SCPI Command Maps Table 2-4. Unaffected by *RST Item OPC? :CALibration:COUNt? :CALibration:DATA :CALibration:SECurity:CODE :CALibration:SECurity:STATe :DISPlay[:WINDow]:TEXT:RADix :STATus:OPERation:ENABle :STATus:OPERation:NTRansition :STATus:OPERation:PTRansition :STATus:QUEStionable:ENABle :STATus:QUEStionable:NTRansition :STATus:QUEStionable:PTRansition :SYSTem:COMMunicate:SERial:CONTrol:DTR :SYSTem:COMMunicate:SERial:TRANsmit:BAUD :SYSTem:COMMunicate:SERial:TRANsmit:PACE :SYSTem:COMMunicate:SERial:TRANsmit:PARity[:TYPE] :SYSTem:ERRor? (Error Queue) HP-IB Address Programming Guide 2-43...
  • Page 68 Chapter 2 Command Summary *RST Response 2-44 Programming Guide...
  • Page 69: Programming Your Universal Counter For Remote Operation

    Programming Your Universal Counter for Remote Operation...
  • Page 70: Introduction

    3-52 Writing SCPI Programs pg. 3-55 Programming Examples pg. 3-58 Where to Find Some Specific Information To Set the HP-IB Mode and Address pg. 3-4 To Connect the Counter to a Computer pg. 3-6 Remote/Local Operation pg. 3-6 Common Command Format pg.
  • Page 71: Where To Find Hp Basic Programming Examples

    Command Terminator pg. 3-13 Program Messages pg. 3-14 Response Messages, Response Message Syntax pg. 3-16 Where to Find HP BASIC Programming Examples Easiest Way to Make a Measurement pg. 3-59 To Make a Frequency Measurement pg. 3-62 To Perform Limit Testing pg.
  • Page 72: Configuring The Hp-ib

    To select the talk/listen operating mode, set the Counter ’ s HP-IB address from 0 to 30. Refer to the following section titled “To Set the HP-IB Mode and Address” for instructions on how to set an HP-IB address from the front- panel.
  • Page 73 Press d key twice or until 15 is displayed. HP-IB: 15 is displayed. e. Go on to step 4. 3b To set the HP-IB mode to “TALK,” perform the following: a. Press s key. HP-IB: 03 is displayed. Note that “0” digit appears and is highlighted,...
  • Page 74: To Connect The Counter To A Computer

    Configuring the HP-IB To Connect the Counter to a Computer Connect the Counter to a computer by simply installing an HP-IB cable (such as an HP 10833A cable) between the two units as shown in Figure 3-1. Figure 3-1. HP-IB Interconnection Remote/Local Operation At power-up, the Counter is under front-panel (local) control.
  • Page 75: Overview Of Command Types And Formats

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Overview of Command Types and Formats There are two types of HP 53131A/132A programming commands: IEEE 488.2 Common Commands and Standard Commands for Programmable Instruments (SCPI). The IEEE 488.2 Common Commands control and manage communications between the HP 53131A/132A and the controller or personal computer.
  • Page 76: Elements Of Scpi Commands

    (or keywords with colon separators), program data, and terminators . These elements are sent to the Counter over the HP-IB as a sequence of ASCII data messages. Examples of a typical Common Command and Subsystem Command are: OUTPUT 712;"*CLS"...
  • Page 77: Abbreviated Commands

    The command syntax shows most keywords as a mixture of upper and lower case letters. Upper case letters indicate the abbreviated spelling for the command. For better program readability, you may send the entire keyword. The HP 53131A/132A accepts either command form and is not case sensitive.
  • Page 78: Implied Channel (optional Numeric Keyword Suffix)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Examine the portion of the [:SENSe] subsystem shown below: [:SENSe] :FREQuency :ARM :STOP :SOURce EXTernal The root-level keyword [:SENSe] is an optional keyword. To set the Counter ’ s frequency stop arm to external, you can use either of the following: :SENS:FREQ:ARM:STOP:SOUR EXT :FREQ:ARM:STOP:SOUR EXT...
  • Page 79: Parameter Types

    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 program statement sends a command containing a <string> parameter: OUTPUT 703;"FUNC ‘FREQ’"...
  • Page 80: Parameter Separator

    Chapter 3 Programming Your Universal 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 <numeric value> parameters can be queried to return the minimum or maximum values they are capable of being set to by sending a MINimum or MAXimum parameter after the “?.”...
  • Page 81: Suffix Multipliers

    Chapter 3 Programming Your Universal 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 1E18 1E15 PETA 1E12...
  • Page 82: 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 as a sequence of ASCII data messages.
  • Page 83 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands For example, sending :INP:COUP AC;IMP 50 is equivalent to sending: :INP:COUP AC :INP:IMP 50 :INP:COUP AC;:INP:IMP 50 The “:” must be present to distinguish another root level command. For example: :INP:COUP AC;:INIT:CONT OFF is equivalent to sending: :INP:COUP AC...
  • Page 84: Overview Of Response Message Formats

    The output message remains in the qu eue until it is read or another command is issued. When read, the message is transmitted across the HP-IB to the computer. You read the message by using some type of enter statement that includes the device address and an appropriate variable.
  • Page 85: Response Message Data Types

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Response Message Data Types Table 3-3 contains explanations of response data types. Table 3-3. Response Message Data Types Type Description <NR1> This numeric representation has an implicit radix point. The maximum number of characters in <NR1>...
  • Page 86 Chapter 3 Programming Your Universal Counter for Remote Operation Overview of Response Message Formats Table 3-3. Response Message Data Types (Continued) Type Description <Boolean> A single ASCII-encoded byte, 0 or 1, is returned for the query of settings that use <Boolean>...
  • Page 87: Status Reporting

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Status Reporting The HP 53131A/132A status registers conform to the SCPI and IEEE 488.2 standards. Figure 3-6 shows all the status system register groups and queues in the Counter.
  • Page 88 Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Figure 3-6. HP 53131A/132A SCPI Status Reporting Summary Functional Diagram 3-20 Programming Guide...
  • Page 89: Status Byte Register And Service Request Enable Register

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Status Byte Register and Service Request Enable Register Figure 3-7. Status Byte and Service Request Enable Status Byte Register The Status Byte Register is the summary-level register in the status reporting structure.
  • Page 90 Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Table 3-4. Status Byte Register WEIGH SYMBOL DESCRIPTION Not used Not used Not used 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 Operation Status Register Summary Bit...
  • Page 91: Service Request Enable Register

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands 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 92: Standard Event Status Register Group

    Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Standard Event Status Register Group Figure 3-8. Standard Event Status Reporting Standard Event Status Register The Standard Event Status Register contains bits that monitor specific IEEE 488.2-defined events as shown in Figure 3-8. Use *ESR? to read this register.
  • Page 93 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands A detailed description of each bit in the Standard Event Status Register follows: Bit 0 (Operation Complete) is an event bit which is generated in response to the *OPC command. This bit indicates that the Counter has completed all pending operations.
  • Page 94: Standard Event Status Enable Register

    Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Bit 3 (Device-Specific Error) is an event bit which indicates an operation did not properly complete due to some condition of the Counter. Errors -300 through -399 and all those with positive error numbers (+2000 through ...) are device-specific errors.
  • Page 95: Operation Status Register Group And Questionable Data/signal Status Register Group

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Operation Status Register Group and Questionable Data/Signal Status Register Group The Operation Status Register Group and the Questionable Data/Signal Status Register Group each have a complete set of registers that consists of the following: a condition register a positive transition filter register a negative transition filter register...
  • Page 96: Condition Register

    Chapter 3 Programming Your Universal 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.
  • Page 97: Event Register

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Transition filters are unaffected by *CLS or queries. Transition filters are set to default values by :STATus:PRESet and power-on. To write to the transitions filter registers use: :STATus:OPERation:PTRansition :STATus:OPERation:NTRansition :STATus:QUEStionable:PTRansition...
  • Page 98: Operation Status Register Group

    A detailed description of each bit in the Operation Status Register follows: Bit 0 (Calibrating) is a condition bit which indicates the Counter is currently performing a (front-panel invoked or HP-IB invoked) calibration. The condition bit is TRUE (one) during a calibration and FALSE (zero) otherwise.
  • Page 99 This bit monitors both explicit and automatic reference changes. Explicit reference changes occur when you select internal or external using the front-panel Utility menu or the HP-IB command, [:SENS]:ROSC:SOUR. Automatic reference changes occur when the Counter is configured to select the reference (automatically) by detecting whether or not an external reference is being supplied.
  • Page 100: Questionable Data/signal Status Register Group

    Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Note that this is the only bit in the Operation Status Register which is not representing a condition. Therefore, the transition filters have no effect on this bit. The Counter does not monitor the condition indicating whether the last measurement was in or out of limit.
  • Page 101 Bit 7 is not used. Bit 8 (Calibration Error) is an event bit which indicates that one of the following has occurred: 1) an HP-IB invoked calibration failed, 2) a front- panel invoked calibration failed, 3) an automatic interpolator calibration failed during the measurement cycle, or 4) an automatic measurement calibration failed during the measurement cycle.
  • Page 102 Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting Bit 10 (Out of Limit Event) is an event bit indicating the last measurement limit tested was “out of limit.” Each and every time a measurement is limit tested and found to be out of limit, this event will be reported.
  • Page 103: Command Settings For Optimizing Throughput

    Set gate/arm to auto for appropriate measurement: For Frequency, Period, and Ratio— [:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate [:SENSe]:FREQuency:ARM:STOP:SOURce IMMediate For Phase— [:SENSe]:PHASe:ARM[:STARt]:SOURce IMMediate For Time Interval (HP 53131A Only) — [:SENSe]:TINTerval:ARM[:STARt]:SOURce IMMediate [:SENSe]:TINTerval:ARM:STOP:SOURce IMMediate For Time Interval (HP 5313 2A Only)— [:SENSe]:TINTerval:ARM: ESTART:LAYer2:SOURce IMMediate [:SENSe]:TINTerval:ARM :ESTART[:LAYer[1]]: SOURce IMMediate...
  • Page 104: Typical Optimizing Throughput Results For Different Computers

    Chapter 3 Programming Your Universal Counter for Remote Operation Command Settings for Optimizing Throughput Set reference oscillator to non-auto state (internal or external): [:SENSe]:ROSCillator:SOURce INTernal | EXTernal (See Note below.) Disable checking of external source if using external reference oscillator: [:SENSe]:ROSCillator:EXTernal:CHECk OFF (See Note below.) Disable automatic interpolator calibration:...
  • Page 105 Table 3-9. Typical Optimizing Throughput Results in Measurements per Second IBM PC Compatible HP 82324A HP 9000 Series 300 486/25 MHz Basic Language Model 360 Function...
  • Page 106: How To Program The Counter For Status Reporting

    The first three groups all have event registers that can be fed into the Status Byte Register. The Status Byte Register can be used to assert the SRQ line of the HP- IB and thus alert the computer that the Counter needs attention. The following examples show how each of the register groups can be used.
  • Page 107: Using The Standard Event Status Register To Trap An Incorrect Hp-ib Command- Example

    Disabled— Example 3 The default operation of the Counter is for automatic interpolator calibration to occur before every measurement. To optimize throughput over the HP-IB, the automatic calibration can be disabled. When it is disabled, the most recent calibration values are used. These values may not be the optimal values for a particular temperature or other environmental condition.
  • Page 108: Questionable Data Status Register

    Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Status Reporting Questionable Data Status Register :STAT:QUES:PTR 100; NTR 0 Detect transition from non-questionable to questionable data. :STAT:QUES:ENABLE 100 Enable to detect for auto cal off. *SRE 8 Assert SRQ on Questionable Summary bit.
  • Page 109 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Figure 3-10. Status Reporting Flowchart (1 of 2) Programming Guide 3-41...
  • Page 110 Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Status Reporting Figure 3-10. Status Reporting Flowchart (2 of 2) 3-42 Programming Guide...
  • Page 111: How To Program The Counter To Display Results

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands How to Program the Counter to Display Results Configuring the Counter ’ s Display The Counter has five different display modes: 1. Non-scaled/offset results — frequency, period, time interval, etc. This display mode is used on power-up.
  • Page 112: Commands For Displaying Scaled/offset Results

    Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter to Display Results Commands for Displaying Scaled/Offset Results The following lines will enable Math (scale/offset). It is assumed that the values for scale and offset are already set. If not, the default value for scale is 1 and for offset is 0.
  • Page 113: Commands For Enabling And Disabling The Display

    Elements of SCPI Commands Commands for Enabling and Disabling the Display The Counter display can be turned on or off. The normal condition is for the display to be on. To achieve maximum HP-IB throughput, the display must be disabled. :DISP:ENABLE OFF Disable the display, all segments off.
  • Page 114: How To Program The Counter To Synchronize Measurements

    3. Using the *OPC command to assert SRQ The following discussion shows how to use all three methods. Resetting the Counter and Clearing the HP-IB Interface Before attempting any programming, it is a good idea to set the Counter to a known state.
  • Page 115: Using The *opc? Command

    :CALC3:AVERAGE:ALL? Ask for statistics. Using the *OPC Command to Assert SRQ This method is recommended when the Counter is on the HP-IB with many other instruments, any of which can assert SRQ. The commands *OPC, *ESE 1 and Programming Guide...
  • Page 116 Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter to Synchronize Measurements *SRE 32 are used to assert the SRQ line to alert the computer that the Counter has completed a measurement. It is up to the computer to use the serial poll command to determine which of the instruments on the bus requested service.
  • Page 117: How To Program The Counter For Math/limit Operations

    How to Program the Counter for Math/Limit Operations Updating Math and Limit Results Over HP-IB When using the Limits or Math capabilities from the front panel, the default (power-up) operation is for results to be automatically updated whenever a value is updated in either the Limit or Scale&Offset menu.
  • Page 118: Using The Scale And Offset Over Hp-ib

    The section in this chapter titled “How to Program the Counter to Display Results” uses the :CALC:IMM technique to make sure the results are properly displayed. Using the Scale and Offset Over HP-IB Using the scale and offset values over the bus is different from setting any other value.
  • Page 119 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands If you need to query the scale and offset values, you need to know if you are in ASCII or REAL data format. The values returned from the following query will be sent using the format that is currently defined (:FORMat[:DATA]) in the box.
  • Page 120: How To Program The Counter To Define Macros

    Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter to Define Macros How to Program the Counter to Define Macros A macro is a user defined command that can be used to replace one or many Counter commands.
  • Page 121 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands A macro also lets you send variable parameters along with the name. For example, you could have a macro that sets up a measurement channel. One of the variables may be the input impedance, either 50 Ohms or 1 Megaohm.
  • Page 122 HP BASIC for an HP 9000 series 300 computer. The second Macro program listing (starting on page 3-88) is for an IBM PC (or clone) and HP 82335A/B card. Both are softkey driven and can be used to define macros, enable or disable macros, determine what macros are available and purge macros.
  • Page 123: Writing Scpi Programs

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Writing SCPI Programs Figure 3-11 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 124 Chapter 3 Programming Your Universal Counter for Remote Operation Writing SCPI Programs Figure 3-11. SCPI Programming Flowchart (Sheet 1 of 2) 3-56 Programming Guide...
  • Page 125 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Figure 3-11. SCPI Programming Flowchart (Sheet 2 of 2) Programming Guide 3-57...
  • Page 126: Programming Examples

    Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples Programming Examples In this section, you will see how to program the HP 53131A/132A to make many common measurements. Examples are provided in the following programming languages: HP BASIC Microsoft QuickBASIC (version 4.5)*...
  • Page 127: Using Quickbasic

    5. To Use Limits to Filter Data Before Measuring Statistics. 6. To Read and Store Calibration Data— this program is useful if you plan to calibrate your HP 53131A/132A and want to be able to return to the original calibration at a later date.
  • Page 128: Easiest Way To Make A Measurement (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples Easiest Way to Make a Measurement (HP BASIC) 10 ! This program shows how to use the MEASure group of instructions to 20 ! quickly and easily make any of the counter's measurements.
  • Page 129 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Easiest Way to Make a Measurement (HP BASIC) (Continued) 540 ! The following commands will measure the frequency on channel 1. 550 ! The MEAS? query can be broken down into CONF and READ? commands.
  • Page 130: To Make A Frequency Measurement (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Make a Frequency Measurement (HP BASIC) 10 ! This program sets up the counter to make 10 frequency 20 ! measurements on channel 1, using a 0.1 second gate time.
  • Page 131: To Perform Limit Testing (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Perform Limit Testing (HP BASIC) 10 ! This program sets up the counter to make period measurements 20 ! indefinitely until an out of limits measurement occurs.
  • Page 132: To Measure The Statistics Of 50 Measurements (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Measure the Statistics of 50 Measurements (HP BASIC) ! This program instructs the counter to take 50 period measurements. ! The counter is put into SINGLE measurement mode. The number of ! measurements to take is programmed using ":CALC3:AVER:COUNT 50"...
  • Page 133 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Measure the Statistics of 50 Measurements (HP BASIC) (Continued) OUTPUT @Count;":INIT;*OPC" ! Enable OPC bit and starts measurement 530 Loop_here:GOTO Loop_here ! Wait here until measurement complete.
  • Page 134: To Use Limits To Filter Data Before Measuring Stats (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Use Limits to Filter Data Before Measuring Stats (HP BASIC) ! This program instructs the counter to determine the statistics of ! 50 Period measurements that are within the limits defined by the ! variables "Upper"...
  • Page 135 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Use Limits to Filter Data Before Measuring Stats (HP BASIC) (Continued) OUTPUT @Count;":CALC3:LFIL:STATE ON" ! Enable statistics filter OUTPUT @Count;":CALC3:LFIL:LOWER ";Lower ! Set the lower limit OUTPUT @Count;":CALC3:LFIL:UPPER ";Upper...
  • Page 136: To Read And Store Calibration Information (hp Basic)

    ! Array to hold calibration data DIM Err_string$[255] ! Array to hold error message CLEAR SCREEN ASSIGN @Count TO 703 ! Assign I/O path for HP 53131A CLEAR @Count OUTPUT @Count;"*RST" ! Reset the HP 53131A OUTPUT @Count;"*CLS" ! Clear event registers and error queue OUTPUT @Count;"*SRE 0"...
  • Page 137: To Perform A Time Interval Calibration (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Perform a Time Interval Calibration (HP BASIC) Early versions of the Counter cannot execute this program since they do not NOTE support calibration security or “fine” time interval calibration.
  • Page 138 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Perform a Time Interval Calibration (HP BASIC) (Continued) CLEAR @Count OUTPUT @Count;"*RST" ! Reset the HP 53131A OUTPUT @Count;"*CLS" ! Clear event registers and error queue OUTPUT @Count;"*SRE 0"...
  • Page 139 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Perform a Time Interval Calibration (HP BASIC) (Continued) 910 Cal_quick: ! Calibrates using the QUICK TI calibration. PRINT "Connect square wave signal to Channel 1" GOSUB Wait_for_input PRINT "Recalibrating"...
  • Page 140 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Perform a Time Interval Calibration (HP BASIC) (Continued) 1400 Restore_cal:! Restores the calibration data previously saved. 1410 IF Status=0 THEN 1420 INPUT "Calibration successful, restore backup anyway?",Answer$ 1430...
  • Page 141: To Optimize Throughput (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Optimize Throughput (HP BASIC) ! This program shows how to set up the counter to transfer data at the ! fastest possible rate. Note that the arming mode is AUTO. This mode ! provides the least resolution of all arming modes.
  • Page 142 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Optimize Throughput (HP BASIC) (Continued) OUTPUT @Count;":INIT:CONT ON" ! Put counter in Run mode OUTPUT @Count;"FETCH:FREQ?" ! Fetch the frequency to be used ENTER @Count USING "#,K";Dummy$ ! for the expected frequency.
  • Page 143: To Use Macros (hp Basic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Use Macros (HP BASIC) USER 1 KEYS ON KEY 1 LABEL " Macro Free ",1 CALL Macro_free ON KEY 2 LABEL " Enable Macros",1 CALL Macro_enable ON KEY 3 LABEL "...
  • Page 144 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Use Macros (HP BASIC) (Continued) SUB Define_macro ! Define a macro for the counter DIM Name$[25],Macro$[200],Send$[255],Header$[2] CLEAR SCREEN LINPUT "Enter the name of the macro",Name$ LINPUT "Enter the counter commands",Macro$...
  • Page 145: To Make A Frequency Measurement (quickbasic)

    'Data is sent in ASCII format to preseve resolution. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS' 'Required by HP 82335A DIM SHARED source AS LONG 'Address and select code DIM i AS INTEGER...
  • Page 146: To Perform Limit Testing (quickbasic)

    'The out of limit period is sent in ASCII format to preserve resolution. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS' 'Required by HP 82335A DIM SHARED source AS LONG 'Address and select code DIM period AS STRING * 23...
  • Page 147 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Perform Limit Testing (QuickBASIC) (Continued) ON PEN GOSUB limitfail 'When SRQ happens, go get out of PEN ON 'limit result CALL IOPEN(isc&, priority%) CALL sendhp(":INIT:CONT ON") 'Set counter to run PRINT "Making Period measurements"...
  • Page 148: To Measure The Statistics Of 50 Measurements (quickbasic)

    'Note that the *OPC command must be sent at the start of every measurement. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS' 'Required by HP 82335A DIM SHARED source AS LONG 'Address and select code DIM samples AS INTEGER...
  • Page 149 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Measure the Statistics of 50 Measurements (QuickBASIC) (Continued) CALL sendhp(":FUNC " + CHR$(34) + "PER 1" + CHR$(34)) 'Measure Period 'The function must be a quoted string. The actual string sent to the 'counter is "PER 1"...
  • Page 150 'filters, an SRQ can be generated when statistics are complete. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS' 'Required by HP 82335A DIM SHARED source AS LONG 'Address and select code DIM status AS INTEGER...
  • Page 151: To Use Limits To Filter Data Before Measuring Stats (quickbasic)

    Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Use Limits to Filter Data Before Measuring Stats (QuickBASIC) (Continued) CALL sendhp(":FREQ:ARM:STAR:SOUR IMM") 'These 3 lines enable time CALL sendhp(":FREQ:ARM:STOP:SOUR TIM") 'arming with a 0.01 second CALL sendhp(":FREQ:ARM:STOP:TIM .01") 'gate time.
  • Page 152 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Use Limits to Filter Data Before Measuring Stats (QuickBASIC) (Continued) PRINT "Status byte = ", statusbyte CALL sendhp(":CALC3:AVERAGE:TYPE MIN;:CALC3:DATA?") 'Ask for all the stats CALL IOENTERS(source&, minimum, maxelem%, actual%) CALL sendhp(":CALC3:AVERAGE:TYPE MAX;:CALC3:DATA?") CALL IOENTERS(source&, maximum, maxelem%, actual%) CALL sendhp(":CALC3:AVERAGE:TYPE MEAN;:CALC3:DATA?")
  • Page 153: To Read And Store Calibration Data (quickbasic)

    'the counter. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS' 'Required by HP 82335A DIM SHARED source AS LONG 'Address and select code DIM CALDATA AS STRING * 61 'Strings to be read source&...
  • Page 154: To Optimize Throughput (quickbasic)

    'quickly, but at the least resolution the counter can provide. 'See the program comments for details. 'Requires an HP 82335A/B HPIB interface card to a PC. 'The data is sent in ASCII format to preserve resolution. 'The SUB sendhp sends commands to the counter DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS'...
  • Page 155 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Optimize Throughput (QuickBASIC) (Continued) 'The following lines will provide the fastest throughput, regardless of 'the state of the counter before these lines are executed. CALL sendhp(":FREQ:ARM:STAR:SOUR IMM") 'These 3 lines enable using CALL sendhp(":FREQ:ARM:STOP:SOUR IMM") 'time arming with a 0.1 second...
  • Page 156: To Use Macros (quickbasic)

    'This program is useful for writing macros for the counter. Softkeys 'are available at the bottom of the computer screen to help determine 'the status of the macros. 'The SUB sendhp sends commands to the HP 53131A DECLARE SUB sendhp (code$) REM $INCLUDE: 'QBSETUP.BAS'...
  • Page 157 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Use Macros (QuickBASIC) (Continued) ON KEY(1) GOSUB availablememory ON KEY(2) GOSUB enablemacro ON KEY(3) GOSUB displaymacro ON KEY(4) GOSUB querymacro ON KEY(5) GOSUB definemacro ON KEY(6) GOSUB deletemacro ON KEY(7) GOSUB purgemacro ON KEY(8) GOSUB disablemacro ON KEY(9) GOSUB sendmacro...
  • Page 158 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Use Macros (QuickBASIC) (Continued) purgemacro: 'Purge all macros INPUT "Are you sure you want to purge all macros? ", answer$ answer$ = UCASE$(answer$) IF answer$ = "Y" THEN sendhp ("*PMC") PRINT "All macros purged"...
  • Page 159: To Make A Frequency Measurement (turbo C)

    #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 160 /* the linefeed can be removed */ printf ("Frequency %d = %s Hz\n",i,freq); printf("Press a key to continue\n"); getch(); /* Function to send command to HP 53131A */ void sendhp(hpib_cmd) char *hpib_cmd; char hpcmd[80]; /* Variables used by function */ int length;...
  • Page 161: To Use Limits To Filter Data Before Measuring Statistics (turbo C)

    *); /* 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 condition=1;...
  • Page 162 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Use Limits to Filter Data Before Measuring Statistics (Turbo C) (Continued) IOEOI(isc,state); /* Enable use of EOI */ sendhp(":FUNC 'FREQ 1'"); /* Make a frequency measurement */ sendhp(":FREQ:ARM:STAR:SOUR IMM"); /* These 3 lines enable */ sendhp(":FREQ:ARM:STOP:SOUR TIM");...
  • Page 163 = %s",minimum); printf("Maximum frequency = %s",maximum); printf("Standard deviation = %s",sdev); printf("Press a key to continue\n"); getch(); /* Function to send command to HP 53131A */ void sendhp(hpib_cmd) char *hpib_cmd; char hpcmd[80]; /* Variables used by function */ int length; strcpy(hpcmd,hpib_cmd);...
  • Page 164: To Optimize Throughput (turbo C)

    /* HP-IB library function prototypes */ 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;...
  • Page 165 Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands To Optimize Throughput (Turbo C) (Continued) sendhp(":ROSC:SOURCE INT"); /* Use internal oscillator. If you want to use an external timebase, you must select it and turn off the automatic detection using: :ROSC:EXT:CHECK OFF */ sendhp(":DIAG:CAL:INT:AUTO OFF");...
  • Page 166 Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples To Optimize Throughput (Turbo C) (Continued) /* Function to send command to HP 53131A */ void sendhp(hpib_cmd) char *hpib_cmd; char hpcmd[80]; /* Variables used by function */ int length;...
  • Page 167: Command Reference

    Command Reference A Dictionary...
  • Page 168: Introduction

    This chapter describes the SCPI Subsystem commands and the IEEE 488.2 Common commands for the HP 53131A/132A 225 MHz Universal Counter. The information in this chapter will help you program the Counter over the HP-IB. The commands are presented in alphabetical order.
  • Page 169 (not overlapped). See Chapter 3 in this guide for details regarding command syntax, parameter types, and query response types. See the HP 531331A/132A Operating Guide, Table 2-6, for power-up values. Introduction Programming Guide...
  • Page 170: Abort Command

    Chapter 4 Command Reference :ABORt Command :ABORt Command :ABORt This command is an event that 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 171: Calculate Subsystems

    Chapter 4 Command Reference Introduction :CALCulate Subsystems Three :CALCulate subsystems (:CALCulate[1], :CALCulate2, and :CALCulate3) perform post-acquisition data processing and data transfer of the corresponding results. Functions in the SENSe subsystem are related to data acquisition, while the :CALCulate systems operate on the data acquired by a SENSe function as shown in Figure 4-1.
  • Page 172 Chapter 4 Command Reference :CALCulate Subsystems Figure 4-1. The CALCulate Subsystems Programming Guide...
  • Page 173: Calculate[1] Subsystem

    Chapter 4 Command Reference Introduction :CALCulate[1] Subsystem Performs post-acquisition math (scale/offset) processing (on the data acquired by a SENSe function) and data transfer of the scaled/offset result. See the :TRACe subsystem for commands used to set the scale and offset. Not until :CALCulate[1]:MATH:STATe is set to ON will any of the NOTE :CALCulate[1] settings or :TRACe[:DATA] settings be used.
  • Page 174 Chapter 4 Command Reference :CALCulate[1] Subsystem :CALCulate[1]:FEED “[:]SENSe[1]” Sets or queries the data flow to be fed into the CALCulate[1] block. Since the Counter can only sense one function at a time, there is only one valid parameter. Query Response The string “SENS”...
  • Page 175: Calculate[1]:math Subtree

    Chapter 4 Command Reference Introduction :CALCulate[1]:IMMediate:AUTO <Boolean> Sets or queries whether post-processing (recalculation) will automatically occur whenever any changes are made to the :CALCulate[1|2] subsystems. With :CALC:IMM:AUTO set to OFF, :CALCulate[1|2] only produces new results when new SENSe data is acquired or when the :CALCulate:IMMediate command is received.
  • Page 176 Chapter 4 Command Reference :CALCulate[1] Subsystem :CALCulate[1]:MATH[:EXPRession][:DEFine]? Queries equation used for math operation. Query Response A sequence of ASCII-encoded bytes: (“SENS” * SCALE + OFFSET) terminated with a new line and EOI. Comments Query only. This query should be the last query in a terminated program message; otherwise, error -440 is generated.
  • Page 177: Calculate2 Subsystem

    Chapter 4 Command Reference Introduction :CALCulate2 Subsystem This subsystem performs post-acquisition limit testing and data transfer. Not until :CALCulate2:LIMit:STATe is set to ON will any of the :CALCulate2 NOTE settings be used. :CALCulate2:FEED “[:]CALCulate[1]” Sets or queries the data flow to be fed into the CALCulate2 block. Query Response The string “CALC”...
  • Page 178: Calculate2:limit Subtree

    Chapter 4 Command Reference :CALCulate2 Subsystem :CALCulate2:IMMediate:AUTO <Boolean> Sets or queries whether post-processing (recalculation) will automatically occur whenever any changes are made to the :CALCulate[1|2] subsystems. With :CALC2:IMM:AUTO set to OFF, CALCulate[1|2] only produces new results when new SENSe data is acquired or when the CALCulate2:IMMediate command is received.
  • Page 179 Chapter 4 Command Reference Introduction :CALCulate2:LIMit:CLEar:AUTO <Boolean> Sets or queries if the limit test results are to be cleared with each :INITiate[:IMMediate] and :INITiate:CONTinuous ON operation. Query Response Single ASCII-encoded byte, 0 or 1. A value of 0 indicates OFF; a value of 1 indicates ON. Comments *RST: ON When AUTO is ON, the Counter will perform the following whenever...
  • Page 180 Chapter 4 Command Reference :CALCulate2 Subsystem :CALCulate2:LIMit:DISPlay GRAPh | NUMBer Sets or queries whether the measurement display is numeric or symbolic (on a graph). When :CALC2:LIM:DISP is NUMBer, the measurement results are displayed numerically. When :CALC2:LIM:DISP is GRAPh, the measurement results are displayed symbolically on a graph; the measurement result is represented by an asterisk (*), while the upper and lower limits are each represented by a colon (:).
  • Page 181 Chapter 4 Command Reference Introduction If the current measurement is Totalize or Voltage Peaks, 0 is returned and error -221 is generated. :CALCulate2:LIMit:FCOunt:LOWer? Queries the number of limit test failures (that is, the Fail COunt) at the lower limit. Query Response Numeric data transferred as ASCII bytes in <NR1>...
  • Page 182 Chapter 4 Command Reference :CALCulate2 Subsystem Comments Query only. :CALCulate2:LIMit:LOWer[:DATA] <numeric_value> [HZ | S |DEG] Sets or queries the lower limit used for limit testing. When the result is less than the lower limit, a fail is reported; when the result is equal to the lower limit, a fail is not reported. If math is enabled (:CALC:MATH:STATe ON), the limit value specified should take into account that the limit testing is on measurements that have been scaled and offset.
  • Page 183 Chapter 4 Command Reference Introduction :CALCulate2:LIMit:PCOunt[:TOTal]? Queries the total Pass COunt (that is, the number of measurements that passed the limit test). Query Response Numerical data transferred as ASCII bytes in <NR1> format. If CALC2:LIM:STATe is OFF, 0 is returned and error -221 is generated. If no valid result exists, 0 is returned and error -230 is generated.
  • Page 184 Chapter 4 Command Reference :CALCulate2 Subsystem :CALCulate2:LIMit:UPPer[:DATA] <numeric_value> [HZ | S | DEG] Sets or queries the upper limit used for limit testing. When the result is greater than the upper limit, a fail is reported; when the result is equal to the upper limit, a fail is not reported.
  • Page 185: Calculate3 Subsystem

    Chapter 4 Command Reference Introduction :CALCulate3 Subsystem This subsystem performs post-acquisition statistics computation and data transfer. Not until :CALCulate3:LFILter:STATe is set to ON will any of the NOTE :CALCulate3:LFILter settings be used. Not until :CALCulate3:AVERage[:STATe] is set to ON will any of the :CALCulate3:AVERage settings be used.
  • Page 186 Chapter 4 Command Reference :CALCulate3 Subsystem If the current measurement is Totalize or Voltage Peaks, Not a Number 9.91E37 is returned and error -221 is generated. Comments Query only. The last calculated result remains valid until a new computation is made or a relevant instrument state is modified.
  • Page 187 Chapter 4 Command Reference Introduction Related Stats Front-Panel keys :CALCulate3:AVERage:COUNt:CURRent? Queries the current count (that is, the number of data values collected for statistical computation). Query Response Numeric data transferred as ASCII bytes in <NR1> format. Range is 0 to 1,000,000. If :CALC3:AVER[:STATe] is OFF, error -221 is generated.
  • Page 188 Chapter 4 Command Reference :CALCulate3 Subsystem Related Stats Front-Panel keys :CALCulate3:AVERage:TYPE MAXimum | MINimum | SDEViation | SCALar or MEAN Selects which statistical result will appear: in the :CALC3:DATA? response, and on the front-panel display when :DISP[:WIND]:TEXT:FEED is set to “CALC3”.
  • Page 189: Calculate3:lfilter Subtree

    Chapter 4 Command Reference Introduction If the current measurement is Totalize or Voltage Peaks, Not a Number 9.91E37 is returned and error -221 is generated. Comments Query only. The last calculated result remains valid until a new computation is made or a relevant instrument state is modified.
  • Page 190 Chapter 4 Command Reference :CALCulate3 Subsystem Query Response Numeric data transferred as ASCII bytes in <NR3> format with eleven significant digits. Comments *RST: 0.0000000000 This command couples :CALC2:LIM:LOW to the same value. Updating the lower limit value causes the limit counts (:CALC2:LIM:FCO, :CALC2:LIM:PCO) to be cleared.
  • Page 191 Chapter 4 Command Reference Introduction -9.9999990000E+12 to -1.0000000000E-13, 0.0000000000, +1.0000000000E- <numeric_value> 13 to +9.9999990000E+12. Range <numeric_value> 11 digits Resolution Query Response Numeric data transferred as ASCII bytes in <NR3> format with eleven significant digits. Comments *RST: 0.0000000000 This command couples :CALC2:LIM:UPP to the same value. Updating the upper limit value causes the limit counts (:CALC2:LIM:FCO, :CALC2:LIM:PCO) to be cleared.
  • Page 192: Calibration Subsystem

    Chapter 4 Command Reference :CALibration Subsystem :CALibration Subsystem :CALibration[:ALL]? This query causes an internal interpolator self-calibration . Query Response Numeric data transferred as ASCII bytes in <NR1> format. A value of zero indicates the calibration completed without error. A value of one indicates the calibration completed with error.
  • Page 193 Chapter 4 Command Reference Introduction Your Counter was calibrated before it left the factory. When you receive your Counter, read the calibration count to determine its initial value. Early versions of the Counter do not support this query. Related Scale & Offset / POWER (Calibration Menu) Front-Panel :CALibration:DATA <arbitrary block>...
  • Page 194: Calibration:security Subtree

    Chapter 4 Command Reference :CALibration Subsystem :CALibration:SECurity Subtree This subtree provides capabilities related to the security of the Counter’ s calibration factors. Note, early versions of the Counter do not support any of the :CALibration:SECurity commands. :CALibration:SECurity:CODE <NRf> Sets the calibration security code . To change the security code, the Counter must first be unsecured.
  • Page 195 Chapter 4 Command Reference Introduction The calibration state is stored in non-volatile memory, and is unaffected by Comments power-on, save/recall, and *RST. The security code is set to 53131 or 53132 (depending on which model you have) when the Counter is shipped from the factory. If you forget your security code, you can reset the security code to the model- number default by resetting all of the non-volatile memory to a default state.
  • Page 196: Configure Subsystem

    Chapter 4 Command Reference :CONFigure Subsystem :CONFigure Subsystem Refer to the Measurement Instructions section on page 4-52 in this chapter for a description of :CONFigure. 4-30 Programming Guide...
  • Page 197: Device Clear

    Chapter 4 Command Reference Introduction Device Clear Device Clear The full capability of the Device Clear IEEE 488.1 interface function is implemented in the Counter. This function allows a device to be initialized to a cleared state. The device-dependent effect is described below. In response to either the Device Clear message or the Selected Device Clear message, the Counter: clears the input buffer and Output Queue,...
  • Page 198: Diagnostic Subsystem

    Chapter 4 Command Reference :DIAGnostic Subsystem :DIAGnostic Subsystem This subsystem controls the remote calibration of the Counter. All of the calibration values, with the exception of the interpolator values, are stored in non-volatile memory and are unaffected by power-on, save/recall, and *RST. Any of the commands which perform a calibration, with the exception of the interpolator calibration, will generate error -221 if the user tries to execute a calibration while the Counter is secured.
  • Page 199 Chapter 4 Command Reference Introduction :DIAGnostic:CALibration:INPut[1|2]:OFFSet: AUTO ONCE | OFF Calibrates the channel 1 or 2 input trigger OFFSet when the ONCE parameter is used. Before sending this command, BE SURE to disconnect any input signal from the appropriate input. Query Response A sequence of ASCII-encoded bytes: OFF Comments...
  • Page 200 Chapter 4 Command Reference :DIAGnostic Subsystem :DIAGnostic:CALibration:ROSCillator:AUTO ONCE | OFF Calibrates the reference oscillator when ONCE parameter is used. Before sending this command, connect 10 MHz to channel 1. Query Response A sequence of ASCII-encoded bytes: OFF Comments This command is available only if the instrument contains the medium or high stability oscillator option;...
  • Page 201 (from step one), power cycle the Counter. A good precaution is to use an HP-IB program (see the programming example titled “To Read and Store Calibration Data” in Chapter 3 of the Programming Guide) to read and store the calibration factors prior to initiating any calibration(s).
  • Page 202 Chapter 4 Command Reference :DIAGnostic Subsystem :DIAGnostic:CALibration:TINTerval:QUICk This event command calibrates out the differences in electrical path length between channels 1 and 2. Before sending this command, connect to channel 1 a square wave of approximate frequency 10 MHz, but more importantly with a rapid rise time. Comments No query.
  • Page 203: Display Subsystem

    Chapter 4 Command Reference Introduction :DISPlay Subsystem This subsystem controls the selection and presentation of textual information on the Counter’ s display. This information includes measurement results. :DISPlay is independent of, and does not modify, how data is returned to the controller. See the section titled “How to Program the Counter to Display Results”...
  • Page 204 Chapter 4 Command Reference :DISPlay Subsystem :DISPlay[:WINDow]:TEXT:FEED “[:]CALCulate2” | “[:]CALCulate3” Sets or queries what data flow is fed into the display. Choose from the following <data_handle> strings: “[:]CALCulate2”— should be used to direct any result other than the statistics to the result display Specifically this would select one of the following results for the result display: –...
  • Page 205 Chapter 4 Command Reference Introduction :DISPlay[:WINDow]:TEXT:RADix COMMa | DPOint Sets or queries the character used to separate integral and fractional portions of a displayed number. To conform to the numerical convention used in the USA, specify decimal point with DPOint. To conform to the numerical convention used in many other countries, specify COMMa.
  • Page 206: Fetch Subsystem

    Chapter 4 Command Reference :FETCh Subsystem :FETCh Subsystem Refer to the Measurement Instructions section on page 4-52 in this chapter for a description of :FETCh. 4-40 Programming Guide...
  • Page 207: Format Subsystem

    Chapter 4 Command Reference Introduction :FORMat Subsystem This subsystem sets the data format for transferring numeric information. This data format is used for response data by those commands that are specifically designated to be affected by the :FORMat subsystem. :FORMat[:DATA] ASCii | REAL Sets or queries the data format type.
  • Page 208: Group Execute Trigger (get)

    Chapter 4 Command Reference Group Execute Trigger (GET) Group Execute Trigger (GET) 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. The device-dependent result of this triggering is described in the following paragraph.
  • Page 209: Hcopy Subsystem

    Chapter 4 Command Reference Introduction :HCOPy Subsystem :HCOPy:CONTinuous <Boolean> Enables or disables printing results. When :HCOPy:CONTinuous is enabled (:HCOP:CONT ON), the Counter prints each measurement. If statistics is enabled (:CALC3:AVER[:STAT] ON), all statistics (standard deviation, mean, minimum, and maximum ) will be printed in addition to the individual measurements.
  • Page 210: Initiate Subsystem

    Chapter 4 Command Reference :INITiate Subsystem :INITiate Subsystem This subsystem controls the initiation of a measurement. :INITiate:AUTO <Boolean> Sets or queries if the Counter should stop measurements or continue measuring (go on) when a measurement exceeds the user-entered limits. AUTO ON configures the Counter to automatically stop measuring (set :INIT:CONT to OFF) on a limit test failure (that is, out-of-limit results are detected).
  • Page 211 Chapter 4 Command Reference Introduction Comments *RST: OFF When the :INIT:CONT ON command is sent, the Counter: – invalidates the statistics results, – clears the statistics current count to 0, – reports the negative status condition (NOT Computing Statistics) to bit 8 of Operation Status Register. When :CALC2:LIM:CLE:AUTO is ON, the Counter performs the following whenever the :INIT:CONT ON command is sent: –...
  • Page 212 Chapter 4 Command Reference :INITiate Subsystem When a single measurement is in progress (:INIT:CONT is OFF): – Error -213 (Init ignored) is generated and the state of INIT:CONT is unaffected by :INIT:CONT ON. – Error -210 (Trigger error) is generated by INIT:CONT OFF. Note that the Counter powers up with :INIT:CONT set to ON, but *RST sets :INIT:CONT to OFF.
  • Page 213 Chapter 4 Command Reference Introduction Comments When :TRIG:COUN:AUTO is ON and :CAL3:AVER[:STAT] is ON, the Counter clears the statistics results and the statistics current count on :INIT[:IMM]. If the instrument is already in the process of making a measurement or if INITiate:CONTinuous is set to ON, an :IMMediate command has no affect, and an error -213 (Init ignored) is generated.
  • Page 214: Input[1|2] Subsystem

    Chapter 4 Command Reference :INPut[1|2] Subsystem :INPut[1|2] Subsystem This subsystem controls the characteristics of the Counter’ s input ports. :INPut1 corresponds to channel 1 input port and :INPut2 corresponds to channel 2 input port. :INPut[1|2]:ATTenuation 1 | 10 Sets or queries the input attenuation . Query Response Numeric data transferred as ASCII bytes in <NR1>...
  • Page 215 Chapter 4 Command Reference Introduction :INPut[1|2]:FILTer[:LPASs]:FREQuency? Queries the cutoff frequency of the low-pass filter. Query Response Numeric data transferred as ASCII bytes in <NR3> format with six significant digits. A value of 100E+3 is returned. Comments Units are Hertz. :INPut[1|2]:IMPedance <numeric_value> [OHM] Sets or queries the input impedance (50 or 1M ).
  • Page 216: Input3 Subsystem

    Chapter 4 Command Reference :INPut3 Subsystem :INPut3 Subsystem This subsystem queries the characteristics of the Counter’ s channel 3 input port. These commands are only available if Option 030/050 is installed. :INPut3:COUPling? Queries the channel 3 input coupling . Query Response A sequence of ASCII-encoded bytes: AC Comments This command is only available if Option 030/050 is installed.
  • Page 217: Measure Subsystem

    Chapter 4 Command Reference Introduction :MEASure Subsystem Refer to the Measurement Instructions section on page 4-52 in this chapter for a description of :MEASure. Programming Guide 4-51...
  • Page 218: Measurement Instructions (:configure, :fetch, :measure, :read)

    Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) The purpose of these commands is to acquire data using a set of high-level instructions. These commands are structured to allow you to trade off interchangeability with fine control of the measurement process.
  • Page 219 Chapter 4 Command Reference Introduction The <source_list> parameter has the same syntax as SCPI <channel_list> syntax. For example, a one-channel function (such as Frequency, Period, etc.) would use (@1) to specify channel 1, whereas a two-channel function (such as Time Interval, Phase, and Ratio) would use (@1), (@2) to specify a measurement between channel 1 and channel 2.
  • Page 220 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) This command disables math, statistics, and limit-testing. If an absolute trigger level is not specified in the <parameters>, then when this command executes, for functions other than Voltage Peaks (maximum, minimum, peak-to-peak) or Totalize, –...
  • Page 221 Chapter 4 Command Reference Introduction FETCh[[:SCALar]:<function>]? This query returns the measurement taken by the :INITiate (or :MEASure query or :READ?) commands. When [:SCALar]:<function> is specified, the instrument will retrieve the specified result if it matches the current measurement type or can be derived from the current measurement type.
  • Page 222 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Comments Refer to the sub-section in this chapter titled “Descriptions of the Measurement Functions ” for descriptions of each measurement function. Refer to Table 4-1 in this section for a summary of the <function>, <parameters>, and <source_list>...
  • Page 223 Chapter 4 Command Reference Introduction :READ[[:SCALar]:<function>]? This query provides a method of performing a :FETCh? on fresh data. A common application is to use this command in conjunction with a :CONFigure to provide a capability like :MEASure? in which the application programmer is allowed to provide fine adjustments to the instrument state by issuing the corresponding commands between the :CONFigure and :READ?.
  • Page 224 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Query Response Result will be formatted according to :FORMat[:DATA] ASCii | REAL setting. When ASCii format is used, numeric data is transferred as ASCII bytes in <NR3> format. The number of significant digits will range from 1 to 15, depending on the measurement resolution.
  • Page 225 Chapter 4 Command Reference Introduction Table 4-1. The <function>, associated <parameters> and <source_list> for the Measure Instruction Commands <function> * <parameters> [,<source_list>]** [:VOLTage]:DCYCle [<reference>] [(@1)] [:VOLTage]:PDUTycycle [:VOLTage]:FALL:TIME [<lower_reference> [,upper_reference>]] [(@1) ] [:VOLTage]:FTIMe [:VOLTage]:FREQuency [<expected_value>[,<resolution>]] [(@1) | (@2) | (@3)] [:VOLTage]:FREQuency:RATio [<expected_value>...
  • Page 226 [:VOLTage]:FREQuency, [:VOLTage]:FREQuency:RATio, [:VOLTage]:PERiod, etc.) that can be used with either the :MEASure query or :CONFigure command. If your HP 53131A contians Firmware Revision 3413, refer to the subsection CAUTION titled “Firmware Revision Work-Around Commands” on page 4-77. It is important to refer to this subsection if your counter conta ins Firmware Revision 3413 because several measurement functions commands will not work with this firmware revision;...
  • Page 227 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:DCYCle? [<reference>][,(@1)] Measures Duty Cycle. The measurement arming is coupled to “auto.” The <reference> specifies the point on the pulse where the duty cycle is determined. This point can be specified as either a percentage or an absolute voltage.
  • Page 228 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:FALL:TIME? [<lower_reference>[,upper_reference>]][,(@1)] Measures Fall Time. The measurement arming is coupled to “auto.” The Counter uses the <lower_reference> and <upper_reference> to select the lower and upper points on the falling edge of an input signal applied to channel 1. These reference points can be specified as either a percentage or an absolute voltage.
  • Page 229 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:FALL:TIME? (Cont.) <source_list> range: (@1) default: (@1) :MEASure[:SCALar][:VOLTage]:FREQuency? [<expected_value>[,<resolution>]][, (@1)|(@2)|(@3)] Measures Frequency. The measurement arming mode is set to “digits.” The Counter uses the <expected_value> and <resolution> parameters to configure the number of digits of resolution arming setting.
  • Page 230 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:FREQuency? (Cont.) default: value which indicates 4 digits of resolution for the specified <expected_value> Ch3 <expected_value> range: 100 MHz to 3.00 GHz resolution: <expected_value>...
  • Page 231 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:FREQuency:RATio? [<expected_value>[,<resolution>]] [, (@1), (@2) | (@1), (@3) | (@2), (@1) | (@3), (@1) ] Measures Frequency Ratio between two inputs. The measurement arming mode is set to “digits.” The Counter uses the <expected_value>...
  • Page 232 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:FREQuency:RATio? (Cont.) resolution: <resolution> should use a mantissa of 1.0 and be an even power of 10 default: value which indicates 4 digits of resolution for the specified <expected_value>...
  • Page 233 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:NWIDth? [<reference>][,(@1)] Measures Negative Pulse Width. The measurement arming is coupled to “auto.” The <reference> specifies the point on the pulse where the negative pulse width is determined. This point can be specified as either a percentage or an absolute voltage.
  • Page 234 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:PERiod? [<expected_value>[,<resolution>]][, (@1)|(@2)|(@3)] Measures Period. The measurement arming mode is set to “digits.” The Counter uses the <expected_value> and <resolution> parameters to configure the number of digits of resolution arming setting.
  • Page 235 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:PERiod? (Cont.) Ch3<expected_value> range: 0.33 ns to 10.0 ns resolution: <expected_value> should be within 10% of input period for optimum arming configuration default: 2 ns Ch3 <resolution> description: value indicates decade corresponding to least significant digit of the result range:...
  • Page 236 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:PHASe? [(@1),(@2)] Measures Phase. The measurement arming is coupled to “auto.” The trigger settings are coupled so that both channels 1 and 2 have auto-trigger enabled at 50% with a positive slope.
  • Page 237 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:PWIDth? [<reference>][,(@1)] (Cont.) <reference> percent range: 0 to 100 [PCT] percent resolution: voltage range: For volts if X1 Attenuation: -5.125V to +5.125V For volts if X10 Attenuation: -51.25V to +51.25V voltage resolution: For volts if X1 Attenuation: .005V For volts if X10 Attenuation: .05V...
  • Page 238 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:RISE:TIME? (Cont.) <lower_reference> percent range: 0 to 100 [PCT] percent resolution: voltage range: For volts if X1 Attenuation: -5.125V to +5.125V For volts if X10 Attenuation: -51.25V to +51.25V voltage resolution: For volts if X1 Attenuation: .005V For volts if X10 Attenuation: .05V...
  • Page 239 Chapter 4 Command Reference Introduction Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:TINTerval? [(@1),(@2)] Measures Time Interval. The first channel in the channel list is the start channel and the second is the stop channel. The trigger settings are coupled so that both channels 1 and 2 have auto-trigger enabled at 50% with a positive slope.
  • Page 240 Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) Descriptions of the Measurement Functions— <function> (Cont.) :MEASure[:SCALar][:VOLTage]:TOTalize:TIMed? [<gate_time>][,(@1)] Measures Totalize during the specified <gate time>. The totalize gate mode is set to “time,” and the totalize gate time is defaulted or set to the specified value.
  • Page 241: Using :measure

    Chapter 4 Command Reference Introduction How to Use the Measurement Instruction Commands The Measure Instruction commands have a different level of compatibility and flexibility than other commands. The parameters used with commands from the Measure Instruction describe the signal you are going to measure. This means that the Measure Instructions give compatibility between instruments since you do not need to know anything about the instrument you are using.
  • Page 242: Using :configure With :read

    Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) How to Use the Measurement Instruction Commands (Cont.) Using :CONFigure with :READ? The :CONFigure command causes the instrument to choose default settings for the specified measurement. :READ? starts the measurement and queries the result. This sequence operates in the same way as the :MEASure query, but now it is possible to insert commands between :CONFigure and :READ? to specify a particular setting.
  • Page 243: Firmware Revision Work-around Commands

    :INITIATE to start the measurement. :FETCH? to query for result. Firmware Revision Work-Around Commands The following applies to HP 53131A instruments with Firmware Revision 3413: The three commands listed below should NOT be used. :MEASure[:SCALar][:VOLTage]:MAXimum? <parameters>[<source_list>] :MEASure[:SCALar][:VOLTage]:MINimum? <parameters>[<source_list>] :MEASure[:SCALar][:VOLTage]:PTPeak? <parameters>[<source_list>] The work-around commands which should be substituted are listed below.
  • Page 244 :FETCh? When the function is set to Voltage Peaks, and the Counter is in SINGLE mode, the HP-IB command :FETCh? will hang the HP-IB if the measurement has not completed. The work around inserts a command which enforces correct timing. The work-around command sequence is listed below.
  • Page 245: Memory Subsystem

    Chapter 4 Command Reference Introduction :MEMory Subsystem This subsystem manages the instrument’ s memory . The MEMory capabilities of an instrument are not part of the instrument state, and are not affected by reset (*RST) or recall (*RCL). In this instrument, the macro capabilities will not survive a power cycle, but the *SAV/*RCL states will.
  • Page 246: [:sense] Subsystem

    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]:DATA? [“[:]SENSe[1]”] Queries the current measurement result data of the :SENSe subsystem (no scale or offset applied).
  • Page 247 Chapter 4 Command Reference Introduction [:SENSe]:EVENt2:FEED “[:]INPut[1] | [:]INPut2” Sets or queries the common/separate enable. Feeding the :INPut2 subsystem to the [:SENSe]:EVENt2 subsystem corresponds to separate; feeding the :INPut1 subsystem to the [:SENSe]:EVENt2 subsystem corresponds to common. Query Response The string “INP” or “INP2” is returned. Comments *RST: “INPut2”...
  • Page 248 Chapter 4 Command Reference [:SENSe] Subsystem <numeric_value> 0, 50, or 100 PCT Range Query Response Numeric data transferred as ASCII bytes in <NR1> format. Comments Current firmware revision— *RST: 0 PCT (least noise immunity) Prior firmware revisions— *RST: 100 PCT (maximum sensitivity) (3317, 3335, and 3402) Related Trigger/Sensitivity...
  • Page 249 Chapter 4 Command Reference Introduction [:SENSe]:EVENt[1|2]:LEVel[:ABSolute]:AUTO <Boolean> Sets or queries the “auto-trigger “ enable. When AUTO is set to ON, the Counter automatically measures and computes a trigger level which corresponds to the auto-trigger percentage (specified with [:SENS]:EVEN[1|2]:LEV:REL) of the specified channel. While the enable is set to ON, the Counter will measure and compute the measurement channel(s) trigger level(s) each time :INIT or :INIT:CONT ON is executed.
  • Page 250: [:sense]:event3 Subtree

    Chapter 4 Command Reference [:SENSe] Subsystem Comments *RST: 50 PCT Only applies when [:SENS]:EVEN[1|2]:LEV[:ABS]:AUTO is ON. Related Trigger/Sensitivity Front-Panel Keys [:SENSe]:EVENt[1|2]:SLOPe POSitive | NEGative Sets or queries which edge of the input signal will be considered an event for Frequency, Period, Frequency Ratio, Time Interval, Totalize, and Phase measurements.
  • Page 251: [:sense]:frequency Subtree

    Chapter 4 Command Reference Introduction [:SENSe]:EVENt3:SLOPe? Queries which edge of channel 3 input port will be considered an event. Query Response A sequence of ASCII-encoded bytes: POS [:SENSe]:FREQuency Subtree This subtree controls the Frequency, Frequency Ratio, and Period measuring capabilities of the instrument. [:SENSe]:FREQuency:ARM Subtree This subtree is used to synchronize the Frequency, Frequency Ratio, and Period start and stop arm with events.
  • Page 252 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate |EXTernal Sets or queries the start arm for Frequency, Frequency Ratio, and Period measurements. Query Response A sequence of ASCII-encoded bytes: IMM or EXT Comments *RST: IMMediate Related Gate & ExtArm Front-Panel Keys [:SENSe]:FREQuency:ARM:STOP:DIGits <numeric_value>...
  • Page 253 Chapter 4 Command Reference Introduction [:SENSe]:FREQuency:ARM:STOP:SOURce IMMediate | EXTernal | TIMer | DIGits Sets or queries the stop arm for Frequency, Frequency Ratio, and Period measurements. Query Response A sequence of ASCII-encoded bytes: IMM, EXT, TIM, or DIG Comments *RST: TIMer Related Gate &...
  • Page 254 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:FREQuency:EXPected[1|2|3] <numeric_value> [HZ] Sets or queries the approximate frequency of a signal you expect to measure. Providing this value enables the Counter to eliminate a pre-measurement step, saving measurement time and enabling more accurate arming.
  • Page 255 Chapter 4 Command Reference Introduction Comments *RST: ON This value is unaffected by save/recall. While the Counter is configured to ON, representative CW signal(s) must be present at the measurements input(s). The ON setting causes the Counter to disregard any previously set “expected frequency”...
  • Page 256 Chapter 4 Command Reference [:SENSe] Subsystem Query Response The string “<function> <channel>[,<channel>] ” is returned. The string omits default nodes (XNONe) and uses short form mnemonics. If the channel specifier(s) are set to default value(s), no channel specifier is returned in response. If the channel specifier(s) are not set to default value(s), they will be returned in the response with a single space separating the first channel specifier from the function name.
  • Page 257: [:sense]:phase Subtree

    Chapter 4 Command Reference Introduction When the sensor function is changed resulting in auto-trigger being enabled, the Counter will wait until a measurement is initiated before performing the first “auto-trigger ” and updating the absolute level(s). This command has no direct effect on :FETCh?, :READ?, or :CONFigure?. When the sensor function is Totalize, Voltage Minimum, Voltage Maximum, or Voltage Peak-to-Peak, then [:INIT]:IMM always initiates a single measurement.
  • Page 258: [:sense]:roscillator Subtree

    Counter checks the external reference signal to ensure that the frequency is 1, 5, or 10 MHz and that the reference is present at measurement completion. Note that the HP 53132A only accepts 10 MHz. When CHECk is OFF, the external reference signal is not checked at all.
  • Page 259 Chapter 4 Command Reference Introduction Query Response A sequence of ASCII-encoded bytes: ON or OFF Comments *RST: ON Use this command when [:SENS]:ROSC:SOUR EXT has been sent. This value is unaffected by save/recall. [:SENSe]:ROSCillator:EXTernal:FREQuency? Queries the frequency value of the external reference oscillator. Query Response Numeric data transferred as ASCII bytes in <NR3>...
  • Page 260 (1, 5, or 10 MHz) is present at the Ref In rear-panel connector. Note that the HP 53132A only accepts 10 MHz. The internal timebase is used when an invalid signal is present at this connector.
  • Page 261: [:sense]:tinterval Subtree (hp 53131a And Hp 53132a With S/n Prefix Below 3646)

    Falltime, Duty Cycle, and Pulse Width functions) measuring capabilities of the instrument. Refer to page 4-98, for Time Interval arming capabilities of the HP 53132A with a serial number prefix 3646 and above. (HP 53131A and HP 53132A [:SENSe]:TINTerval:ARM Subtree With S/N Prefix Below 3646 This subtree is use to synchronize the time interval start and stop arm with events.
  • Page 262 For short gate time: 0.01E-3 seconds Resolution For long gate time: 1E-3 seconds For HP 53131A with firmware revisions below 3427, the minimum gate time is 1 ms. For HP 53132A with firmware revisions below 3646, the minimum gate time is 1 ms. 4-96...
  • Page 263 Chapter 4 Command Reference Introduction Query Response Numeric data transferred as ASCII bytes in <NR3> format with six significant digits. Comments *RST: 10E-3 S Only applies when [:SENS]:TINT:ARM:STOP:SOUR TIM is selected. This [:SENS]:TINT:ARM:STOP:TIM command has no affect on the following measurements: Risetime, Falltime, Duty Cycle, and Pulse Width. Related Gate &...
  • Page 264: [:sense]:tinterval Subtree (hp 53132a With S/n Prefix 3646 And Above)

    Falltime, Duty Cycle, and Pulse Width functions) measuring capabilities of the instrument . Refer to page 4-95, for Time Interval arming capabilities of the HP 53131A (and the HP 53132A with a serial number prefix below 3646). [:SENSe]:TINTerval:ARM:ESTART and :ESTOP Subtrees...
  • Page 265 Chapter 4 Command Reference Introduction Front-Panel Arming Settings TSTART TDELAY ESTART:LAY2 ESTART:LAY1 ESTOP:LAY2 ESTOP:LAY1 STOPT DELAYT :SOURce :SOURce :SOURce :SOURce IMMediate IMMediate IMMediate IMMediate AUTO _______ AUTO NONE IMMediate IMMediate IMMediate TIMer AUTO _______ AUTO TIME IMMediate IMMediate IMMediate INTernal2 AUTO _______ AUTO...
  • Page 266 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:TINTerval:ARM:ESTART:LAYer2:SLOPe POSitive | NEGative Sets or queries the slope of the external start arm signal used in external arming time interval (including Time Interval, Risetime, Falltime, Duty Cycle, and Pulse Width functions) measurements. A sequence of ASCII-encoded bytes: POS or NEG Query Response *RST: POSitive Comments...
  • Page 267 Chapter 4 Command Reference Introduction The [:SENS]:TINT:ARM:EST ART[:LAYer[1]]:ECO command has no affect on the following measurements: Risetime, Falltime, Duty Cycle, and Pulse Width. [:SENSe]:TINTerval:ARM:ESTART[:LAYer[1]]:SOURce IMMediate | TIMer | INTernal[1] Sets or queries the start arm delay for Time Interval measurements. A sequence of ASCII-encoded bytes: IMM or TIM or INT[1] Query Response *RST: IMMediate...
  • Page 268 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:TINTerval:ARM:ESTOP:LAYer2:SLOPe POSitive | NEGative Sets or queries the slope of the external stop arm signal used in external arming time interval (including Time Interval, Risetime, Falltime, Duty Cycle, and Pulse Width functions) measurements. A sequence of ASCII-encoded bytes: POS or NEG Query Response *RST: POSitive Comments...
  • Page 269 Chapter 4 Command Reference Introduction [:SENSe]:TINTerval:ARM:ESTOP[:LAYer[1]]:SOURce IMMediate | TIMer | INTernal2 Sets or queries the stop arm for Time Interval measurements. Query Response A sequence of ASCII-encoded bytes: IMM or TIM or INT2 Comments *RST: IMMediate The [:SENS]:TINT:ARM:ESTOP[:LAYer[1]]:SOUR command has no affect on the following measurements: Risetime, Falltime, Duty Cycle, and Pulse Width.
  • Page 270: [:sense]:totalize Subtree

    Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:TOTalize Subtree This subtree controls the Totalize measuring capabilities of the instrument. [:SENSe]:TOTalize:ARM Subtree This subtree is used to synchronize the Totalize start and stop arm with events. The following combination of start/stop arming sources are valid: STARt:SOURce STOP:SOURce Front-Panel Gating Settings...
  • Page 271 Chapter 4 Command Reference Introduction [:SENSe]:TOTalize:ARM[:STARt]:SOURce IMMediate | EXTernal Sets or queries the start arm for Totalize measurements. Query Response A sequence of ASCII-encoded bytes: IMM or EXT Comments *RST: IMMediate When both start and stop arm are set to IMMediate, use :INIT[:IMM] to begin totalizing and :ABORt to terminate.
  • Page 272 Chapter 4 Command Reference [:SENSe] Subsystem [:SENSe]:TOTalize:ARM:STOP:SOURce IMMediate | EXTernal TIMer Sets or queries the stop arm for Totalize measurements. Query Response A sequence of ASCII-encoded bytes: IMM, EXT or TIM Comments *RST: TIMer When both start and stop arm are set to IMMediate, use :INIT[:IMM] to begin totalizing and :ABORt to terminate.
  • Page 273: Status Subsystem

    Chapter 4 Command Reference Introduction :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- 2.
  • Page 274 Chapter 4 Command Reference :STATus Subsystem :STATus:OPERation:ENABle <non-decimal numeric> | <NRf> Sets or queries the Operation Event Status Enable Register. The parameter and query response value, when rounded to an integer value and expressed in base 2 (binary), represents the bit values of the Operation Event Status Enable Register.
  • Page 275 Chapter 4 Command Reference Introduction :STATus:OPERation:NTRansition <non-decimal numeric> | <NRf> Sets or queries the negative transition filter for the Operation status reporting structure. The parameter and query response value, when rounded to an integer value and expressed in base 2 (binary), represents the bit values of the negative transition filter.
  • Page 276: Status:questionable Subtree

    Chapter 4 Command Reference :STATus Subsystem Comments At power-on and STAT:PRES, the positive transition filter is preset such that each bit is a 1 (TRUE). This value is unaffected by *RST and save/recall. :STATus:PRESet This event command presets the enable registers and transition filters associated with the Operation and Questionable status reporting structures.
  • Page 277 Chapter 4 Command Reference Introduction :STATus:QUEStionable:CONDition? Queries the status of the Questionable Data Condition Status Register. Bits are not cleared when read. Query Response Numeric data transferred as ASCII bytes in <NR1> format. Range is 0 to 65,535. The query response value is an integer formed by the binary-weighting of the bits.
  • Page 278 Chapter 4 Command Reference :STATus Subsystem :STATus:QUEStionable[:EVENt]? Queries the status of the Questionable Data Event Status Register. The Questionable Data Event Status Register captures changes in conditions by having each event bit correspond to a specific condition bit in the Questionable Data Condition Status Register.
  • Page 279 Chapter 4 Command Reference Introduction :STATus:QUEStionable:PTRansition <non-decimal numeric> | <NRf> Sets or queries the positive transition filter for the Questionable Data status reporting structure. The parameter and query response value, when rounded to an integer value and expressed in base 2 (binary), represents the bit values of the positive transition filter.
  • Page 280: System Subsystem

    Chapter 4 Command Reference :SYSTem Subsystem :SYSTem Subsystem This subsystem collects together the capabilities that are not related to instrument performance. :SYSTem:COMMunicate Subtree The :SYSTem:COMMunicate subtree collects together the configuration of the control/communication interfaces. The :SYSTem:COMMunicate:SERial subtree controls the physical configuration of the RS-232C port.
  • Page 281 Chapter 4 Command Reference Introduction A sequence of ASCII-encoded bytes: IBF, ON, or LIM Query Response Comments This value is stored in non-volatile memory. It is unaffected by power-on, save/recall, and *RST. The start and stop thresholds are not user configurable. Related Utility/POWER Front-Panel...
  • Page 282 Chapter 4 Command Reference :SYSTem Subsystem :SYSTem:COMMunicate:SERial:TRANsmit:PARity[:TYPE] EVEN | ODD | NONE Sets or queries the parity scheme. Query Response A sequence of ASCII-encoded bytes: EVEN, ODD, or NONE Comments This value is stored in non-volatile memory. It is unaffected by power-on, save/recall, and *RST.
  • Page 283 Chapter 4 Command Reference Introduction This command simulates the pressing or a front-panel key. The <numeric_value> is a key code value. This command puts an entry in the Key Queue (just as any front-panel key press does). The length of the Key Queue is 500. The keys and their corresponding key codes are listed in the following table.
  • Page 284 Chapter 4 Command Reference :SYSTem Subsystem Comments At*RST and power-on, the Key Queue is cleared (emptied). The Key Queue is unaffected by save/recall. Key commands are sequential, but only in terms of processing other key commands or getting into the Key Queue. The operation performed by the key command is not guaranteed to be complete before processing of the next non- key command.
  • Page 285: Trace Subsystem

    Chapter 4 Command Reference Introduction :TRACe Subsystem This subsystem provides access to the scale and offset values. The :TRACe subsystem used in conjunction with the :CALCulate[1] subsystem, scales and offsets measurement results. :TRACe:CATalog? Queries list of intrinsic constants. The Counter has two constants, scale and offset. Query Response A comma-separated list of strings: “SCALE”, “OFFSET”...
  • Page 286 Chapter 4 Command Reference :TRACe Subsystem Scale & Offset Related Front-Panel Keys :TRACe[:DATA] SCALE, <numeric_value> :TRACe[:DATA] SCALE, <arbitrary block> :TRACe[:DATA]? SCALE Sets or queries the scale value. <numeric_value> -9.999999E+12 to -1.000000E-13, 0.000000, +1.000000E-13 to Range +9.999999E+12. <numeric_value> 7 digits Resolution Query Response Response will be formatted according to :FORMat[:DATA] ASCii | REAL setting.
  • Page 287: Trigger Subsystem

    Chapter 4 Command Reference Introduction :TRIGger Subsystem This subsystem enables synchronization of instrument actions with specified internal or external events. :TRIGger:COUNt:AUTO <Boolean> Sets or queries the control over the number of measurements made when :INITiate[:IMMediate] is performed. When :TRIG:COUN:AUTO is OFF, then :INIT[:IMM] initiates a single measurement.
  • Page 288: Cal? (calibration Query)

    Chapter 4 Command Reference *CAL? (Calibration Query) *CAL? (Calibration Query) *CAL? This query causes an internal interpolator self-calibration. Query Response Numeric data transferred as ASCII bytes in <NR1> format. A value of zero indicates the calibration completed without error. A value of one indicates the calibration completed with error.
  • Page 289: Cls (clear Status Command)

    Chapter 4 Command Reference Introduction *CLS (Clear Status Command) *CLS 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. The *CLS command will not clear data memories or any other settings.
  • Page 290: Ddt (define Device Trigger Command)

    Chapter 4 Command Reference *DDT <arbitrary block> (Define Device Trigger Command) *DDT <arbitrary block> (Define Device Trigger Command) *DDT <arbitrary block> Sets or queries the command that the device will execute when it receives the IEEE 488.1 Group Execute Trigger (GET) interface message (page 4- 42) or a *TRG common command.
  • Page 291: Dmc , (define Macro Command)

    Chapter 4 Command Reference Introduction *DMC <string>, <arbitrary block> (Define Macro Command) *DMC <string>, <arbitrary block> This command assigns a sequence of zero or more commands/queries to a macro label. The sequence is executed when the label is received as a command or query. The <string>...
  • Page 292: Emc (enable Macro Command)

    Chapter 4 Command Reference *EMC <NRf> (Enable Macro Command) *EMC <NRf> (Enable Macro Command) *EMC? (Enable Macro Query) *EMC <NRf> *EMC? Sets or queries the Enable for defined macros. Macro definitions are not affected by this command. One use of this command is to turn off macro expansion in order to execute an instrument-specific command with the same name as a macro.
  • Page 293: Ese

    Chapter 4 Command Reference Introduction *ESE <NRf> (Standard Event Status Enable Command) *ESE? (Standard Event Status Enable Query) *ESE <NRf> *ESE? Sets or queries the Standard Event Status Enable Register, shown in Figure 4-4. 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 294: Esr? (event Status Register Query)

    Chapter 4 Command Reference *ESR? (Event Status Register Query) *ESR? (Event Status Register Query) *ESR? Queries the Standard Event Status Register, shown in Figure 4-5. 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 295: Gmc? (get Macro Contents Query)

    Chapter 4 Command Reference Introduction *GMC? <string> (Get Macro Contents Query) *GMC? <string> Queries the current definition of a macro. The <string> parameter must be a currently defined macro label. Query Response Definite length block. The query response is a <definite length block> containing the command/query sequence which is executed when the macro label is received.
  • Page 296: Idn? (identification Query)

    Chapter 4 Command Reference *IDN? (Identification Query) *IDN? (Identification Query) *IDN? Queries the Counter identification. Query Response A sequence of ASCII-encoded bytes: HEWLETT-PACKARD, 53131A,0,XXXX HEWLETT-PACKARD, 53132A,0,XXXX terminated with a new line and EOI. XXXX represents the firmware date code. Comments This query should be the last query in a terminated program message;...
  • Page 297: Lmc? (learn Macro Query)

    Chapter 4 Command Reference Introduction *LMC? (Learn Macro Query) *LMC? Queries the currently defined macro labels. Query Response A sequence of one or more strings separated by commas. If no macros are defined, the response is a null string (two consecutive double quote marks). Programming Guide 4-131...
  • Page 298: Opc (operation Complete Command)

    Register to be set upon the transition of the measurement cycle from measuring to idle. (Note — For HP 53131A/132A with serial number prefix 3646 and above — If the measurement cycle is already idle, this command will immediately set the OPC bit.) See the section titled “Standard Event Status Register Group,”...
  • Page 299: Opc? (operation Complete Query)

    Chapter 4 Command Reference Introduction *OPC? (Operation Complete Query) *OPC? This query produces a response upon the transition of the measurement cycle from measuring to idle. This allows synchronization between a controller and the instrument using the MAV bit in the Status Byte Register or a read of the Output Queue.
  • Page 300: Opt? (option Identification Query)

    Chapter 4 Command Reference *OPT? (Option Identification Query) *OPT? (Option Identification Query) *OPT? Queries the instrument to identify any installed options. The following options can be installed in the instrument: Option 001, Medium Stability Oven Timebase Option 010, High Stability Oven Timebase Option 012, Ultra High Stability Oven Timebase Option 030, 3.0 GHz RF Input Channel (Channel 3) Option 050, 5.0 GHz RF Input Channel (Channel 3)
  • Page 301: Pmc (purge Macro Command)

    Chapter 4 Command Reference Introduction *PMC (Purge Macro Command) *PMC The Purge MaCros command deletes all macros previously defined using the *DMC command. Programming Guide 4-135...
  • Page 302: Rcl (recall Command)

    *SRE *WAI :CALibration:COUNt? :CALibration:DATA :CALibration:SECurity:CODE :CALibration:SECurity:STATe :CONFigure? :DIAGnostic:CALibration:INTerpolator:AUTO :DISPlay:ENABle :DISPlay:MENU[:STATe] :DISPLay[:WINDow]:TEXT:RADix [:SENSe]:FREQuency:EXPected[1|2|3] [:SENSe]:FREQuency:EXPected[1|2|3]:AUTO [:SENSe]:ROSCillator:EXTernal:CHECk [:SENSe]:ROSCillator:SOURCe [:SENSe]:ROSCillator:SOURCe:AUTO :STATus:OPERation:ENABle :STATus:OPERation:NTRansition :STATus:OPERation:PTRansition :STATus:QUEStionable:ENABle :STATus:QUEStionable:NTRansition :STATus:QUEStionable:PTRansition :SYSTem:COMMunicate:SERial:CONTrol:DTR :SYSTem:COMMunicate:SERial:TRANsmit:BAUD :SYSTem:COMMunicate:SERial:TRANsmit:PACE :SYSTem:COMMunicate:SERial:TRANsmit:PARity[:TYPE] :SYSTem:ERRor? (error queue) :SYSTem:KEY? (key queue) :SYSTem:KEY:LOG? (key queue) HP-IB Address 4-136 Programming Guide...
  • Page 303: Rst (reset Command)

    Chapter 4 Command Reference Introduction *RST (Reset Command) *RST This event command performs an instrument reset . The reset performs the following: sets instrument settings to their *RST states, disables macros, places instrument in “Operation Complete Idle State” and “Operation Complete Query Idle State,”...
  • Page 304: Sav (save Command)

    :CALibration:COUNt? :CALibration:DATA :CALibration:SECurity:CODE :CALibration:SECurity:STATe :CONFigure? response :DIAGnostic:CALibration:INTerpolator:AUTO :DISPlay:ENABle :DISPlay:MENU[:STATe] :DISPLay[:WINDow]:TEXT:RADix :FETCh? implied function :READ? implied function [:SENSe]:FREQuency:EXPected[1|2|3] [:SENSe]:FREQuency:EXPected[1|2|3]:AUTO [:SENSe]:ROSCillator:EXTernal:CHECk [:SENSe]:ROSCillator:SOURCe [:SENSe]:ROSCillator:SOURCe:AUTO :STATus:OPERation:ENABle :STATus:OPERation:NTRansition :STATus:OPERation:PTRansition :STATus:QUEStionable:ENABle :STATus:QUEStionable:NTRansition :STATus:QUEStionable:PTRansition :SYSTem:COMMunicate:SERial:CONTrol:DTR :SYSTem:COMMunicate:SERial:TRANsmit:BAUD :SYSTem:COMMunicate:SERial:TRANsmit:PACE :SYSTem:COMMunicate:SERial:TRANsmit:PARity[:TYPE] HP-IB Address Error Queue Key Queue 4-138 Programming Guide...
  • Page 305: Sre (service Request Enable Command)

    Chapter 4 Command Reference Introduction *SRE <NRf> (Service Request Enable Command) *SRE? (Service Request Enable Query) *SRE <NRf> *SRE? Sets or queries the Service Request Enable Register, shown in Figure 4-6. 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 306: Stb? (status Byte Query)

    Chapter 4 Command Reference *STB? (Status Byte Query) *STB? (Status Byte Query) *STB? Queries the Status Byte Register, shown in Figure 4-7. 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.
  • Page 307: Trg (trigger Command)

    Chapter 4 Command Reference Introduction *TRG (Trigger Command) *TRG This command is the device-specific analog of the IEEE 488.1 Group Execute Trigger (GET) interface message (page 4- 42), and has exactly the same effect. The *TRG command will perform the action defined by the *DDT command (page 4-124).
  • Page 308: Tst? (self-test Query)

    Chapter 4 Command Reference *TST? (Self-Test Query) *TST? (Self-Test Query) *TST? This query causes an internal self-test and the response indicates whether any errors were detected. Error -330 is generated when the self-test fails. Query Response Numeric data transferred as ACSII bytes in <NR1> format. A response value of zero indicates the self-test has completed without errors detected, while a non-zero value indicates the self-test was not completed or was completed with errors detected.
  • Page 309: Wai (wait-to-continue Command)

    Chapter 4 Command Reference Introduction *WAI (Wait-to-Continue Command) *WAI This command prevents the instrument from executing any further commands or queries until the measurement cycle transitions from measuring to idle. The only way to cancel this “holdoff” is by device clear or power-on. (*RST and *CLS have no affect on *WAI operation.) See the section titled “Using the *WAI Command,”...
  • Page 310 Chapter 4 Command Reference *WAI (Wait-to-Continue Command) 4-144 Programming Guide...
  • Page 311: Errors

    Errors...
  • Page 312: Introduction

    Displaying Errors When an HP-IB error is detected, the HP-IB XXX message will appear on the front-panel display, where XXX indicates the error number found in Table 5-2. The front-panel error messages are most easily seen if the Counter is in Single (:INIT:CONT OFF) or in the menu display mode.
  • Page 313: Error Queue

    Chapter 5 Errors Error Queue 10 ASSIGN @Cntr TO 703 20 !Assign path name 30 DIM Err_string$[255] 40 !Creates array for error string 50 REPEAT 60 !Repeats until error queue is empty OUTPUT @Cntr;“ SYST:ERR?” !Read error number and string ENTER @Cntr;Err_num,Err_string$ !Enter error number and string PRINT Err_num,Err_string$...
  • Page 314: Error Types

    Chapter 5 Errors Error Types Error Types Error numbers are categorized by type as shown in Table 5-1. Each and every error is listed in Table 5-2. Table 5-1. Error Types Error Number Error Type No Error Command Errors 100 to 199 Execution Errors 200 to 299 Device-Specific Errors...
  • Page 315: Execution Error

    Chapter 5 Errors Error Queue Events that generate command errors do not generate execution errors, device- specific errors, or query errors. Execution Error An <error number> in the range [ 200 to 299] indicates that an error has been detected by the Counter’ s execution control block. The occurrence of any error in this class causes the execution error bit (bit 4) in the Event Status Register to be set.
  • Page 316: Query Error

    Chapter 5 Errors Error Types Query Error An <error number> in the range [ 400 to 499] indicates that the output queue control of the Counter has detected a problem with the message exchange protocol. The occurrence of any error in this class should cause the query error bit (bit 2) in the Event Status Register to be set.
  • Page 317 Chapter 5 Errors Error Queue 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 318 Chapter 5 Errors Error Types Table 5-2. Errors (Continued) Number Error String Cause -151 Invalid string data A string data element was expected but was invalid for some reason. For example, an END message was received before the terminal quote character. -158 String data not allowed A string data element was encountered but was not allowed by the...
  • Page 319 Power-on self test detected this hardware failure. Self-test failed; EEPROM failure Power-on self test detected this hardware failure. Self-test failed; HP-IB failure Power-on self test detected this hardware failure. Self-test failed; QSPI failure Power-on self test detected this hardware failure.
  • Page 320 Chapter 5 Errors Error Types Table 5-2. Errors (Continued) Number Error String Cause -400 Query error This is the generic query error. -410 Query INTERRUPTED Indicates that a condition causing an INTERRUPTED Query error occurred. For example, a query followed by DAB or GET before a response was completely sent.
  • Page 321 3-27, 3-28 commands to set Counter for optimal CONFigure with INITiate and FETCh? throughput, 3-35 using, 4-76 common command CONFigure with READ format, 3-7 using, 4-76 syntax, 3-8 configuring the HP-IB, 3-4 common commands Programming Guide Index- 1...
  • Page 322 Group Execute Trigger, GET, 4-42 definition, 5-5 device-specific error How to Use This Guide, 1-6 status bit, 3-26 HP 53131A/132A SCPI Subsystem differences between firmware revisions, 1-3 Commands, 2-24 display, 4-38 HP Basic, using, 3-58 enable, 4-37 HP-IB...
  • Page 323 Index low-pass filter, 4-48 program, 3-14 interpolator response, 3-16 automatic calibration, 4-32 MINimum, 3-12, 4-19 calibration, 4-26, 4-33 minimum value, 3-11 multipliers, 3-13 key queue, 4-117 keyword, 3-9 N, 4-20 optional, 3-9 negative pulse width, 4-67, 4-89 separator, 3-9 negative transition filter register, 3-27 new line, 3-11, 3-18 non-decimal numeric, 3-11 Learning to Program the Counter, 1-7...
  • Page 324 Index power on status bit, 3-24, 3-26 recall, 4-136 power-on, 3-23, 3-26, 3-30 reference oscillator preset, 4-110 calibration, 4-34 print, 4-43 reference, oscillator, 4-92 prior firmware revisions Related Documentation, 1-10 3317, 3335, and 3402, 2-32 remote, 3-6 3317, 3335,and 3402, 4-81 reset, 4-137 program messages response message syntax, 3-16...
  • Page 325 :DISPlay, 4-37 flowchart, 3-41 :DISPlay:[WINDow]:TEXT summary of all registers, 3-19 :FEED, 4-38 stop, 3-10 :DISPlay:ENABle, 4-37 string, 3-11, 3-18 :DISPlay:MENU[:STATe], 4-37 HP BASIC, 3-58 :DISPlay[:WINDow]:TEXT parameters, 3-58 :RADix, 4-39 subsystem command :FETCh, 4-40 syntax, 3-8 :FORMat, 4-41 Subsystem Commands, 4-4...
  • Page 326 3-12 [:SENSe]:EVENt3, 4-84 unsecure, 4-28 [:SENSe]:FREQuency, 4-85 using internal reference status bit, 3-30, 3- [:SENSe]:FREQuency :EXPected[1|2|3], 4-88 using the scale and offset over HP-IB, 3-50 [:SENSe]:FREQuency :EXPected[1|2|3]:AUTO ON, 4-88 [:SENSe]:FUNCtion[:ON], 4-89 V, 3-12 [:SENSe]:PHASe, 4-91 version, SCPI, 4-118 [:SENSe]:ROSCillator, 4-92...
  • Page 327 Hewlett-Packard office or distributor in your country. Asia Pacific: In Europe, Africa, and Middle East, please Spain: Hewlett-Packard Asia Pacific Ltd. call your local HP sales office or 900 123 123 17-21/F Shell Tower, Times Square, representative: Sweden: 1 Matheson Street, Causeway Bay,...
  • Page 328 EN 27779. All data are the ANY INTERRUPTION OF HP. Buyer shall prepay shipping REMEDIES. HP SHALL NOT results from type test. THE PROTECTIVE charges to HP and HP shall pay BE LIABLE FOR ANY GROUNDING shipping charges to return the DIRECT, INDIRECT, Geräuschemission CONDUCTOR (INSIDE product to Buyer.
  • Page 330 Manual Part Number 53131-90044 Printed in U.S.A., NOVEMBER 1996...

This manual also for:

53131a53132a

Comments to this Manuals

Symbols: 0
Latest comments: