Page 3 - Programming Guide
This guide describes how to program the HP 53131A/132A 225 MHz UniversalCounter. The information in this guide applies to instruments having the numberprefix listed below, unless accompanied by a “Manual Updating Changes”package indicating otherwise. SERIAL NUMBER PREFIX: 3546 to 3622 (HP 53131A) 35...
Page 5 - Getting Started 1-6; Command Summary; Front Panel to SCPI Command Maps 2-3; Contents
Programming Guide iii 1 Before You Start ... Introduction 1-2 Differences Between Prior and Current Revisions of the HP 53131A/132A1-3 HP 53131A Containing Firmware Revisions (3317, 3335,or 3402) 1-3 HP 53132A Time Interval Delay Arming 1-5 Getting Started 1-6 How to Use This Guide 1-6 New Users 1-6...
Page 6 - Programming Your Universal Counter for; Overview of Command Types and Formats 3-7
Contents iv Programming Guide Calibration Menu to SCPI Command Map 2-18 HP 53131A/132A Command Summary 2-20 SCPI Conformance Information 2-20 IEEE 488.2 Common Commands 2-21 HP 53131A/132A SCPI Subsystem Commands 2-24 Std/New Column 2-24 Parameter Form Column 2-24 *RST Response 2-40 3 Programming Yo...
Page 7 - Using Multiple Commands 3-14
Contents Programming Guide v Suffixes 3-12 Suffix Elements 3-12 Suffix Multipliers 3-13 Command Terminator 3-13 Using Multiple Commands 3-14 Program Messages 3-14 Program Message Syntax 3-14 Overview of Response Message Formats 3-16 Response Messages 3-16 Response Message Syntax 3-16 Response Messag...
Page 8 - How to Program the Counter to Display Results 3-43
Contents vi Programming Guide Event Status Register 3-39 Using the Questionable Data/Signal Status Register to Alert the ComputerWhen Automatic Interpolator Calibration is Disabled— Example 3 3-39 Questionable Data Status Register 3-40 Using the Operation Status Register to Alert the Computer WhenMe...
Page 10 - Command Reference; Firmware Revision Work-Around Commands 4-77
Contents viii Programming Guide 4 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 :CALCulat...
Page 12 - Errors; Displaying Errors 5-2; Execution Error 5-5
Contents x Programming Guide *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 (Rese...
Page 14 - Introduction; for detailed information about front-
Chapter 1 Before You Start ... Introduction 1-2 Programming Guide Introduction This programming guide contains programming information for theHP 53131A/132A Universal Counter. This guide assumes you are familiar with the front-panel operation of the Counter.See the HP 53131A/132A Operating Guide for...
Page 15 - Programming Guide Contents; Differences Between Prior and Current Revisions; Calibrations; Utility; HP
Chapter 1 Before You Start ... Programming Guide Contents Programming Guide 1-3 Differences Between Prior and Current Revisions of the HP 53131A /132A If you have an HP 53131A containing one of the prior firmware revisions (3317,3335, or 3402), read the subsection below titled “HP 53131A ContainingF...
Page 16 - Differences Between Prior and Current Revisions of the HP; Measurements; menu item found in the; Stats
Chapter 1 Before You Start ... Differences Between Prior and Current Revisions of the HP 53131A/132A 1-4 Programming Guide Measurements If your Counter contains other than the current firmware revision, the followingmeasurement capabilities are different : • Ratio channel selections Ratio 2 to 1 and...
Page 17 - HP 53132A Time Interval De lay Arming
Chapter 1 Before You Start ... Programming Guide Contents Programming Guide 1-5 :CONFigure:TOTalize:TIMed:CONFigure:TOTalize:CONTinuous:MEASure:TOTalize:TIMed? If your Counter contains firmware revision s 3402 and below, the TotalizeMeasurement Instruction commands (shown above) are not avail able t...
Page 18 - Getting Started; A description of the guide contents.; How to Use This Guide; New Users; What You Should Understand; QuickBASIC, and Borland
Chapter 1 Before You Start ... Getting Started 1-6 Programming Guide Getting Started Before attempting to program the Counter, take some time to familiarize yourselfwith the content of this guide. The remainder of this chapter contains the followinginformation: • An explanation of how you should use...
Page 19 - Learning to Program the Counter; To learn how to program the Counter, perform the following:; Experienced Programmers
Chapter 1 Before You Start ... Programming Guide Contents Programming Guide 1-7 Learning to Program the Counter To learn how to program the Counter, perform the following: • Scan the summary tables in Chapter 2, “Command Summary ,”to get a feeling for the number and structure of commands available t...
Page 20 - Applications
Chapter 1 Before You Start ... How to Use This Guide 1-8 Programming Guide • Review the remaining information in this guide to determine what is applicableto your programming requirements. If you need more information than is contained in this guide, see the section in thischapter titled “Related Do...
Page 22 - Related Documentation; To obtain a copy of this standard, contact:
Chapter 1 Before You Start ... Related Documentation 1-10 Programming Guide Related Documentation This section contains a list of documentation related to the use of the Counter.Additional information that you may find useful can be found in the followingpublications: 1. HP 53131A/132A Operating Gui...
Page 25 - Command Summary; A Quick Reference
Page 26 - Chapter 2 Command Summary; Chapter Summary
Chapter 2 Command Summary Introduction 2-2 Programming Guide Introduction This chapter is a quick reference that summarizes the Counter ’s programmingcommands. Chapter Summary • Front Panel to SCPI Command Maps 1 pg. 2-3 – Some SCPI Syntax Conventions pg. 2-3 – Input Channels Conditioning Keys to SC...
Page 27 - Front Panel to SCPI Command Maps; Some SCPI Syntax Conventions; Means use either 1 or 2.
Chapter 2 Command Summary Front Panel to SCPI Command Maps Programming Guide 2-3 Front Panel to SCPI Command Maps Figures 2-1 through 2-6 provide maps that show the one-to-one relationship of thefront-panel keys and the SCPI commands. These maps should help withidentifying commands if you are alread...
Page 28 - Input Channels Conditioning Keys to SCPI Command Map
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-4 Programming Guide 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 Comma...
Page 32 - MEASURE Keys to SCPI Command Map
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-8 Programming Guide MEASURE Keys to SCPI Command Map Figure 2-3. MEASURE Keys to SCPI Command Map (Part 1 of 2)
Page 34 - Gate & ExtArm Key to SCPI Command Map
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-10 Programming Guide Gate & ExtArm Key to SCPI Command Map Freq, Period,Ratio (HP 53131A/132A) Phase (HP 53131A/132A) Totalize (HP 53131A/132A) Rise Time, FallTime,+/-Width,Dutycycle (HP 53131A/132A) TimeInterval (HP 53131A andHP 53132...
Page 36 - Totalize
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-12 Programming Guide Gate & ExtArm Key to SCPI Command Map (Cont.) Totalize Auto Arming: a. [:SENSe]:TOTalize:ARM[:STARt]:SOURce IMMediate[:SENSe]:TOTalize:ARM:STOP:SOURce IMMediate Time Arming: b1. [:SENSe]:TOTalize:ARM[:STARt]:SOURce...
Page 37 - Time Interval
Chapter 2 Command Summary Front Panel to SCPI Command Maps Programming Guide 2-13 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) Auto Arming: a. [:SENSe]:TINTerval:ARM[:STARt]:SOUR...
Page 40 - LIMITS and MATH Keys to SCPI Command Map
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-16 Programming Guide LIMITS and MATH Keys to SCPI Command Map Figure 2-5. LIMITS and MATH Keys to SCPI Command Map(Part 1 of 2)
Page 42 - Calibration Menu to SCPI Command Map
Chapter 2 Command Summary Front Panel to SCPI Command Maps 2-18 Programming Guide Calibration Menu to SCPI Command Map Figure 2-6. Calibration Menu to SCPI Command Map (Part 1 of 2)
Page 43 - The Calibration Menu is accessed by holding the; POWER
Chapter 2 Command Summary Front Panel to SCPI Command Maps Programming Guide 2-19 Calibration Menu to SCPI Command Map (Cont.) 1 a. :CALibration:SECurity:STATe? b. :DIAGnostic:CALibration:INPut1:OFFSet:AUTO ONCE:DIAGnostic:CALibration:INPut2:OFFSet:AUTO ONCE:DIAGnostic:CALibration:INPut1:GAIN:AUTO O...
Page 44 - SCPI Conformance Information
Chapter 2 Command Summary HP 53131A/132A Command Summary 2-20 Programming Guide HP 53131A/132A Command Summary This section summarizes both the IEEE 488.2 Common andHP 53131A/132A Standard Commands for Programmable Instruments (SCPI)commands in tabular format. IEEE 488.2 Common commands are listed f...
Page 48 - Parameter Form Column
Chapter 2 Command Summary HP 53131A/132A Command Summary 2-24 Programming Guide HP 53131A/132A SCPI Subsystem Commands SCPI Subsystem commands include all measurement functions and some generalpurpose functions. SCPI Subsystem Commands use a hierarchy relationshipbetween keywords that is indicated b...
Page 70 - Programming Examples; Where to Find Some Specific Information
Chapter 3 Programming Your Universal Counter for Remote Operation Introduction 3-2 Programming Guide Introduction This chapter provides remote operation setup, and programming information thathelps you operate the Counter as a remote device. Chapter Summary • Configuring the HP-IB pg. 3-4 • Overview...
Page 71 - Elements of SCPI Commands; Where to Find HP BASIC Programming Examples
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-3 • Parameter Separator, Query Parameters, Suffixes pg. 3-11 • Command Terminator pg. 3-13 • Program Messages pg. 3-14 • Response Messages, Response Message Syntax pg. 3-16 Where to Find H...
Page 72 - Configuring the HP-IB; To Set the HP-IB Mode and Address
Chapter 3 Programming Your Universal Counter for Remote Operation Configuring the HP-IB 3-4 Programming Guide Configuring the HP-IB This section gives information on connecting and configuring theHP-IB to enable remote operation of the Counter . The Counter has two HP-IB operating modes : • Addresse...
Page 73 - Enter; does not
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-5 3a To set the address to “15”, perform the following: a. Press s key. HP-IB: 0 3 is displayed. Note that “0” digit appears and is highlighted, indicating that this digit will change when...
Page 74 - To Connect the Counter to a Computer
Chapter 3 Programming Your Universal Counter for Remote Operation Configuring the HP-IB 3-6 Programming Guide To Connect the Counter to a Computer Connect the Counter to a computer by simply installing an HP-IB cable (such asan HP 10833A cable) between the two units as shown in Figure 3-1. Figure 3-...
Page 75 - Overview of Command Types and Formats; Common Command Format
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-7 Overview of Command Types and Formats There are two types of HP 53131A/132A programming commands: IEEE 488.2Common Commands and Standard Commands for Programmable Instruments(SCPI). The ...
Page 76 - Subsystem Command Syntax; Figure 3-2. Simplified Program Command Syntax Diagram; Common Command Syntax
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands 3-8 Programming Guide Elements of SCPI Commands A program command or query is composed of functional elements that include aheader (or keywords with colon separators), program data, and terminators . Theseele...
Page 77 - Figure 3-3. Simplified Common Command Syntax Diagram; Abbreviated Commands
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-9 NOTE: sp = space. ASCII character decimal 32 Figure 3-3. Simplified Common Command Syntax Diagram Abbreviated Commands The command syntax shows most keywords as a mixture of upper and lo...
Page 78 - Implied Channel (Optional Numeric Keyword Suffix); or
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands 3-10 Programming Guide 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 ’sf...
Page 79 - Parameter Types; Table 3-1. Command and Query Parameter Types
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-11 Parameter Types Table 3-1 contains explanations and examples of parameter types. Parametertypes may be numeric value, Boolean , literal, NRf, string , non-decimal numeric ,or arbitrary ...
Page 80 - Parameter Separator; For example, the following two commands are equivalent:; Suffix Elements
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands 3-12 Programming Guide Parameter Separator If you send more than one parameter with a single command, you must separateadjacent parameters with a comma . Query Parameters All selectable <numeric value> ...
Page 81 - Suffix Multipliers; Command Terminator
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-13 Suffix Multipliers Table 3-2 lists the suffix multipliers that can be used with suf fix elements (exceptPCT and DEG). Table 3-2. Suffix Multipliers DEFINITION MNEMONIC NAME 1E18 EX ETA ...
Page 82 - Using Multiple Commands; Program Messages; Figure 3-4. Simplified Program Message Syntax Diagram
Chapter 3 Programming Your Universal Counter for Remote Operation Using Multiple Commands 3-14 Programming Guide Using Multiple Commands Program Messages Program Messages are a combination of one or more properly formatted SCPICommands. Program messages always go from a computer to the Counter. They...
Page 84 - Overview of Response Message Formats; Response Messages; Figure 3-5. Simplified Response Message Syntax Diagram
Chapter 3 Programming Your Universal Counter for Remote Operation Overview of Response Message Formats 3-16 Programming Guide Overview of Response Message Formats Response Messages Response messages are data sent from the Counter to a computer in response to aquery. (A query is a command followed by...
Page 85 - Response Message Data Types; Table 3-3 contains explanations of response data types.
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-17 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 a...
Page 87 - Status Reporting
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-19 Status Reporting The HP 53131A/132A status registers conform to the SCPI and IEEE 488.2standards. Figure 3-6 shows all the status system register groups and queues in the Counter.This i...
Page 89 - Status Byte Register and Service Request Enable Register; Figure 3-7. Status Byte and Service Request Enable; Status Byte Register
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-21 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 i...
Page 90 - summarizes the Questionable Data/Signal Status Event
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-22 Programming Guide Table 3-4. Status Byte Register BIT WEIGHT SYMBOL DESCRIPTION 0 Not used 1 Not used 2 Not used 3 8 QSB Questionable Data/Signal Status RegisterSummary Bit 4 16 MAV Message Available Summary Bit ...
Page 91 - Service Request Enable Register
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-23 • Bit 5 (ESB) summarizes the Standard Event Status Register. This bit indicates whether or not one of the enabled Standard Event StatusRegister events have occurred since the last readi...
Page 92 - Standard Event Status Register Group; Figure 3-8. Standard Event Status Reporting; Standard Event Status Register; Table 3-5. Standard Event Status Register
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-24 Programming Guide 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 IEEE488.2-d...
Page 94 - Standard Event Status Enable Register
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-26 Programming Guide • 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 ...
Page 95 - Figure 3-9. Operation and Questionable Status Reporting Model
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-27 Operation Status Register Group and Questionable Data/SignalStatus Register Group The Operation Status Register Group and the Questionable Data/Signal StatusRegister Group each have a c...
Page 96 - Condition Register; To read the condition registers use:; Transition Filter
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-28 Programming Guide Condition Register A condition register continuously monitors the hardware and firmware status ofthe Counter. There is no latching or buffering for this register; it is updated in realtime. Read...
Page 97 - Event Register
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-29 Transition filters are unaffected by *CLS or queries. Transition filters are set todefault values by :STATus:PRESet and power-on. To write to the transitions filter registers use: :STAT...
Page 98 - Operation Status Register Group; is a condition bit which indicates the Counter is
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-30 Programming Guide Operation Status Register Group The Operation Status Register Group monitors conditions which are part of theCounter’s normal operation. Table 3-7 lists the Operation Status Register bits and br...
Page 100 - Questionable Data/Signal Status Register Group
Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3-32 Programming Guide Note that this is the only bit in the Operation Status Register which is notrepresenting a condition . Therefore, the transition filters have no effect on this bit. The Counter does not monitor ...
Page 103 - Command Settings for Optimizing Throughput; Commands to Set Counter for Optimal Throughput; All of these settings are reset by *RST or a power cycle.; Set gate/arm to auto for appropriate measurement:
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-35 Command Settings for Optimizing Throughput This section lists the commands which enable the Counter to transfer data at thefastest possible rate. See the “To Optimize Throughput” sample...
Page 104 - Disable automatic interpolator calibration:; Issue the following query and read the response.; Typical Optimizing Throughput Results for Different Computers
Chapter 3 Programming Your Universal Counter for Remote Operation Command Settings for Optimizing Throughput 3-36 Programming Guide Set reference oscillator to non-auto state (internal or external): [:SENSe]:ROSCillator:SOURce INTernal | EXTernal (See Note below.) Disable checking of external source...
Page 106 - How to Program the Counter for Status Reporting; How to Program the Counter for Status; Determining the Condition of the Counter
Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Status Reporting 3-38 Programming Guide How to Program the Counter for Status Reporting Determining the Condition of the Counter The Counter has status registers that are used to indicate its condition. ...
Page 107 - Event Status Register; Enable for bad command.
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-39 Using the Standard Event Status Register to Trap an IncorrectHP-IB command— Example 2 The following command grouping shows how to use the Standard Event StatusRegister and the Status By...
Page 108 - Questionable Data Status Register; Assert SRQ on Questionable Summary bit.; Operation Status Register; Assert SRQ on Operation Summary bit.
Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Status Reporting 3-40 Programming Guide Questionable Data Status Register :STAT:QUES:PTR 100; NTR 0 :STAT:QUES:ENABLE 100 *SRE 8 Detect transition from non-questionable toquestionable data.Enable to dete...
Page 111 - How to Program the Counter to Display Results; Configuring the Counter ’s Display; The Counter has five different display modes:; Commands for Displaying Non-Scaled/Offset Results
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-43 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 int...
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 3-44 Programming Guide Commands for Displaying Scaled/Offset Results The following lines will enable Math (scale/offset). It is assumed that the valuesfor scale and offset are already set....
Page 113 - Commands for Enabling and Disabling the Display
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-45 Commands for Enabling and Disabling the Display The Counter display can be turned on or off. The normal condition is for thedisplay to be on. To achieve maximum HP-IB throughput,the dis...
Page 114 - How to Program the Counter to Synchronize Measurements; How to Program the Counter to Synchronize; Synchronizing Measurement Completion; Using the *WAI command; Resetting the Counter and Clearing the HP-IB Interface; Issue the following commands:; Using the *WAI Command
Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter to Synchronize Measurements 3-46 Programming Guide How to Program the Counter to Synchronize Measurements Synchronizing Measurement Completion The Counter has three different methods for synchronizing the en...
Page 115 - Using the *OPC Command to Assert SRQ
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-47 :CALC3:AVERAGE ON :CALC3:AVERAGE:COUNT 50 :TRIG:COUNT:AUTO ON :INIT *WAI :CALC3:AVERAGE:ALL? Enable statistics. Base statistics on 50 measurements. On INIT, take 50 measurements. Start ...
Page 117 - How to Program the Counter for Math/Limit; Updating Math and Limit Results Over HP-IB; One of the things this command; automatic; post-processing of Limit and Math operations; automatically; updated to reflect the Limit or Math values; new
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-49 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) op...
Page 118 - How to Program the Counter for Math/Limit Operations; Using the Scale and Offset Over HP-IB
Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Math/Limit Operations 3-50 Programming Guide results are calculated. The only drawback with this command is that you mustalways send it when you change the limits or scale/offset values. The section in t...
Page 120 - How to Program the Counter to Define Macros; They provide a mnemonic for long or complex commands.
Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter to Define Macros 3-52 Programming Guide How to Program the Counter to Define Macros A macro is a user defined command that can be used to replace one or manyCounter commands. There are two good reasons to us...
Page 123 - Writing SCPI Programs
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-55 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 aprogram. You do not h...
Page 126 - HP BASIC; Using HP BASIC; To Send a Double-Quoted String; Note the pair of single quotes (as shown in bold) is more readable.
Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples 3-58 Programming Guide Programming Examples In this section, you will see how to program the HP 53131A/132A to make manycommon measurements. Examples are provided in the following programminglanguages: • HP BASIC ...
Page 127 - Using QuickBASIC; NOTE
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-59 Using QuickBASIC The QuickBASIC examples assume you have an HP 82335AHP-IB Interface card inside your IBM PC or compatible. Using Turbo C The Turbo C examples assume you have an HP 8233...
Page 128 - Easiest Way to Make a Measurement (HP BASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples 3-60 Programming Guide Easiest Way to Make a Measurement (HP BASIC) 10 ! This program shows how to use the MEASure group of instructions to20 ! quickly and easily make any of the counter's measurements.30 ! In thi...
Page 130 - To Make a Frequency Measurement (HP BASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples 3-62 Programming Guide To Make a Frequency Measurement (HP BASIC) 10 ! This program sets up the counter to make 10 frequency20 ! measurements on channel 1, using a 0.1 second gate time.30 ! The results are display...
Page 137 - To Perform a Time Interval Calibration (HP BASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-69 To Perform a Time Interval Calibration (HP BASIC) Early versions of the Counter cannot execute this program since they do notsupport calibration security or “fine” time interval calibra...
Page 145 - To Make a Frequency Measurement (QuickBASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-77 To Make a Frequency Measurement (QuickBASIC) 'This program sets up the counter to make 10 frequency measurements'on channel 1 using a 0.1 second gate time.'The results are printed on th...
Page 148 - To Measure the Statistics of 50 Measurements (QuickBASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Programming Examples 3-80 Programming Guide To Measure the Statistics of 50 Measurements (QuickBASIC) 'This program instructs the counter to take 50 period measurements'and return the mean, minimum, maximum and standard deviation.'The...
Page 153 - To Read and Store Calibration Data (QuickBASIC)
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-85 To Read and Store Calibration Data (QuickBASIC) 'Before calibrating the counter, it is a good idea to read'and store the current calibration values in case something goes wrong with'the...
Page 159 - To Make a Frequency Measurement (Turbo C)
Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3-91 To Make a Frequency Measurement (Turbo C) /* This program sets up the counter to make 10 freqeuncy measurements on channel 1, using a 0.1 second gate time. The results are displayed on ...
Page 167 - Command Reference; A Dictionary
Page 168 - Chapter 4 Command Reference; event
Chapter 4 Command Reference Introduction 4-2 Programming Guide Introduction This chapter describes the SCPI Subsystem commands and the IEEE 488.2Common commands for the HP 53131A/132A 225 MHz Universal Counter. Theinformation in this chapter will help you program the Counter over the HP-IB. The comm...
Page 170 - Stop
Chapter 4 Command Reference :ABORt Command 4-4 Programming Guide :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...
Page 171 - :CALCulate Subsystems
Chapter 4 Command Reference Introduction Programming Guide 4-5 :CALCulate Subsystems Three :CALCulate subsystems (:CALCulate[1], :CALCulate2,and :CALCulate3) perform post-acquisition data processing and data transfer ofthe corresponding results. Functions in the SENSe subsystem are related to dataac...
Page 172 - :CALCulate Subsystems
Chapter 4 Command Reference :CALCulate Subsystems 4-6 Programming Guide Figure 4-1. The CALCulate Subsystems
Page 176 - Sets or queries the math enable .
Chapter 4 Command Reference :CALCulate[1] Subsystem 4-10 Programming Guide :CALCulate[1]:MATH[:EXPRession][:DEFine]? Queries equation used for math operation. A sequence of ASCII-encoded bytes: (“SENS” * SCALE + OFFSET) terminated with a new line and EOI. • Query only. • This query should be the las...
Page 177 - :CALCulate2 Subsystem; Sets or queries the data flow to be fed into the CALCulate2 block.
Chapter 4 Command Reference Introduction Programming Guide 4-11 :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 :CALCulate2settings be used. :CALCulate2:FEED “[:]CALCulate[1]” Sets or queri...
Page 178 - :CALCulate2 Subsystem
Chapter 4 Command Reference :CALCulate2 Subsystem 4-12 Programming Guide :CALCulate2:IMMediate:AUTO <Boolean> Sets or queries whether post-processing (recalculation) will automatically occurwhenever any changes are made to the :CALCulate[1|2] subsystems. With :CALC2:IMM:AUTO set to OFF, CALCul...
Page 179 - Limit; This command is an event that causes the Counter to
Chapter 4 Command Reference Introduction Programming Guide 4-13 :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. • Single ASCII-encoded byte, 0 or 1. • A value of 0 indicates...
Page 183 - Limit Modes
Chapter 4 Command Reference Introduction Programming Guide 4-17 :CALCulate2:LIMit:PCOunt[:TOTal]? Queries the total Pass COunt (that is, the number of measurements that passed thelimit test). • Numerical data transferred as ASCII bytes in <NR1> format. • If CALC2:LIM:STATe is OFF, 0 is returne...
Page 185 - :CALCulate3 Subsystem; values are returned and error -221 is generated.
Chapter 4 Command Reference Introduction Programming Guide 4-19 :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:CALCulate3:LFILter settings be used. Not until :CALCulate3:AVERage...
Page 186 - :CALCulate3 Subsystem
Chapter 4 Command Reference :CALCulate3 Subsystem 4-20 Programming Guide • If the current measurement is Totalize or Voltage Peaks, Not a Number 9.91E37 is returned and error -221 is generated. • Query only. • The last calculated result remains valid until a new computation is made or arelevant inst...
Page 190 - A value of 0 indicates OFF a value of 1 indicates ON.
Chapter 4 Command Reference :CALCulate3 Subsystem 4-24 Programming Guide Numeric data transferred as ASCII bytes in <NR3> format with eleven significantdigits. • *RST: 0.0000000000 • This command couples :CALC2:LIM:LOW to the same value. • Updating the lower limit value causes the limit counts...
Page 192 - :CALibration Subsystem; This query causes an internal interpolator self-calibration .
Chapter 4 Command Reference :CALibration Subsystem 4-26 Programming Guide :CALibration Subsystem :CALibration[:ALL]? This query causes an internal interpolator self-calibration . • Numeric data transferred as ASCII bytes in <NR1> format. • A value of zero indicates the calibration completed wi...
Page 196 - :CONFigure Subsystem
Chapter 4 Command Reference :CONFigure Subsystem 4-30 Programming Guide :CONFigure Subsystem Refer to the Measurement Instructions section on page 4-52 in this chapter for adescription of :CONFigure.
Page 197 - Device Clear; clears the input buffer and Output Queue,
Chapter 4 Command Reference Introduction Programming Guide 4-31 Device Clear Device Clear The full capability of the Device Clear IEEE 488.1 interface function isimplemented in the Counter. This function allows a device to be initialized to acleared state. The device-dependent effect is described be...
Page 198 - :DIAGnostic Subsystem; This subsystem controls the remote calibration of the Counter.
Chapter 4 Command Reference :DIAGnostic Subsystem 4-32 Programming Guide :DIAGnostic Subsystem This subsystem controls the remote calibration of the Counter. All of the calibration values, with the exception of the interpolator values, arestored in non-volatile memory and are unaffected bypower-on, ...
Page 208 - Group Execute Trigger
Chapter 4 Command Reference Group Execute Trigger (GET) 4-42 Programming Guide Group Execute Trigger (GET) The full capability of the Group Execute Trigger IEEE 488.1 interface function isimplemented in the Counter. This function permits the Counter to have itsoperation initiated over the Bus. Thede...
Page 209 - Print
Chapter 4 Command Reference Introduction Programming Guide 4-43 :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 statis...
Page 211 - – sets the Limit-Detect output to the in-limit voltage level.
Chapter 4 Command Reference Introduction Programming Guide 4-45 • *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 ...
Page 213 - Single
Chapter 4 Command Reference Introduction Programming Guide 4-47 • When :TRIG:COUN:AUTO is ON and :CAL3:AVER[:STAT] is ON, theCounter 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 ifINITiate:CONTi...
Page 226 - Descriptions of the Measurement Functions— ; , refer to the subsection
Chapter 4 Command Reference Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ) 4-60 Programming Guide Descriptions of the Measurement Functions— <function> This sub-section provides a description of each measurement function (that is,[:VOLTage]:FREQuency, [:VOLTage]:FREQuency:RATio...
Page 241 - How to Use the Measurement Instruction Commands; Also the channel numbers can be specified if you send, for example:
Chapter 4 Command Reference Introduction Programming Guide 4-75 How to Use the Measurement Instruction Commands The Measure Instruction commands have a different level of compatibility andflexibility than other commands. The parameters used with commands from theMeasure Instruction describe the sign...
Page 243 - Firmware Revision Work-Around Commands
Chapter 4 Command Reference Introduction Programming Guide 4-77 How to Use the Measurement Instruction Commands (Cont.) Use :SENS:EVEN:LEV 0V to set the trigger level to 0 Volts. Use :INITIATE to start the measurement. Use :FETCH? to query for result. Firmware Revision Work-Around Commands The follo...
Page 247 - Current Firmware Revision
Chapter 4 Command Reference Introduction Programming Guide 4-81 [:SENSe]:EVENt2:FEED “[:]INPut[1] | [:]INPut2 ” Sets or queries the common/separate enable. Feeding the :INPut2 subsystem to the [:SENSe]:EVENt2 subsystem correspondsto separate; feeding the :INPut1 subsystem to the [:SENSe]:EVENt2 subs...
Page 251 - A sequence of ASCII-encoded bytes: POS or NEG
Chapter 4 Command Reference Introduction Programming Guide 4-85 [:SENSe]:EVENt3:SLOPe? Queries which edge of channel 3 input port will be considered an event. A sequence of ASCII-encoded bytes: POS [:SENSe]:FREQuency Subtree This subtree controls the Frequency, Frequency Ratio, and Period measuringc...
Page 259 - Ref
Chapter 4 Command Reference Introduction Programming Guide 4-93 A sequence of ASCII-encoded bytes: ON or OFF • *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 ...
Page 260 - Ref In; rear-panel connector. Note that the HP 53132A only accepts 10 MHz.
Chapter 4 Command Reference [:SENSe] Subsystem 4-94 Programming Guide • Execution of the command (that is, explicitly selecting internal or externaltimebase) sets [:SENS]:ROSC:SOUR:AUTO to OFF. • The query can be used to determine the current reference timebase when[:SENS]:ROSC:SOUR:AUTO is ON. That...
Page 266 - NEGative; EXTernal; A sequence of ASCII-encoded bytes: IMM or EXT
Chapter 4 Command Reference [:SENSe] Subsystem 4-100 Programming Guide [:SENSe]:TINTerval:ARM:ESTART:LAYer2:SLOPe POSitive | NEGative Sets or queries the slope of the external start arm signal used in external armingtime interval (including Time Interval, Risetime, Falltime, Duty Cycle, and PulseWid...
Page 273 - Figure 4-2. The Operation Status Register Group; Queries the status of the Operation Condition Status Register.
Chapter 4 Command Reference Introduction Programming Guide 4-107 :STATus Subsystem The :STATus subsystem commands allow you to specify or examine the status ofthe Operation Status Register group and the Questionable Data/Signal Registergroup. :STATus:OPERation Subtree The :STATus:OPERation subtree c...
Page 276 - Figure 4-3. The Questionable Data/Signal Status Register Group
Chapter 4 Command Reference :STATus Subsystem 4-110 Programming Guide • At power-on and STAT:PRES, the positive transition filter is preset such thateach bit is a 1 (TRUE). • This value is unaffected by *RST and save/recall. :STATus:PRESet This event command presets the enable registers and transiti...
Page 285 - Sets or queries the offset value.
Chapter 4 Command Reference Introduction Programming Guide 4-119 :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 ...
Page 286 - key, while this value is displayed, will update the actual
Chapter 4 Command Reference :TRACe Subsystem 4-120 Programming Guide Scale & Offset :TRACe[:DATA] SCALE, <numeric_value> or:TRACe[:DATA] SCALE, <arbitrary block> :TRACe[:DATA]? SCALE Sets or queries the scale value. -9.999999E+12 to -1.000000E-13, 0.000000, +1.000000E-13 to+9.999999E...
Page 293 - Figure 4-4. The Standard Event Status Enable Register
Chapter 4 Command Reference Introduction Programming Guide 4-127 *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 v...
Page 294 - Figure 4-5. Standard Event Status Register
Chapter 4 Command Reference *ESR? (Event Status Register Query) 4-128 Programming Guide *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 bitcorrespond to a specific cond...
Page 298 - Note —; This event command has no query form.
Chapter 4 Command Reference *OPC (Operation Complete Command) 4-132 Programming Guide *OPC (Operation Complete Command) *OPC This event command enables the OPC bit (bit 0) in the Standard Event StatusRegister to be set upon the transition of the measurement cycle from measuring toidle. ( Note — For ...
Page 305 - Figure 4-6. The Service Request Enable Register; The value of bit 6 and unused bits is ignored when set.
Chapter 4 Command Reference Introduction Programming Guide 4-139 *SRE <NRf> (Service Request Enable Command) *SRE?(Service Request Enable Query) *SRE <NRf> *SRE? Sets or queries the Service Request Enable Register , shown inFigure 4-6. The parameter and query response value, when rounded...
Page 312 - Chapter 5 Errors; message will appear on the; Reading an Error; error number; An example response is:
Chapter 5 Errors Introduction 5-2 Programming Guide Introduction This chapter explains how to read any errors from the Counter, discusses the typesof errors, and provides a table of all of the Counter ’s errors and their probablecauses. Displaying Errors When an HP-IB error is detected, the HP-IB XX...
Page 313 - Error Queue; Any time the queue overflows, the least recent errors
Chapter 5 Errors Error Queue Programming Guide 5-3 10 ASSIGN @Cntr TO 70320 !Assign path name30 DIM Err_string$[255]40 !Creates array for error string50 REPEAT60 !Repeats until error queue is empty70 OUTPUT @Cntr;“SYST:ERR?” 80 !Read error number and string 90 ENTER @Cntr;Err_num,Err_string$ 100 !En...
Page 314 - Error Types; No Error; indicates that the Counter has no; Command Error
Chapter 5 Errors Error Types 5-4 Programming Guide 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 +0 No Error − 100 to − 199 Command Errors − 200 to − 299 Execution Errors − 300 to − ...
Page 315 - Execution Error; 99] indicates that an error has been
Chapter 5 Errors Error Queue Programming Guide 5-5 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 executio...
Page 316 - Query Error; 99] indicates that the output queue
Chapter 5 Errors Error Types 5-6 Programming Guide 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 erro...
Page 321 - Index
Programming Guide Index- 1 9.91E37, 3-17 A abort, 4-4abbreviated commands, 3-9address, HP-IB, 3-4Applications, 1-8arbitrary block, 3-11ASCII, 4-41ASCII format, 3-59Assumptions, 1-9auto-trigger, 4-44, 4-45, 4-83 B Boolean, 3-11 C calibrating status bit, 3-30calibration, 4-26 reference oscillator, 4-3...