Page
Page
Page
Page
1 Before You Start
Command Summary
Remote
Operation
Status Reporting
How to Program the Counter for Status Reporting
How to Program the Counter to Display Results
How to Program the Counter to Synchronize Measurements
Operations
Writing SCPI Programs
Page
4 Command Reference
:STATus Subsystem
:SYSTem Subsystem
:TRACe Subsystem
Command)
*DMC <string>, <arbitrary block
5 Errors
Page
Page
NOTE
Programming Guide Contents
HP 53131A Containing Firmware Revisions (3317, 3335, or 3402)
Calibrations
Utility
Differences Between Prior and Current Revisions of the HP
53131A/132A
Measurements
Statistics
ON SINGLE:
:CONFigure:TOTalize:TIMed
:CONFigure:TOTalize:CONTinuous
:MEASure:TOTalize:TIMed
HP 53132A Time Interval De lay Arming
Getting Started
New Users
What You Should Understand
Learning to Program the Counter
Experienced Programmers
How to Use This Guide
Applications
∙Table of Contents
Before You Start
Command Summary
Command Reference
Errors
Related Documentation
Page
Page
Page
Page
Front Panel to SCPI Command Maps
Some SCPI Syntax Conventions
Input Channels Conditioning Keys to SCPI Command Map
Input Channels Conditioning Keys to SCPI Command Map (Cont.)
Figure 2-1.Input Channels Conditioning Keys to SCPI Command Map (Part 2 of 2)
Instrument Control, Utility, Recall, and Save & Print Keys to SCPI Command Map
Page
MEASURE Keys to SCPI Command Map
MEASURE Keys to SCPI Command Map (Cont.)
Figure 2-3.MEASURE Keys to SCPI Command Map (Part 2 of 2)
Gate & ExtArm Key to SCPI Command Map
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 1 of 6)
Gate & ExtArm Key to SCPI Command Map (Cont.)
Freq, Period, Ratio
Phase
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 2 of 6)
Totalize
Rise Time, Fall Time, +/- Pulse Width, Dutycycle
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 3 of 6)
Time Interval
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 4 of 6)
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 5 of 6)
Figure 2-4.Gate & ExtArm Key to SCPI Command Map (Part 6 of 6)
LIMITS and MATH Keys to SCPI Command Map
LIMITS and MATH Keys to SCPI Command Map (Cont.)
Figure 2-5.LIMITS and MATH Keys to SCPI Command Map (Part 2 of 2)
Calibration Menu to SCPI Command Map
Calibration Menu to SCPI Command Map (Cont.)
Scale & Offset
Figure 2-6.Calibration Menu to SCPI Command Map (Part 2 of 2)
HP 53131A/132A Command Summary
SCPI Conformance Information
IEEE 488.2 Common Commands
Table 2-1.IEEE 488.2 Common Commands
Table 2-1.IEEE 488.2 Common Commands (Continued)
HP 53131A/132A SCPI Subsystem Commands
is a “Query Only” command
Std/New Column
Std/New
Parameter Form Column
Table 2-2.HP 53131A/132A SCPI Command Summary
Table 2-2.HP 53131A/132A SCPI Command Summary (Continued)
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Table 2-2A.HP 53132A (S/N Prefix 3646 and Above) Time Interval
Arming SCPI Command Summary
Arming SCPI Command Summary (Continued)
*RST Response
Table 2-3.HP 53131A /132A *RST State
Table 2-3.HP 53131A/132A *RST State (Continued)
Table 2-3B.HP 53132A (S/N 3646 and above) Time Interval *RST
State
Table 2-4.Unaffected by *RST
Page
Page
∙ Programming Examples
Where to Find Some Specific Information
Elements of SCPI Commands
Where to Find HP BASIC Programming Examples
Where to Find QuickBASIC Programming Examples
Where to Find Turbo C Programming Examples
Configuring the HP-IB
To Set the HP-IBMode and Address
Recall (Utility)
HP-IB
HP-IB:
TALK
Enter
BE SURE to press the Enter key to complete the entry
To Connect the Counter to a Computer
Figure 3-1. HP-IBInterconnection
Remote/Local Operation
Save & Print
Common Command Format
SCPI Command and Query Format
Subsystem Command Syntax
Figure 3-2.Simplified Program Command Syntax Diagram
Common Command Syntax
Figure 3-3.Simplified Common Command Syntax Diagram
Abbreviated Commands
Keyword Separator
Optional Keyword
Implied Channel (Optional Numeric Keyword Suffix)
Parameter Types
Table 3-1.Command and Query Parameter Types
Parameter Separator
Query Parameters
Suffixes
Suffix Elements
Suffix Multipliers
Table 3-2.Suffix Multipliers
Command Terminator
Using Multiple Commands
Program Messages
Program Message Syntax
Figure 3-4.Simplified Program Message Syntax Diagram
Page
Overview of Response Message Formats
Response Messages
Response Message Syntax
Figure 3-5.Simplified Response Message Syntax Diagram
Response Message Data Types
Table 3-3.Response Message Data Types
Table 3-3.Response Message Data Types (Continued)
Page
Status Reporting
Figure 3-6.HP 53131A/132A SCPI Status Reporting Summary Functional Diagram
Status Byte Register and Service Request Enable Register
Figure 3-7.Status Byte and Service Request Enable
Status Byte Register
Table 3-4.Status Byte Register
Bits
0–2
Bit 3 (QSB)
Bit 4 (MAV)
Bit 5 (ESB)
Bit 6 (RQS/MSS)
Bit 7 (OSB)
Service Request Enable Register
Standard Event Status Register Group
Figure 3-8.Standard Event Status Reporting
Standard Event Status Register
Table 3-5.Standard Event Status Register
Bit 0 (Operation Complete)
Bit
Bit 2 (Query Error)
(Device-Specific
Error)
Bit 4 (Execution Error)
Bit 5 (Command Error)
Bit 7 (Power On)
Figure 3-9.Operation and Questionable Status Reporting Model
Condition Register
Transition Filter
Table 3-6.Transition Filter Definition
Event Register
Event Enable Register
Operation Status Register Group
Table 3-7.Operation Status Register
Bit 0 (Calibrating)
1–3
Bit 4 (Measuring)
5–7
Bit 8 (Computing Statistics)
Bit 9 (Using Internal Reference)
11–15
Questionable Data/Signal Status Register Group
Table 3-8.Questionable Data/Signal Status Register
0–1
Bit 2 (Time)
3–4
Bit 5 (Frequency)
Bit 6 (Phase)
Bit 10 (Out of Limit Event)
11–13
Bit 14 (Command Warning)
Commands to Set Counter for Optimal Throughput
Disable auto trigger on measurement channel(s):
Set gate/arm to auto for appropriate measurement:
Define device trigger to FETC?:
Command Settings for Optimizing Throughput
Set reference oscillator to non-autostate (internal or external):
Disable checking of external source if using external reference oscillator:
Disable display:
Disable printing:
Table 3-9.Typical Optimizing Throughput Results in Measurements per Second
How to Program the Counter for Status Reporting
Determining the Condition of the Counter
Resetting the Counter and Clearing the HP-IBInterface— Example
Event Status Register
Questionable Data Status Register
Example
Operation Status Register
Figure 3-10.Status Reporting Flowchart (1 of 2)
Figure 3-10.Status Reporting Flowchart (2 of 2)
Configuring the Counter ’s Display
Commands for Displaying Non-Scaled/OffsetResults
How to Program the Counter to Display Results
Commands for Displaying Scaled/Offset Results
Commands for Displaying the Limit Graph
Commands for Displaying Statistics Results
Commands for Enabling and Disabling the Display
How to Program the Counter to Synchronize Measurements
Synchronizing Measurement Completion
Resetting the Counter and Clearing the HP-IBInterface
Using the *WAI Command
Using the *OPC? Command
Using the *OPC Command to Assert SRQ
Page
Updating Math and Limit Results Over HP-IB
One of the things this command does is disable the
automatic
automatically
How to Program the Counter for Math/Limit Operations
Using the Scale and Offset Over HP-IB
Page
How to Program the Counter to Define Macros
Page
Page
Page
Writing SCPI Programs
Figure 3-11.SCPI Programming Flowchart (Sheet 1 of 2)
Figure 3-11.SCPI Programming Flowchart (Sheet 2 of 2)
Programming Examples
Using HP BASIC
To Send a Double-QuotedString
To Send a Single-QuotedString
Using QuickBASIC
Using Turbo C
List of the Programming Examples
Easiest Way to Make a Measurement (HP BASIC)
Easiest Way to Make a Measurement (HP BASIC) (Continued)
To Make a Frequency Measurement (HP BASIC)
To Perform Limit Testing (HP BASIC)
To Measure the Statistics of 50 Measurements (HP BASIC)
To Measure the Statistics of 50 Measurements
(HP BASIC) (Continued)
To Use Limits to Filter Data Before Measuring Stats (HP
BASIC)
BASIC) (Continued)
To Read and Store Calibration Information (HP BASIC)
To Perform a Time Interval Calibration (HP BASIC)
To Perform a Time Interval Calibration (HP BASIC) (Continued)
Page
(Continued)
To Optimize Throughput (HP BASIC)
To Optimize Throughput (HP BASIC) (Continued)
To Use Macros (HP BASIC)
To Use Macros (HP BASIC) (Continued)
To Make a Frequency Measurement (QuickBASIC)
To Perform Limit Testing (QuickBASIC)
To Perform Limit Testing (QuickBASIC) (Continued)
To Measure the Statistics of 50 Measurements (QuickBASIC)
To Measure the Statistics of 50 Measurements (QuickBASIC) (Continued)
To Use Limits to Filter Data Before Measuring Stats (QuickBASIC)
To Use Limits to Filter Data Before Measuring Stats (QuickBASIC) (Continued)
Page
To Read and Store Calibration Data (QuickBASIC)
To Optimize Throughput (QuickBASIC)
To Optimize Throughput (QuickBASIC) (Continued)
To Use Macros (QuickBASIC)
To Use Macros (QuickBASIC) (Continued)
Page
To Make a Frequency Measurement (Turbo C)
To Make a Frequency Measurement (Turbo C) (Continued)
To Use Limits to Filter Data Before Measuring Statistics (Turbo C)
To Use Limits to Filter Data Before Measuring Statistics (Turbo C) (Continued)
Page
To Optimize Throughput (Turbo C)
To Optimize Throughput (Turbo C) (Continued)
Page
Page
Page
Page
:ABORt
Page
Page
:CALCulate[1]:DATA
:CALCulate[1]:FEED “[:]SENSe[1]”
:CALCulate[1]:IMMediate
:CALCulate[1]:IMMediate:AUTO <Boolean
:CALCulate[1]:MATH[:EXPRession]:CATalog
:CALCulate[1]:MATH[:EXPRession][:DEFine]
:CALCulate[1]:MATH[:EXPRession]:NAME SCALE_OFFSET or
:CALCulate[1]:MATH[:EXPRession]:SELect SCALE_OFFSET
:CALCulate[1]:MATH:STATe <Boolean
:CALCulate2:FEED “[:]CALCulate[1]”
:CALCulate2:IMMediate
:CALCulate2:IMMediate:AUTO <Boolean
:CALCulate2:LIMit:CLEar:AUTO <Boolean
:CALCulate2:LIMit:CLEar[:IMMediate]
:CALCulate2:LIMit:DISPlay GRAPh | NUMBer
:CALCulate2:LIMit:FAIL
:CALCulate2:LIMit:FCOunt:LOWer
:CALCulate2:LIMit:FCOunt[:TOTal]
:CALCulate2:LIMit:FCOunt:UPPer
:CALCulate2:LIMit:LOWer[:DATA] <numeric_value> [HZ | S |DEG]
:CALCulate2:LIMit:PCOunt[:TOTal]
:CALCulate2:LIMit:STATe <Boolean
:CALCulate2:LIMit:UPPer[:DATA] <numeric_value> [HZ | S | DEG]
:CALCulate3:AVERage:ALL
:CALCulate3:AVERage:CLEar
:CALCulate3:AVERage:COUNt <numeric_value
:CALCulate3:AVERage:COUNt:CURRent
:CALCulate3:AVERage[:STATe] <Boolean
:CALCulate3:AVERage:TYPE MAXimum | MINimum | SDEViation | SCALar or MEAN
:CALCulate3:DATA
:CALCulate3:FEED “[:]CALCulate[1]”
:CALCulate3:LFILter:LOWer[:DATA] <numeric_value> [HZ | S |DEG]
:CALCulate3:LFILter:STATe <Boolean
:CALCulate3:LFILter:UPPer[:DATA] <numeric_value> [HZ | S | DEG]
:CALCulate3:PATH
:CALibration[:ALL]
:CALibration:COUNt
:CALibration:DATA <arbitrary block
:CALibration:SECurity:CODE <NRf
:CALibration:SECurity:STATe <Boolean>, <NRf
Page
:CONFigure Subsystem
Device Clear
:DIAGnostic:CALibration:INPut[1|2]:GAIN:
AUTO ONCE | OFF
:DIAGnostic:CALibration:INPut[1|2]:OFFSet:
:DIAGnostic:CALibration:INTerpolator:AUTO ONCE | OFF |ON
:DIAGnostic:CALibration:ROSCillator:AUTO ONCE | OFF
:DIAGnostic:CALibration:STATus
:DIAGnostic:CALibration:TINTerval:FINE[1|2|3|4]
:DIAGnostic:CALibration:TINTerval:QUICk
:DISPlay:ENABle <Boolean
:DISPlay:MENU[:STATe] OFF
:DISPlay[:WINDow]:TEXT:FEED “[:]CALCulate2” | “[:]CALCulate3”
:DISPlay[:WINDow]:TEXT:RADix COMMa | DPOint
:FETCh Subsystem
:FORMat[:DATA] ASCii | REAL
Group Execute Trigger
(GET)
:HCOPy:CONTinuous <Boolean
:INITiate:AUTO <Boolean
:INITiate:CONTinuous <Boolean
Page
:INITiate[:IMMediate]
Stop/Single
:INPut[1|2]:ATTenuation 1 |
:INPut[1|2]:COUPling AC | DC
:INPut[1|2]:FILTer[:LPASs][:STATe] <Boolean
:INPut[1|2]:IMPedance <numeric_value> [OHM]
:INPut3:COUPling
:INPut3:IMPedance
Page
Measurement Instructions (:CONFigure, :FETCh, :MEASure, :READ)
:CONFigure[:SCALar]:<function> <parameters> [,<source_list>]
:CONFigure
FETCh[[:SCALar]:<function>]
:MEASure[:SCALar]:<function>? <parameters> [,<source_list>]
:READ[[:SCALar]:<function>]
Page
Page
Descriptions of the Measurement Functions— <function
Firmware Revision
CAUTION
:MEASure[:SCALar][:VOLTage]:DCYCle? [<reference>][,(@1)]
Page
:MEASure[:SCALar][:VOLTage]:FALL:TIME? (Cont.)
:MEASure[:SCALar][:VOLTage]:FREQuency? (Cont.)
:MEASure[:SCALar][:VOLTage]:FREQuency:RATio? [<expected_value>[,<resolution>]]
[, (@1), (@2) | (@1), (@3) | (@2), (@1) | (@3), (@1) ]
:MEASure[:SCALar][:VOLTage]:FREQuency:RATio? (Cont.)
:MEASure[:SCALar][:VOLTage]:MAXimum? [(@1)|(@2)]
:MEASure[:SCALar][:VOLTage]:MINimum? [(@1)|(@2)]
:MEASure[:SCALar][:VOLTage]:NWIDth? [<reference>][,(@1)]
Page
:MEASure[:SCALar][:VOLTage]:PERiod? (Cont.)
:MEASure[:SCALar][:VOLTage]:PHASe? [(@1),(@2)]
:MEASure[:SCALar][:VOLTage]:PTPeak? [(@1)|(@2)]
:MEASure[:SCALar][:VOLTage]:PWIDth? [<reference>][,(@1)]
:MEASure[:SCALar][:VOLTage]:PWIDth? [<reference>][,(@1)] (Cont.)
:MEASure[:SCALar][:VOLTage]:RISE:TIME? (Cont.)
:MEASure[:SCALar][:VOLTage]:TINTerval? [(@1),(@2)]
:CONFigure[:SCALar][:VOLTage]:TOTalize:CONTinuous [(@1)]
:MEASure[:SCALar][:VOLTage]:TOTalize:TIMed? [<gate_time>][,(@1)]
How to Use the Measurement Instruction Commands
Using :MEAsure
How to Use the Measurement Instruction Commands (Cont.)
Using :CONFigure with :READ
Using :CONFigure with :INITiate and :FETCh
Firmware Revision Work-AroundCommands
Firmware Revision
Page
:MEMory:DELete:MACRo<string
:MEMory:FREE:MACRo
:MEMory:NSTates
[:SENSe]:DATA? [“[:]SENSe[1]”]
[:SENSe]:EVENt2:FEED “[:]INPut[1] | [:]INPut2”
[:SENSe]:EVENt[1|2]:HYSTeresis:RELative <numeric_value> [PCT]
[:SENSe]:EVENt[1|2]:LEVel[:ABSolute] <numeric_value> [V]
[:SENSe]:EVENt[1|2]:LEVel[:ABSolute]:AUTO <Boolean
[:SENSe]:EVENt[1|2]:LEVel:RELative <numeric_value> [PCT]
[:SENSe]:EVENt[1|2]:SLOPe POSitive | NEGative
[:SENSe]:EVENt3:LEVel[:ABSolute]
[:SENSe]:EVENt3:SLOPe
[:SENSe]:FREQuency:ARM[:STARt]:SLOPe POSitive | NEGative
[:SENSe]:FREQuency:ARM[:STARt]:SOURce IMMediate |EXTernal
[:SENSe]:FREQuency:ARM:STOP:DIGits <numeric_value
[:SENSe]:FREQuency:ARM:STOP:SLOPe POSitive | NEGative
[:SENSe]:FREQuency:ARM:STOP:SOURce IMMediate | EXTernal | TIMer | DIGits
[:SENSe]:FREQuency:ARM:STOP:TIMer <numeric_value> [S]
[:SENSe]:FREQuency:EXPected[1|2|3] <numeric_value> [HZ]
[:SENSe]:FREQuency:EXPected[1|2|3]:AUTO ON
[:SENSe]:FUNCtion[:ON] <sensor_function
Page
[:SENSe]:PHASe:ARM[:STARt]:SLOPe POSitive | NEGative
[:SENSe]:PHASe:ARM[:STARt]:SOURce IMMediate | EXTernal
[:SENSe]:ROSCillator:EXTernal:CHECk ON | OFF | ONCE
[:SENSe]:ROSCillator:EXTernal:FREQuency
[:SENSe]:ROSCillator:SOURce INTernal | EXTernal
[:SENSe]:ROSCillator:SOURce:AUTO <Boolean
[:SENSe]:TINTerval:ARM[:STARt]:SLOPe POSitive | NEGative
[:SENSe]:TINTerval:ARM[:STARt]:SOURce IMMediate | EXTernal
[:SENSe]:TINTerval:ARM:STOP:SOURce IMMediate | TIMer
[:SENSe]:TINTerval:ARM:STOP:TIMer <numeric_value> [S]
Page
[:SENSe]:TINTerval Subtree (HP 53132A With S/N Prefix 3646 and Above)
[:SENSe]:TINTerval:ARM:ESTART and :ESTOP Subtrees
(HP 53132A With S/N Prefix 3646 and Above)
Page
[:SENSe]:TINTerval:ARM:ESTART:LAYer2:SLOPe POSitive | NEGative
[:SENSe]:TINTerval:ARM:ESTART:LAYer2:SOURce IMMediate | EXTernal
[:SENSe]:TINTerval:ARM:ESTART[:LAYer[1]]:ECOunt <numeric_value
[:SENSe]:TINTerval:ARM:ESTART[:LAYer[1]]:SOURce IMMediate | TIMer | INTernal[1]
[:SENSe]:TINTerval:ARM:ESTART[:LAYer[1]]:TIMer <numeric_value> [S]
[:SENSe]:TINTerval:ARM:ESTOP:LAYer2:SLOPe POSitive | NEGative
[:SENSe]:TINTerval:ARM:ESTOP:LAYer2:SOURce IMMediate | EXTernal
[:SENSe]:TINTerval:ARM:ESTOP[:LAYer[1]]:ECOunt <numeric_value
[:SENSe]:TINTerval:ARM:ESTOP[:LAYer[1]]:SOURce IMMediate | TIMer | INTernal2
[:SENSe]:TINTerval:ARM:ESTOP[:LAYer[1]]:TIMer <numeric_value> [S]
[:SENSe]:TOTalize:ARM[:STARt]:SLOPe POSitive | NEGative
[:SENSe]:TOTalize:ARM[:STARt]:SOURce IMMediate | EXTernal
[:SENSe]:TOTalize:ARM:STOP:SLOPe POSitive | NEGative
[:SENSe]:TOTalize:ARM:STOP:SOURce IMMediate | EXTernal TIMer
[:SENSe]:TOTalize:ARM:STOP:TIMer <numeric_value> [S]
:STATus:OPERation:CONDition
:STATus:OPERation:ENABle <non-decimalnumeric> | <NRf
:STATus:OPERation[:EVENt]
:STATus:OPERation:NTRansition <non-decimalnumeric> | <NRf
:STATus:OPERation:PTRansition <non-decimalnumeric> | <NRf
:STATus:PRESet
:STATus:QUEStionable:CONDition
:STATus:QUEStionable:ENABle <non-decimalnumeric> | <NRf
:STATus:QUEStionable[:EVENt]
:STATus:QUEStionable:NTRansition <non-decimalnumeric> | <NRf
:STATus:QUEStionable:PTRansition <non-decimalnumeric> | <NRf
:SYSTem:COMMunicate:SERial:CONTrol:DTR IBFull | ON | LIMit
:SYSTem:COMMunicate:SERial:TRANsmit:BAUD <numeric_value
:SYSTem:COMMunicate:SERial:TRANsmit:PACE XON | NONE
:SYSTem:COMMunicate:SERial:TRANsmit:PARity[:TYPE] EVEN |
ODD | NONE
:SYSTem:ERRor
:SYSTem:KEY <numeric_value
Page
:SYSTem:KEY:LOG
:SYSTem:VERSion
:TRACe:CATalog
OFFSET
<numeric_value> [HZ | S | DEG]
<arbitrary block
:TRACe[:DATA]
SCALE, <numeric_value
:TRACe[:DATA] SCALE, <arbitrary block
SCALE
:TRIGger:COUNt:AUTO <Boolean
*CAL
*CLS
*DDT <arbitrary block
*DMC <string>, <arbitrary block
*EMC <NRf
*EMC
*ESE <NRf
*ESE
*ESR
*GMC? <string
*IDN
*LMC
*OPC
*OPC
*OPT
*PMC
*RCL <NRf
*RST
*SAV <NRf
*SRE <NRf
*SRE
*STB
*TRG
*TST
*WAI
*WAI
(Wait-to-ContinueCommand)
Page
HP-IB
<error number>, <error string
-113,“Undefined header”
+0, “No error”
Error Queue
350, “Queue overflow”
+0, “No error”
Error Types
Table 5-1.Error Types
No Error
0, “No error”
Command Error
Execution Error
Device- or Counter-SpecificError
Query Error
Table
Errors
Table 5-2.Errors (Continued)