background image

Programming 
Guide

HP 53131A/132A 225 MHz 
Universal Counter

Summary of Contents for 53131A

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

Page 2: ......

Page 3: ...nformation 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 3546 to 3646 HP 53132A Programming Guide HP 53131A 132A 225 MHz Universal Counter ...

Page 4: ... markings and instructions before operation This product is a safety Class I instrument provided with a protective earth terminal Before Applying Power Verify that the product is set to match the available line voltage and the correct fuse is installed Refer to instructions in Chapter 1 of the Manual Safety Earth Ground An uninterruptible safety earth ground must be provided from the mains power s...

Page 5: ...s 1 7 Applications 1 8 Programming Guide Contents 1 9 Assumptions 1 9 Related Documentation 1 10 2 Command Summary Introduction 2 2 Chapter Summary 2 2 Front Panel to SCPI Command Maps 2 3 Some SCPI Syntax Conventions 2 3 Input Channels Conditioning Keys to SCPI Command Map 2 4 Instrument Control Utility Recall and Save Print Keys to SCPI Command Map 2 6 MEASURE Keys to SCPI Command Map 2 8 Gate E...

Page 6: ...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 To Set the HP IB Mode and Address 3 4 To Connect the Counter to a Computer 3 6 Remote Local Operation 3 6 Overview of Command Types and Formats 3 7 Common Command Format 3 7 SCPI Command and Query Format 3 7 Elements of SCPI Commands 3 8 Subsy...

Page 7: ...4 Standard Event Status Enable Register 3 26 Operation Status Register Group and Questionable Data Signal Status Register Group 3 27 Condition Register 3 28 Transition Filter 3 28 Event Register 3 29 Event Enable Register 3 29 Operation Status Register Group 3 30 Questionable Data Signal Status Register Group 3 32 Command Settings for Optimizing Throughput 3 35 Commands to Set Counter for Optimal ...

Page 8: ...ics Results 3 44 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 Using the OPC Command to Assert SRQ 3 48 How to Program the Counter for Math Limit Operations 3 49 Updating Math a...

Page 9: ...P BASIC 3 73 To Use Macros HP BASIC 3 75 To Make a Frequency Measurement QuickBASIC 3 77 To Perform Limit Testing QuickBASIC 3 78 To Measure the Statistics of 50 Measurements QuickBASIC 3 80 To Use Limits to Filter Data Before Measuring Stats QuickBASIC 3 82 To Read and Store Calibration Data QuickBASIC 3 85 To Optimize Throughput QuickBASIC 3 86 To Use Macros QuickBASIC 3 88 To Make a Frequency M...

Page 10: ...Subtree 4 28 CONFigure Subsystem 4 30 Device Clear 4 31 DIAGnostic Subsystem 4 32 DISPlay Subsystem 4 37 FETCh Subsystem 4 40 FORMat Subsystem 4 41 Group Execute Trigger GET 4 42 HCOPy Subsystem 4 43 INITiate Subsystem 4 44 INPut 1 2 Subsystem 4 48 INPut3 Subsystem 4 50 MEASure Subsystem 4 51 Measurement Instructions CONFigure FETCh MEASure READ 4 52 Using MEAsure 4 75 Using CONFigure with READ 4 ...

Page 11: ...th S N Prefix 3646 and Above 4 98 SENSe TOTalize Subtree 4 104 SENSe TOTalize ARM Subtree 4 104 STATus Subsystem 4 107 STATus OPERation Subtree 4 107 STATus QUEStionable Subtree 4 110 SYSTem Subsystem 4 114 SYSTem COMMunicate Subtree 4 114 TRACe Subsystem 4 119 TRIGger Subsystem 4 121 CAL Calibration Query 4 122 CLS Clear Status Command 4 123 DDT arbitrary block Define Device Trigger Command 4 124...

Page 12: ...6 RST Reset Command 4 137 SAV NRf Save Command 4 138 SRE NRf Service Request Enable Command 4 139 SRE Service Request Enable Query 4 139 STB Status Byte Query 4 140 TRG Trigger Command 4 141 TST Self Test Query 4 142 WAI Wait to Continue Command 4 143 5 Errors Introduction 5 2 Displaying Errors 5 2 Reading an Error 5 2 Error Queue 5 3 Error Types 5 4 No Error 5 4 Command Error 5 4 Execution Error ...

Page 13: ...1 1 Before You Start ...

Page 14: ...el functions can be remotely operated via the Hewlett Packard Interface Bus HP IB as well as the additional throughput optimizing function not available from the front panel This Counter programming commands conform to the Standard Commands for Programmable Instruments SCPI Standard Version 1992 0 The SCPI standard does not completely redefine how to program instruments over the Hewlett Packard In...

Page 15: ...and current firmware revisions are noted where applicable HP 53131A Containing Firmware Revisions 3317 3335 or 3402 There are four main areas that differ Calibrations Measurements Statistics HP IB Commands Calibrations If your Counter contains other than the current firmware revision the following calibration features are different The calibration functions are in the Utility menu instead of the C...

Page 16: ...d selecting a gate time appropriately long Sensitivity for firmware revision below does not have adjusted controls to LO and MED sensitivity In some Counters that contained firmware revision 3317 LO sensitivity fails to correctly count very high frequency signals Statistics If your Counter contains other than the current firmware revision s single shot statistics are not available using the ON SIN...

Page 17: ...truction commands shown above are not available to disable auto trigger In the firmware revisions 3402 and below these commands enabled auto trigger at the 50 level HP 53132A Time Interval Delay 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 measureme...

Page 18: ... this guide depends upon how much you already know about programming instruments and how complex your measurement requirements are Let s start by establishing your programming background and then discuss the type of measurements you want to perform New Users What You Should Understand As a new user you should understand that you must have some understanding of a high level language such as Pascal ...

Page 19: ...for detailed information of all the Counter s SCPI commands Experienced Programmers If you have programmed other HP IB instruments you will probably be familiar with many of the concepts and techniques discussed in this guide Also you will find that using the SCPI commands is very similar to using the older HP IB commands The main difference is the hierarchy of the subsystem commands However this ...

Page 20: ...opriate information and written some measurement programs you may want to expand the scope of your applications The following two techniques are explained in detail If you are going to write interrupt driven programs or if you just want to determine the status of the Counter read the section titled Status Reporting in Chapter 3 If you are going to write programs to transfer data between the Counte...

Page 21: ...in tasks that you will want your Counter to perform Chapter 4 Command Reference is a dictionary that describes the SCPI subsystems and IEEE 488 2 Common commands Chapter 5 Errors lists all the error messages the Counter can generate and what caused the error Index Assumptions This guide assumes the Counter is correctly installed and interfaced to an external computer If it is not see IEEE HP IB In...

Page 22: ...rimarily intended for instrument firmware engineers However you may find it useful if you are programming more than one instrument that claims conformance to the SCPI standard You can verify the use of standard SCPI commands in different instruments To obtain a copy of this standard contact SCPI Consortium 8380 Hercules Suite P3 La Mesa CA 91942 Phone 619 697 8790 FAX 619 697 5955 5 The Internatio...

Page 23: ...e precise definition of specific message formats data type or common commands To obtain a copy of this standard write to The Institute of Electrical and Electronic Engineers Inc 345 East 47th Street New York NY 10017 USA 7 Hewlett Packard Company BASIC 5 0 5 1 Interfacing Techniques Vol 2 Specific Interfaces 1987 This HP BASIC manual contains a good non technical description of the HP IB IEEE 488 ...

Page 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...

Page 25: ...2 2 Command Summary A Quick Reference ...

Page 26: ... S N Prefix 3646 and Above Time Interval Arming Commands pg 2 14 LIMITS and MATH Keys to SCPI Command Map pg 2 16 Calibration Menu to SCPI Command Map pg 2 18 HP 53131A 132A Command Summary 2 pg 2 20 SCPI Conformance Information pg 2 20 IEEE 488 2 Common Commands pg 2 21 HP 53131A 132A SCPI Subsystem Commands pg 2 24 RST Response3 pg 2 40 _______________________________ 1The section titled Front P...

Page 27: ...ounter 1 2 Means use either 1 or 2 numeric_value Means enter a number SENSe Means you MUST use either all the upper case letters or the entire word The lower case letters are optional For example SENS and SENSE are both valid However SEN is not valid Note SENSe is used here as an example but this convention is true for all SCPI commands When you see quotation marks in the command s parameter shown...

Page 28: ... 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 Command Map Part 1 of 2 ...

Page 29: ...eresis RELative 100 d2 SENSe EVENt 1 2 HYSTeresis RELative 50 d3 SENSe EVENt 1 2 HYSTeresis RELative 0 e1 SENSe EVENt2 FEED INPut 1 e2 SENSe EVENt2 FEED INPut2 2 INPut 1 2 IMPedance nume ric_value OHM 3 INPut 1 2 COUPling AC DC 4 a1 INPut 1 2 ATTenuation 1 a2 INPut 1 2 ATTenuation 10 5 INPut 1 2 FILTer ON OFF 6 INPut3 COUPling INPut3 IMPedance __________________________ Note in firmware revisions ...

Page 30: ... Front Panel to SCPI Command Maps 2 6 Programming Guide 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 ...

Page 31: ...I SYSTem COMMunicate SERial TRANsmit PARity TYPE EVEN ODD NONE j SYSTem COMMunicate SERial TRANsmit PACE XON NONE k1 SYSTem COMMunicate SERial CONTrol DTR LIMit k2 SYSTem COMMunicate SERial CONTrol DTR IBFull k3 SYSTem COMMunicate SERial CONTrol DTR ON l1 DISPlay WINDow TEXT RADix DPOint l2 DISPlay WINDow TEXT RADix COMMa 2 SAV Nrf 3 INITiate CONTinuous OFF if running OR ABORt if single measuremen...

Page 32: ...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 33: ...NCtion ON XNONe VOLTage MINimum 2 OR SENSe FUNCtion ON XNONe VOLTage MAXimum 2 3 a SENSe FUNCtion ON XNONe TINTerval 1 2 b SENSe FUNCtion ON XNONe PERiod 1 c SENSe FUNCtion ON XNONe RISE TIME 1 d SENSe FUNCtion ON XNONe FALL TIME 1 e SENSe FUNCtion ON XNONe PWIDth 1 f SENSe FUNCtion ON XNONe NWIDth 1 Since the primary purpose of these front panel keys is to change the function the corresponding SE...

Page 34: ...DELAY NONE b2 DELAY TIME c TIME time Digits Arming b GATE DIGITS c DIGITS digits _______________ _______________ _______________ _______________ Time Arming d GATE TIME e TIME time _______________ Time Arming b GATE TIME c TIME time __________________ ________________ External Arming f GATE EXTERNL g START POS NEG h1 STOP AUTO h2 STOP NEG POS h3 STOP TIME I TIME time External Arming b ARM EXTERNL ...

Page 35: ...SENSe FREQuency ARM STOP SOURce TIMer e SENSe FREQuency ARM STOP TIMer numeric_value External Arming f SENSe FREQuency ARM STARt SOURce EXTernal g SENSe FREQuency ARM STARt SLOPe POSitive NEGative h1 SENSe FREQuency ARM STOP SOURce IMMediate h2 SENSe FREQuency ARM STOP SOURce EXTernal SENSe FREQuency ARM STOP SLOPe POSitive NEGative h3 SENSe FREQuency ARM STOP SOURce TIMer I SENSe FREQuency ARM ST...

Page 36: ...value S External Arming d SENSe TOTalize ARM STARt SOURce EXTernal e SENSe TOTalize ARM STARt SLOPe POSitive NEGative f1 SENSe TOTalize ARM STOP SOURce TIMer f2 SENSe TOTalize ARM STOP SOURce EXTernal SENSe TOTalize ARM STOP SLOPe POSitive NEGative g SENSe TOTalize ARM STOP TIMer numeric_valu e S Rise Time Fall Time Pulse Width Dutycycle Auto Arming a SENSe TINTerval ARM STARt SOURce IMMediate Ext...

Page 37: ... ARM STARt SOURce IMMediate b1 SENSe TINTerval ARM STOP SOURce IMMediate b2 SENSe TINTerval ARM STOP SOURce TIMer c SENSe TINTerval ARM STOP TIMer numeric_value S External Arming d SENSe TINTerval ARM STARt SOURce EXTernal e SENSe TINTerval ARM START SLOPe POSitive NEGative f1 SENSe TINTerval ARM STOP SOURce IMMediate f2 SENSe TINTerval ARM STOP SOURce TIMer g SENSe TINTerval ARM STOP TIMer numeri...

Page 38: ... Prefix 3646 and Above Auto Arming a TSTART AUTO b1 DELAYT NONE b2 DELAYT TIME b3 DELAYT EVENT c TT time d ET events External Arming e TSTART EXT f TSLOPE POS NEG g1 TDELAY NONE g2 TDELAY TIME g3 TDELAY EVENT h TT time i TE events j1 STOPT AUTO j2 STOPT EXT k SLOPET POS NEG m1 DELAYT NONE m2 DELAYT TIME m3 DELAYT EVENT n TT time o ET events Figure 2 4 Gate ExtArm Key to SCPI Command Map Part 5 of ...

Page 39: ...RT LAYer2 SOURce EXTernal f SENSe TINTerval ARM ESTART LAYer2 SLOPe POSitive NEGative g1 SENSe TINTerval ARM ESTART LAYer 1 SOURce IMMediate g2 SENSe TINTerval ARM ESTART LAYer 1 SOURce TIMer g3 SENSe TINTerval ARM ESTART LAYer 1 SOURce INTernal1 h SENSe TINTerval ARM ESTART LAYer 1 TIMer numeric_value S i SENSe TINTerval ARM ESTART LAYer 1 ECOunt numeric_value j1 SENSe TINTerval ARM EST OP LAYer2...

Page 40: ...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 41: ...LCulate3 AVERage TYPE MAXimum MINimum SDEViation MEAN OR DISPlay WINDow TEXT FEED CALC2 b CALCulate3 AVERage COUNt numeric_value c CALCulate3 AVERage STATe OFF ON d1 CALCulate3 LFILter STATe OFF d2 CALCulate3 LFILter STATe ON e1 TRIGger COUNt AUTO OFF e2 TRIGger COUNt AUTO ON 4 a TRACe DATA SCALE numeric_value b TRACe DATA OFFSET numeric_value HZ S DEG c CALCulate MATH STATe OFF ON Use CALC3 AVER ...

Page 42: ...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: ... ONCE DIAGnostic CALibration INPut2 GAIN AUTO ONCE DIAGnostic CALibration TINTerval QUICk DIAGnostic CALibration TINTerval FINE 1 2 3 4 DIAGnostic CALibration ROSCillator AUTO ONCE c1 CALibration SECurity CODE new_code OR CALibration SECurity STATe ON present_code c2 CALibration SECurity STATe OFF present_code d CALibration COUNt e No command The Calibration Menu is accessed by holding the Scale O...

Page 44: ...set consists of the following Common commands as defined in IEEE 488 2 1987 listed and summarized in Table 2 1 SCPI Subsystem commands as confirmed and listed in the SCPI Standard the commands defined in Table 2 2 as Std SCPI Subsystem commands designed for the instrument in conformance with SCPI standards but not yet listed in the SCPI Standard the commands defined in Table 2 2 as New Details of ...

Page 45: ...not related to measurement configuration They are used for functions like resetting the instrument identification or synchronization Table 2 1 lists the Common Commands in alphabetical order by mnemonic name and function More information concerning the operation of IEEE 488 2 status reporting commands and structure can be found in the Status Reporting section of Chapter 3 Standard explanations of ...

Page 46: ...without error Clears Status data structures Event Registers and Error Queue Defines either INIT FETC READ or nothing to be executed when the Counter receives a GET or TRG command Assigns a sequence of zero or more commands queries to a macro label No query form Enables and disables expansion of macros Non zero value enables zero value disables Queries whether macros are enabled Sets the Standard E...

Page 47: ...py stored in local non volatile memory 0 through 20 are valid memory registers Resets the Counter to a known state Stores the current state of the Counter in local non volatile memory 1 through 20 are valid memory registers Set the Service Request Enable register Queries the Service Request Enable register Queries the Status Byte and Master Summary Status bit This trigger command is the device spe...

Page 48: ... Unless a command is specified as No Query or Query Only in the Comments column of Table 2 2 it has both a command and a query form Any command in the table that is shown with a at the end is a Query Only command Std New Column The Std New column in Table 2 2 gives the status of the command with respect to the SCPI standard The Std commands operate as defined in the SCPI standard and as defined in...

Page 49: ...ression equation used for math scale offset processing Sets the name of selected math expression equation Enables disables math scale offset processing Note that this setting must be enabled for any of the other CALC 1 settings to be used CALCulate2 FEED IMMediate AUTO LIMit CLEar AUTO IMMediate DISPlay FAIL CALCulate 1 Boolean Boolean GRAPh NUMBer Std Std Std Std Std Std Std Std New Std Subsystem...

Page 50: ...n abbreviation for Pass COunt Query only Returns the total number of measurements that passed the limit test CALCulate3 AVERage ALL CLEar COUNt CURRent STATe TYPE DATA FEED numeric_value Boolean MAXimum MINimum SDEViation SCALar or MEAN CALCulate 1 Std Std New Std Std New Std Std Std Std Subsystem Performs post acquisition statistics computation and data transfer Subtree Collects together the comm...

Page 51: ...w Std New New New Subsystem Query only Causes an internal interpolator self calibration Query only Returns value indicating number of times the Counter has been calibrated Transfers the calibration data input gain input offset reference oscillator and time interval No query Sets the calibration security code Enables or prevents calibration of the Counter Query returns security status 0 unsecure ca...

Page 52: ...NABle MENU STATe WINDow TEXT FEED RADix Boolean OFF CALCulate2 CALCulate3 COMMa DPOint Std Std Std Std Std Std Std New Subsystem Controls the selection and presentation of textual information on the display Controls whether the whole display is visible Subtree Sets the Counter to switch from the menu display to the result display Subtree Subtree Allows for the display of textual information Sets w...

Page 53: ...TTenuation COUPling FILTer LPASs STATe FREQuency IMPedance 1 10 AC DC Boolean numeric_value OHM Std Std Std Std Std Std Std Std Subsystem Controls the characteristics of the instrument s input ports INPut1 channel 1 and INPut2 channel 2 Sets input attenuation Sets input coupling Subtree Allows a low pass filter to be inserted in the path of the measurement signal Subtree Controls the Low PASs filt...

Page 54: ...ble on the next page See parameters and source_list in table on the next page Std Std Std Std Std Configures instrument to perform specified measurement Returns function configured by the last CONF or MEAS command Configures instrument initiates measurement and queries for the result i e provides complete measurement sequence Initiates measurement and queries for the result Performs a FETCh on fre...

Page 55: ...er_reference upper_reference 1 Std VOLTage RTIMe lower_reference upper_reference 1 Std VOLTage TINTerval 1 2 New VOLTage TOTalize CONTinuous 1 New VOLTage TOTalize TIMed gate_time 1 New ______________________________ The only functions which can be derived using FETC or READ from the stored data are period to from frequency maximum to from minimum maximum to from peak to peak and minimum to from p...

Page 56: ...oolean numeric_value PCT POSitive NEGative INPut 1 INPut2 Std Std New New New New New New New New New New Subsystem setup commands Query only Returns the current measurement result data of the SENSe subsystem no scale or offset applied Subtree Defines the trigger event Subtree 1Sets the size of the hysteresis window as a percentage of allowable hysteresis 2Sets the sensitivity of the input channel...

Page 57: ...and stop arm with events Subtree Sets the slope of the external start arm signal used in external arming frequency frequency ratio and period measurements Only applies when SENS FREQ ARM STAR SOUR EXT is selected Sets the start arm for frequency frequency ratio and period measurements Subtree Sets the resolution in terms of digits used in arming frequency frequency ratio and period measurements On...

Page 58: ... Positive duty cycle on channel 1 Fall Time on channel 1 Fall Time on channel 1 Frequency on channel 1 2 or 3 1Frequency Ratio 1 to 2 1 to 3 2 to 1 or 3 to 1 Negative Pulse Width on channel 1 Period on channel 1 2 or 3 Phase of channel 1 relative to channel 2 Positive Pulse Width on channel 1 Rise Time on channel 1 Rise Time on channel 1 Time Interval channel 1 to channel 2 Totalize on channel 1 V...

Page 59: ...and Pulse Width functions measuring capabilities of the instrument Subtree Synchronizes the time interval start and stop arm with events Subtree Sets the slope of the external start arm signal used in external arming time interval measurements including Time Interval Rise Time Fall Time Dutycycle and Pulse Width functions Only applies when SENS TINT ARM STAR SOUR EXT is selected Sets the start arm...

Page 60: ...c NRf non decimal numeric NRf non decimal numeric NRf Std Std Std Std Std Std Std Std Std Std Std Std Std Std Subsystem Controls the SCPI defined Operation and Questionable status reporting structures Subtree Query only Queries the Operation Condition Status Register Sets the Operation Event Status Enable Register Query only Queries the Operation Event Status Register Sets the negative transition ...

Page 61: ...scheme PARity Std Subtree Controls the parity of the channel TYPE EVEN ODD NONE Std Sets the parity scheme ERRor Std Query only Queries the oldest error in the Error Queue and removes the error from the queue first in first out KEY numeric_value Std Simulates the pressing of a front panel key LOG New Query only Returns a comma separated list of integers representing all of the entries in the Key Q...

Page 62: ...l start and stop arm with events Sets the slope of the external start arm signal used in external arming Time Interval measurements including Time Interval Rise Time Fall Time Dutycycle and Pulse Width Sets the start arm for time interval including Time Interval Rise Time Fall Time Dutycycle and Pulse Width measurements Sets the event count used to delay the start arm for Time Interval measurement...

Page 63: ...me Interval measurements Sets the time used to delay the stop arm for Time Interval measurements Only applies when SENS TINT ARM ESTOP SOUR TIM is selected Sets the slope of the external start arm signal used in external arming Tme Interval measurements including Time Interval Rise Time Fall Time Dutycycle and Pulse Width Only applies when SENS TINT ARM STAR SOUR EXT is selected Sets the start arm...

Page 64: ...ulate 1 FEED CALCulate 1 IMMediate AUTO CALCulate 1 MATH EXPRession NAME CALCulate 1 MATH STATe SENSe 1 Boolean SCALE_OFFSET Boolean SENSe 1 OFF SCALE_OFFSET OFF CALCulate2 FEED CALCulate2 IMMediate AUTO CALCulate2 LIMit CLEar AUTO CALCulate2 LIMit DISPlay CALCulate2 LIMit LOWer DATA CALCulate2 LIMit STATe CALCulate2 LIMit UPPer DATA CALCulate 1 Boolean Boolean GRAPh NUMBer numeric_value Boolean n...

Page 65: ...OP DIGits SENSe FREQuency ARM STOP SLOPe SENSe FREQuency ARM STOP SOURce SENSe FREQuency ARM STOP TIMer SENSe FREQuency EXPected 1 2 3 AUTO SENSe FUNCtion ON SENSe PHASe ARM STARt SLOPe SENSe PHASe ARM STARt SOURce SENSe ROSCillator EXTernal CHECk SENSe ROSCillator SOURce AUTO numeric_value PCT Boolean numeric_value PCT POSitive NEGative INPut1 INPut2 POSitive NEGative IMMediate EXTernal numeric_v...

Page 66: ...erval ARM ESTART LAYer 1 ECOunt SENSe TINTerval ARM ESTART LAYer 1 SOURc e SENSe TINTerval ARM ESTART LAYer 1 TIMer SENSe TINTerval ARM ESTOP LAYer2 SLOPe SENSe TINTerval ARM ESTOP LAYer 2 SOURce SENSe TINTerval ARM ESTOP LAYer 1 ECOunt SENSe TINTerval ARM ESTOP LAYer 1 SOURce SENSe TINTerval ARM ESTOP LAYer 1 TIMer SENSe TINTerval ARM STARt SLOPe SENSe TINTerval ARM STARt SOURce SENSe TINTerval A...

Page 67: ...ty 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...

Page 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...

Page 69: ...3 3 Programming Your Universal Counter for Remote Operation ...

Page 70: ...0 How to Program the Counter for Status Reporting pg 3 38 How to Program the Counter to Display Results pg 3 43 How to Program the Counter to Synchronize Measurements pg 3 46 How to Program the Counter for Math Limit Operation pg 3 49 How to Program the Counter to Define Macros pg 3 52 Writing SCPI Programs pg 3 55 Programming Examples pg 3 58 Where to Find Some Specific Information To Set the HP ...

Page 71: ...s to Filter Data Before Measuring Stats pg 3 66 To Read and Store Calibration Data pg 3 68 To To Perform a Time Interval Calibration pg 3 69 To Optimize Throughput pg 3 73 To Use Macros pg 3 75 Where to Find QuickBASIC Programming Examples To Make a Frequency Measurement pg 3 77 To Perform Limit Testing pg 3 78 To Measure the Statistics of 50 Measurements pg 3 80 To Use Limits to Filter Data Befor...

Page 72: ... Set the HP IB Mode and Address for instructions on how to set an HP IB address from the front panel Talk only In this mode the Counter can send data to a printer It cannot receive commands or setups from the computer To select the talk only operating mode set the Counter s HP IB mode to TALK Refer to the following section titled To Set the HP IB Mode and Address for instructions on how to set the...

Page 73: ...t this digit will change when the d or f arrow key is pressed d 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 indicating that this digit will change when the d or f arrow key is pressed b Press d key until TALK is displayed HP ...

Page 74: ... 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 Once in remote the Counter settings cannot be affected by the front panel controls The Save Print key may be used to manually return to local control only if local lockout is off ...

Page 75: ...ommon Command Format The IEEE 488 2 Standard defines the Common commands as commands that perform functions like reset self test status byte query and identification Common commands always begin with the asterisk character and may include parameters The command keyword is separated from the first parameter by a space character Some examples of Common commands are as follows RST IDN RCL 1 SCPI Comm...

Page 76: ...nd are OUTPUT 712 CLS OUTPUT 712 INP1 COUP AC IMP 1 0 MOHM Subsystem Command Syntax Figure 3 2 shows the simplified syntax of a Subsystem Command You must use a space SP between the last command mnemonic and the first parameter in a Subsystem Command Note that if you send more than one parameter with a single command you must separate adjacent parameters with a comma NOTE sp space ASCII character ...

Page 77: ...nd syntax shows CALCulate then CALC and CALCULATE are both acceptable forms Other forms of CALCulate such as CALCU or CALCULA will generate an error You may use upper and or lower case letters Therefore CALCULATE calculate and CaLcUlAtE are all acceptable Keyword Separator A colon always separates one keyword from the next lower level keyword as shown below INPut COUPling Optional Keyword Optional...

Page 78: ... EXT Implied Channel Optional Numeric Keyword Suffix Some commands allow specifying a channel with an optional numeric keyword suffix These commands will show the channel numbers within square brackets The brackets are not part of the command and are not sent to the Counter For example INPut 1 2 COUPling AC DC represents coupling commands for channels 1 and 2 INPut 1 COUPling AC DC INPut2 COUPling...

Page 79: ...ber of choices These parameters use mnemonics to represent each valid setting An example is the INPut COUPling AC DC command parameters AC DC Flexible numeric representation Only positive integers are used for NRf parameters in the Counter 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...

Page 80: ... impedance value is returned If you send the MIN parameter using INP IMP MIN the command returns the minimum level currently available If you send the MAX parameter the command returns the maximum level currently available Be sure to place a space between the question mark and the parameter Suffixes A suffix is the combination of suffix elements and multipliers that can be used to interpret the nu...

Page 81: ...TA 1E12 T TERA 1E9 G GIGA 1E6 MA or M for OHM and HZ MEGA 1E3 K KILO 1E 3 M except for OHM and HZ MILLI 1E 6 U MICRO 1E 9 N NANO 1E 12 P PICO 1E 15 F FEMTO 1E 18 A ATTO The suffix units MHZ and MOHM are special cases that should not be confused with suffix multiplier HZ and suffix multiplier OHM Command Terminator A command may be terminated with a new line ASCII character decimal 10 an EOI End of...

Page 82: ...Commands in the same program message If you send more than one command in one message you must separate adjacent commands with a semicolon NOTE new line ASCII character decimal 10 END EOI asserted concurrent with last byte Figure 3 4 Simplified Program Message Syntax Diagram When using IEEE 488 2 Common commands with SCPI Subsystem commands on the same line use a semicolon between adjacent command...

Page 83: ...to sending INP COUP AC INP IMP 50 or 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 INIT CONT OFF If the which is following the and is in front of INIT is omitted the Counter assumes that the second command is INP INIT CONT OFF and generates a syntax error ...

Page 84: ...ter statement that includes the device address and an appropriate variable Use a print statement to display the message The following HP BASIC example illustrates how to query the Counter and display the message 10 OUTPUT 703 INP COUP 20 ENTER 703 A 30 PRINT A 40 END Response Message Syntax Figure 3 5 shows the simplified syntax of a Response Message Response messages may contain both commas and s...

Page 85: ...c representation has an explicit radix point The maximum number of characters in NR2 response data is 17 maximum 15 mantissa digits 1 sign 1 decimal point NR3 This numeric representation has an explicit radix point and an exponent The maximum number of characters in NR3 response data is 22 maximum 15 mantissa digits 2 signs 1 decimal point 1 E character 3 exponent digits Not a Number Not a Number ...

Page 86: ...aracters enclosed by double quotes For example string data is used for the error description portion of SYST ERR response and for SENS FUNC response definite length block The syntax is a pound sign followed by a non zero digit representing the number of digits in the subsequent decimal integer The decimal integer specifies the number of 8 bit data bytes being sent This is followed by the actual da...

Page 87: ...ot show all the registers that are contained in each group It is intended as a guide to the bits used in each of these register groups to monitor the Counter s status Note that besides the Operation Status and the Questionable Data Signal Register groups a summary of the Standard Status Structure Registers defined by IEEE 488 2 1987 is shown Refer to the section in this chapter titled How to Progr...

Page 88: ...Chapter 3 Programming Your Universal Counter for Remote Operation Status Reporting 3 20 Programming Guide Figure 3 6 HP 53131A 132A SCPI Status Reporting Summary Functional Diagram ...

Page 89: ...tus registers and queues as shown in Figure 3 7 The Status Byte Register is a live register its summary bits are set TRUE or FALSE one or zero by the presence or absence of the condition which is being summarized The Status Byte Register can be read with either a serial poll or the STB query The Status Byte Register is altered only when the state of the overlying status data structures is altered ...

Page 90: ...SB summarizes the Questionable Data Signal Status Event Register This bit indicates whether or not one or more of the enabled Questionable Data Signal events have occurred since the last reading or clearing of the Questionable Data Signal Status Event Register This bit is set TRUE one when an enabled event in the Questionable Data Signal Status Event Register is set TRUE Conversely this bit is set...

Page 91: ... to read the Status Byte Register the MSS bit indicates the Master Summary Status The MSS bit indicates whether or not the Counter has at least one reason for requesting service Bit 7 OSB summarizes the Operation Status Event Register This bit indicates whether or not one or more of the enabled Operation events have occurred since the last reading or clearing of the Operation Status Event Register...

Page 92: ...egister Use ESR or CLS to clear this register Table 3 5 lists the Standard Event Status Register bits and briefly describes each bit Table 3 5 Standard Event Status Register BIT WEIGH T SYMBOL DESCRIPTION 0 1 OPC Operation Complete 1 RQC Not used because this instrument cannot request permission to become active IEEE 488 1 controller in charge 2 4 QYE Query Error 3 8 DDE Device Specific Error 4 16...

Page 93: ...r the function is set to Totalize or Voltage Peaks then the pending operation condition is set TRUE when either 1 a single measurement is initiated or 2 a continuous measurement cycle is initiated The pending operation condition is set FALSE when the measurement cycle terminates If the TRIGger COUNt AUTO is ON and statistics are enabled and the function is set to Totalize or Voltage Peaks then the...

Page 94: ...ugh 299 are execution errors Bit 5 Command Error is an event bit which indicates one of the following has occurred 1 an IEEE 488 2 syntax error 2 a semantic error indicating an unrecognized command or 3 a Group Execute Trigger was entered into the input buffer inside of a program message Bit 6 is not used Bit 7 Power On is an event bit which indicates that an off to on transition has occurred in t...

Page 95: ...on 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 an event register an event enable register Figure 3 9 shows the model that these register groups follow Figure 3 9 Operation and Questionable Status Repor...

Page 96: ...ansition only When the transition filter specifies a negative transition the event becomes TRUE when its associated condition makes a TRUE to FALSE transition only When the transition filter specifies either a positive or a negative transition the event becomes TRUE when its associated condition makes either a FALSE to TRUE or a TRUE to FALSE transition A transition filter is defined by a positive...

Page 97: ...nt register captures changes in conditions An event register bit event bit shall be set TRUE when an associated event occurs These bits once set are sticky That is they cannot be cleared even if they do not reflect the current status of a related condition until they are read To read the event registers use STATus OPERation EVENt STATus QUEStionable EVENt Use event register queries or CLS to clear...

Page 98: ...g 1 Not used 2 Not used 3 Not used 4 16 Measuring 5 Not used 6 Not used 7 Not used 8 256 Computing Statistics 9 512 Using Internal Reference 10 1024 In Limit Event 11 14 Not used 15 Not used since some controllers may have difficulty reading a 16 bit unsigned integer The value of this bit shall always be 0 A detailed description of each bit in the Operation Status Register follows Bit 0 Calibratin...

Page 99: ... one once the first of N measurements has begun and remains TRUE until the last of N measurements has completed Bit 9 Using Internal Reference is a condition bit which indicates the Counter is using the internal reference The condition bit is TRUE one while the Counter is using the internal reference The condition bit is FALSE zero while the Counter is using the external reference This bit monitor...

Page 100: ...stionable Data Signal Status Register Group The Questionable Data Signal Status Register Group monitors SCPI defined conditions Table 3 8 lists the Questionable Data Signal Status Register bits and briefly describes each bit Table 3 8 Questionable Data Signal Status Register BIT WEIGHT DESCRIPTION 0 Not used 1 Not used 2 4 Time Time Interval Rise Time Fall Time Pulse Width Duty Cycle and Period 3 ...

Page 101: ... affected by the disabling of automatic interpolator calibration The condition bit is TRUE when automatic interpolator calibration is disabled The condition bit is FALSE when automatic interpolator calibration is enabled Bit 6 Phase is a condition bit which indicates that Phase measurements may be affected by the disabling of automatic interpolator calibration The condition bit is TRUE when automa...

Page 102: ...ting 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 Hence the Out of Limit Event bit does NOT represent the transition from an in limit measurement to out of limit measurement Bits 11 13 are not used Bit 14 Command Warning is an event bit indicating a command such as C...

Page 103: ...ute numeric_value V or simply disable auto trigger SENSe EVENt 1 2 LEVel ABSolute AUTO OFF 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...

Page 104: ...below Disable printing HCOPy CONTinuous OFF Disable post processing math limit testing statistics CALCulate MATH STATe OFF CALCulate2 LIMit STATe OFF CALCulate3 AVERage STATe OFF Specify expected frequency for Frequency Period Ratio Phase and Duty Cycle measurements SENSe FREQuency EXPected 1 2 3 numeric_value HZ See Note below Specify ASCII format for result query responses FORMat DATA ASCii Spec...

Page 105: ...show the Frequency Auto Arming function but the technique is the same for the other two functions Frequency Time Arming 001 and Time Interval 1 to 2 You only have to change the function in the program to generate the numbers in the table Table 3 9 Typical Optimizing Throughput Results in Measurements per Second Function IBM PC Compatible 486 25 MHz HP 82335A Card HP 82324A Basic Language Processor...

Page 106: ... 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 Figure 3 10 is a flowchart diagram of how to program the Counter for Status Reporting Resetting the Counter and Clearing the HP IB Interface Example 1 Before attempting any programming it is a good idea to set the Counter to a kno...

Page 107: ...l Status Register to Alert the Computer When Automatic Interpolator Calibration is 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 value...

Page 108: ... a long measurement For example a frequency measurement with a gate time of 10 seconds When the measurement is complete the Counter can alert the computer The first line tells the Counter to watch for a negative transition from true measuring to false non measuring of bit 4 This negative transition indicates that the Counter has completed a measurement The next line tells the Counter to summarize ...

Page 109: ...Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3 41 Figure 3 10 Status Reporting Flowchart 1 of 2 ...

Page 110: ...Chapter 3 Programming Your Universal Counter for Remote Operation How to Program the Counter for Status Reporting 3 42 Programming Guide Figure 3 10 Status Reporting Flowchart 2 of 2 ...

Page 111: ...5 Display Enable All segments and LEDs except Remote and SRQ off or on The following command groupings show how to program the Counter to any of the above display modes Commands for Displaying Non Scaled Offset Results The following lines will always show the raw non scaled offset measurement result DISP MENU OFF DISP TEXT FEED CALC2 CALC2 LIM DISP NUMBER CALC MATH STATE OFF CALC IMM Clear any men...

Page 112: ... the raw result if the command DISP TEXT FEED CALC2 is also issued These commands must be issued in pairs Commands for Displaying the Limit Graph The following lines enable limit testing and show the limit graph If the Math is enabled the scale and offset will be applied to the measurement result before being tested for the limit graph DISP MENU OFF DISP TEXT FEED CALC2 CALC2 LIM STATE ON CALC2 LI...

Page 113: ... Guide 3 45 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 DISP ENABLE ON Disable the display all segments off Normal display mode ...

Page 114: ...ssuing these commands execute a device clear to reset the interface and Counter Consult your interface card s documentation for how to issue a device clear since the device clear command will be specific to the interface you are using Perform the following 1 Issue a Device Clear See your computer or interface card documentation for how to issue this command 2 Issue the following commands RST CLS S...

Page 115: ...le above the line following the WAI command is accepted by the Counter However the Counter does not execute the command because of the preceding WAI command If this line had been a command to address another instrument it would be immediately executed If you had wanted to hold off the command to another instrument you would use the OPC command instead of the WAI command CALC3 AVERAGE ON CALC3 AVER...

Page 116: ...ssed here this is the most flexible but also the most complex CALC3 AVERAGE ON CALC3 AVERAGE COUNT 50 TRIG COUNT AUTO ON ESE 1 SRE 32 Enable statistics Base statistics on 50 measurements On INIT take N measurements Summarize OPC bit for Status Byte Register SRQ when event summary bit is 1 Set up program to specify service routine and enable interrupt when SRQ is asserted INIT OPC Start measurement...

Page 117: ...er will not be automatically updated to reflect the Limit or Math values Whenever a new measurement is made the result will be updated but if the Counter is in Single mode changing the Limits or Math will not result in an automatic re calculation There are two things you can do to make sure the results are updated One is to send the command CALC IMM AUTO ON after the RST command This will cause th...

Page 118: ...he commands for setting the scale and offset are in the TRACE subsystem For example if you make a frequency measurement and want to set the scale to 5 0 and the offset to 100 Hz send the following commands TRACE SCALE 5 TRACE OFFSET 100 Set scale value Set offset value The above commands just set the values To enable them Math must be turned on and the results processed as described in the previou...

Page 119: ...he 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 To query the scale use the following command TRACE SCALE Then enter the data keeping in mind how it will be formatted ASCII or REAL ...

Page 120: ... macro called limitresult you can provide any name you wish DISP MENU OFF DISP TEXT FEED CALC2 CALC2 LIM STATE ON CALC2 LIM DISP GRAPH Anytime you wanted to display the limit graph you would just send the command limitresult To assign the macro limitresult to the above command sequence you would send the following DMC limitresult 280 DISP MENU OFF DISP TEXT FEED CALC2 CALC2 LIM STATE ON CALC2 LIM ...

Page 121: ...ro command DMC setimp 212 INP1 IMP 1 To change the impedance to 50 ohms send setimp 50 The above is a very simple example Macros are best used for a long sequence of commands A good use for macros is changing the display from one format to another To change to the limit graph the following commands must be sent DISP MENU OFF DISP TEXT FEED CALC2 CALC2 LIM STATE ON CALC2 LIM DISP GRAPH CALC IMM The...

Page 122: ...ction titled Programming Examples The first macro program listing starting on page 3 75 uses 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 There is little error trap...

Page 123: ... 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 You do not have to follow this exact sequence but it will help you to become familiar with the Counter s capabilities and to direct you to sections of the guide which will be useful while writing programs ...

Page 124: ...Chapter 3 Programming Your Universal Counter for Remote Operation Writing SCPI Programs 3 56 Programming Guide Figure 3 11 SCPI Programming Flowchart Sheet 1 of 2 ...

Page 125: ...Chapter 3 Programming Your Universal Counter for Remote Operation Elements of SCPI Commands Programming Guide 3 57 Figure 3 11 SCPI Programming Flowchart Sheet 2 of 2 ...

Page 126: ...ther double or single quotes Each method is discussed in the following sub sections To Send a Double Quoted String For the HP BASIC OUTPUT statements remember that strings enclosed in double quotes need special consideration For example send the FUNC FREQ 1 command with the following OUTPUT 703 FUNC FREQ 1 Note that a pair of double quotes as shown in bold is required by HP BASIC to embed a double...

Page 127: ...ad 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 HP BASIC and QuickBASIC only 7 To Perform a Time Interval Calibration this program shows how to perform both types of time interval calibrations The fine time interval calibration uses the HP 59992A J06 Time Interval Calibrator ...

Page 128: ...unt TO 703 Assign I O path for counter 200 CLEAR 703 Clear the counter and interface 210 OUTPUT Count RST Reset the counter 220 OUTPUT Count CLS Clear event registers and error queue 230 OUTPUT Count SRE 0 Clear service request enable register 240 OUTPUT Count ESE 0 Clear event status enable register 250 OUTPUT Count STAT PRES Preset enable registers and 260 transition filters for operation and 27...

Page 129: ... PRINT 710 PRINT Frequency Freq 720 PRINT 730 RETURN 740 750 760 Init_fetc Use INIT and FETCH to read frequency and period 770 The READ command can be broken down into INIT and FETCH providing 780 even more measurement flexibility By using FETCH you can retrieve 790 results based on already acquired data For example period can be 800 derived from a frequency measurement without a new acquisition 8...

Page 130: ...erface 160 OUTPUT Count RST Reset the counter 170 OUTPUT Count CLS Clear event registers and error queue 180 OUTPUT Count SRE 0 Clear service request enable register 190 OUTPUT Count ESE 0 Clear event status enable register 200 OUTPUT Count STAT PRES Preset enable registers and 210 transition filters for operation and 220 questionable status structures 230 OUTPUT Count FUNC FREQ 1 Measure frequenc...

Page 131: ...tructures 190 OUTPUT Count FUNC PER 1 Measure period on channel 1 200 Note that the function selected must be a quoted string 210 The actual string sent to the counter is PER 1 220 230 OUTPUT Count FREQ ARM STAR SOUR IMM These two lines enable 240 OUTPUT Count FREQ ARM STOP SOUR IMM Automatic arming 250 260 OUTPUT Count CALC2 LIM STAT ON Enable limit testing 270 OUTPUT Count CALC2 LIM DISP GRAP Sh...

Page 132: ...ev 22 Mean 22 Minimum 22 Maximum 22 220 Num_meas 50 Statistics based on Num_meas measurements 230 ASSIGN Count TO 703 240 CLEAR 703 Clear the counter and interface 250 OUTPUT Count RST Reset the counter 260 OUTPUT Count CLS Clear event registers and error queue 270 OUTPUT Count SRE 0 Clear service request enable register 280 OUTPUT Count ESE 0 Clear event status enable register 290 OUTPUT Count ST...

Page 133: ...ERAGE TYPE MAX CALC3 DATA 580 ENTER Count Maximum 590 OUTPUT Count CALC3 AVERAGE TYPE MIN CALC3 DATA 600 ENTER Count Minimum 610 OUTPUT Count CALC3 AVERAGE TYPE MEAN CALC3 DATA 620 ENTER Count Mean 630 OUTPUT Count CALC3 AVERAGE TYPE SDEV CALC3 DATA 640 ENTER Count Sdev 650 PRINT 660 PRINT Serial Poll Serial_poll Should be 96 670 PRINT 680 PRINT USING 21A 22A X 8A Minimum Period Minimum seconds 69...

Page 134: ...REEN 190 ASSIGN Count TO 703 200 CLEAR 703 Clear the counter and interface 210 OUTPUT Count RST Reset the counter 220 OUTPUT Count CLS Clear event registers and error queue 230 OUTPUT Count SRE 0 Clear service request enable register 240 OUTPUT Count ESE 0 Clear event status enable register 250 OUTPUT Count STAT PRES Preset enable registers and transition 260 filters for operation and questionable...

Page 135: ...ady Where to go when statistics ready 640 ENABLE INTR 7 2 Enable interrupt on SRQ 650 PRINT Waiting for measurement to complete 660 OUTPUT Count INIT CONT ON Set counter to RUN 670 Loop_here WAITING FOR STATISTICS TO COMPLETE 680 GOTO Loop_here 690 700 Stats_ready Statistics are ready 710 S SPOLL 703 Serial poll to see if correct bit is set 720 OUTPUT Count INIT CONT OFF Stop making new measuremen...

Page 136: ... TO 703 Assign I O path for HP 53131A 140 CLEAR Count 150 OUTPUT Count RST Reset the HP 53131A 160 OUTPUT Count CLS Clear event registers and error queue 170 OUTPUT Count SRE 0 Clear service request enable register 180 OUTPUT Count ESE 0 Clear event status enable register 190 OUTPUT Count STAT PRES Preset enable registers and 200 transition filters for operation and 210 questionable status structu...

Page 137: ... system to UNSECURE the counter prior to calibration 90 using the security system to SECURE the counter after calibration 100 These tasks are coded below 110 120 PROGRAM SHOWS 130 FINE Time Interval Calibration 140 QUICK Time Interval Calibration 150 160 Storing current calibration values before recalibrating as a backup 170 Restoring the backup calibration values 180 190 SECURING and UNSECURING t...

Page 138: ...F Code UNSECURE the device 600 OUTPUT Count CAL SEC STAT verify it is SECURED 610 ENTER Count Device_secure 620 IF Device_secure 1 THEN On operator error loop 630 PRINT Wrong code try again 640 GOSUB Read_errors 650 END IF 660 END WHILE 670 RETURN 680 690 Resecure Routine SECURES the device 700 OUTPUT Count CAL SEC STAT Query the current security status 710 ENTER Count Device_secure Check SECURED ...

Page 139: ...OUTPUT Cal B1 B1 Button 1 on calibrator 1120 OUTPUT Count DIAG CAL TINT FINE1 Counter processes B1 signal 1130 OUTPUT Count DIAG CAL STATUS Query status only to force 1140 program to wait until prior 1150 command has completed 1160 ENTER Count Status Response comes back when box 1170 is ready for next CAL command 1180 1190 OUTPUT Cal B2 B2 Button 2 on calibrator 1200 OUTPUT Count DIAG CAL TINT FIN...

Page 140: ...swer 1450 END IF 1460 IF Answer 1 1 y OR Answer 1 1 Y THEN 1470 PRINT Restoring saved data 1480 OUTPUT Count CAL DATA Head1 Cal_data Send calibration data 1490 END IF 1500 GOSUB Read_errors 1510 RETURN 1520 1530 Wait_for_input 1540 INPUT Input signal ready Answer 1550 WHILE Answer 1 1 Y AND Answer 1 1 y 1560 INPUT Input signal ready Answer 1570 END WHILE 1580 RETURN 1590 1600 Read_errors 1610 REPE...

Page 141: ... before these lines are executed 210 OUTPUT Count FORMAT ASCII ASCII format for fastest throughput 220 OUTPUT Count FUNC FREQ 1 Select frequency 230 OUTPUT Count EVENT1 LEVEL 0 Set Ch 1 trigger level to 0 volts 240 OUTPUT Count FREQ ARM STAR SOUR IMM These two lines enable the 250 OUTPUT Count FREQ ARM STOP SOUR IMM AUTO arming mode 260 OUTPUT Count ROSC SOUR INT Use internal oscillator If 270 you...

Page 142: ...K Dummy for the expected frequency 530 OUTPUT Count FREQ EXP1 VAL Dummy Tell the counter what frequency 540 to expect on Ch 1 This number 550 must be within 10 of the input 560 frequency Using this greatly 570 increases throughput When 580 high throughput is not needed 590 the expected value is not 600 required 610 FOR I 1 TO 200 620 TRIGGER Count Trigger the counter and read 630 ENTER Count A I 6...

Page 143: ...LOCAL 703 170 SUBEND 180 SUB Macro_enable Enable macros Default is disabled 190 OUTPUT 703 EMC 1 200 DISP Macros Enabled 210 LOCAL 703 220 SUBEND 230 SUB Disable_macro Disable macros 240 OUTPUT 703 EMC 0 250 DISP Macros Disabled 260 SUBEND 270 SUB Display_macros Display available macros 280 CLEAR SCREEN 290 DIM Macros 6500 300 OUTPUT 703 LMC 310 ENTER 703 Macros 320 PRINT 330 PRINT The following m...

Page 144: ...9 Header VAL Length Macro 610 OUTPUT 703 Send 620 SUBEND 630 SUB Macro_query Ask for the definition of a macro 640 DIM Name 25 Macro 255 650 CLEAR SCREEN 660 CALL Display_macros 670 LINPUT Enter the name of the macro you want to see Name 680 IF Name THEN SUBEXIT 690 OUTPUT 703 GMC CHR 39 Name CHR 39 700 ENTER 703 Macro 710 PRINT 720 PRINT Macro Name is defined as follows 730 PRINT 740 PRINT Macro ...

Page 145: ...nt is 20 per measurement source 703 Counter at address 3 isc 7 Select code 7 state 1 Used in IOEOI CLS Clear screen CALL IOEOI isc state Make sure EOI enabled CALL IOCLEAR source Clear the counter and interface CALL sendhp RST Reset counter CALL sendhp CLS Clear event registers and error queue CALL sendhp SRE 0 Clear service request enable register CALL sendhp ESE 0 Clear event status enable regis...

Page 146: ...s 3 isc 7 Select code 7 complete 0 Used to check if stats received state 1 Used in IOEOI priority 1 Used in IOPEN CLS Clear the screen CALL IOEOI isc state Make sure EOI enabled CALL IOCLEAR source Clear the counter and interface CALL sendhp RST Reset counter CALL sendhp CLS clear event registers and error queue CALL sendhp SRE 0 clear service request enable register CALL sendhp ESE 0 clear event ...

Page 147: ... measurements Loophere Wait here until out of limit IF complete THEN GOTO endprogram If already serviced out of limit GOTO Loophere then end program limitfail complete 1 Test bit CALL IOSPOLL source statusbyte Check status byte Should be 72 PRINT Status byte statusbyte CALL sendhp FETCH PERIOD Fetch the out of limits period CALL IOENTERS source period 23 actf Read the out of limit period PRINT Out...

Page 148: ...he Service Request Register to summarize that input the SRE 128 command must be used This enables the Service Request Register to assert the SRQ line when the measurement is complete 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 Add...

Page 149: ...ect bit is summarized CALL sendhp SRE 32 in the Status Byte Register when the measurement is complete PRINT Waiting for measurement to complete ON PEN GOSUB statsready Wait for interrupt PEN ON CALL IOPEN isc priorty CALL sendhp INIT OPC Enable OPC bit and start meas loophere IF complete THEN GOTO endprogram Wait here if already made GOTO loophere stats measurements then goto endprogram statsready...

Page 150: ...us byte variable DIM complete AS INTEGER Variable used in the program DIM statusbyte AS INTEGER Status Byte variable DIM maximum AS STRING 23 Strings used to enter stats DIM minimum AS STRING 23 DIM mean AS STRING 23 DIM sdev AS STRING 23 DIM nummeas AS INTEGER Number of measurements DIM lower AS SINGLE Lower limit DIM upper AS SINGLE Upper limit nummeas 50 Number of statistics measurements lower ...

Page 151: ...asserted CALL sendhp CALC3 LFIL STATE ON Enable statistics filter CALL sendhp CALC3 LFIL LOWER STR lower Set lower stats limit CALL sendhp CALC3 LFIL UPPER STR upper Set upper stats limit CALL sendhp CALC3 AVER ON Enable statistics CALL sendhp CALC3 AVER COUNT STR nummeas Set number of measurements to use in statistics calculation CALL sendhp CALC2 LIM STATE ON Enable limit testing Must do this to...

Page 152: ... 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 CALL IOENTERS source mean maxelem actual CALL sendhp CALC3 AVERAGE TYPE SDEV CALC3 DATA CALL IOENTERS source sdev maxelem actual PRINT PRINT Minimum Period minimum PRINT Maximum Period maximum PRINT Mean Period mean PRINT Standard D...

Page 153: ... CALL IOEOI isc state Make sure EOI enabled CALL IOCLEAR source Clear the counter and interface CALL sendhp RST Reset HP counter CALL sendhp CLS Clear event registers and error queue CALL sendhp SRE 0 Clear service request enable register CALL sendhp ESE 0 Clear event status enable register CALL sendhp STAT PRES Preset enable registers and transition filters for operation and questionable status s...

Page 154: ...atted data gives results to the correct resolution Must be read into a string Also provides the fastest data transfer maxelem 22 Maximum number of characters expected actual 0 Returns actual characters received source 703 Counter at address 3 isc 7 Select code 7 state 1 Used in IOEOI CLS 0 CALL IOEOI isc state Make sure EOI enabled CALL IOCLEAR source Clear the counter and interface CALL sendhp RS...

Page 155: ...L sendhp HCOPY CONT OFF Do not update printing operations CALL sendhp ROSC SOUR INT CALL sendhp ROSC EXT CHECK OFF CALL sendhp DIAG CAL INT AUTO OFF Disable automatic interpolator calibration The most recent calibration factors will be used in the calculation for frequency CALL sendhp DDT 15FETC Define trigger as fetc CALL sendhp DISP ENABLE OFF Turn off the display CALL sendhp READ FREQUENCY Read...

Page 156: ... answer AS STRING DIM namemacro AS STRING DIM commandmacro AS STRING DIM results AS STRING 6400 DIM macros AS STRING source 703 HP 53131A at address 3 isc 7 Select code 7 state 1 CLS CALL IOEOI isc state Make sure EOI enabled CALL sendhp RST Reset the counter CALL sendhp CLS Clear event registers and error queue CALL sendhp SRE 0 Clear service request enable register CALL sendhp ESE 0 Clear event ...

Page 157: ...cro memory freemacro RETURN enablemacro Enable all macros sendhp EMC 1 PRINT Macros Enabled RETURN displaymacro Display macros available in counter CLS sendhp LMC CALL IOENTERS source results maxlength actual macros LEFT results actual PRINT The following macros are available PRINT macros RETURN querymacro Ask for definition of a macro CLS GOSUB displaymacro INPUT Enter the name of the macro you w...

Page 158: ...acro CLS GOSUB displaymacro INPUT Enter the name of the macro to send namemacro IF namemacro THEN RETURN sendhp namemacro RETURN definemacro Define a macro CLS INPUT Enter the name of the macro to be defined namemacro INPUT Enter the commands to be sent commandmacro length LEN commandmacro numchar INT LOG length LOG 10 1 header LTRIM STR numchar PRINT header macrocommand header LTRIM STR length co...

Page 159: ...int state 1 Used in IOEOI int i Used for loop counter int samples 10 Number of measurements to take int length 23 Max number of bytes per measurements char freq 23 Array to hold frequency string IORESET isc Clear the HP IB interface sendhp RST Reset the counter sendhp CLS Clear event registers and error queue sendhp SRE 0 Clear service request enable register sendhp ESE 0 Clear event status enable...

Page 160: ...fetch the data length strlen freq Get length of result so freq length 1 0 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 strcpy hpcmd hpib_cmd length strlen hpcmd error IOOUTPUTS ctr hpcmd length Send command to HP 53131A ...

Page 161: ... in the Operation Status register include stdio h used for printf include dos h used for delay include CHPIB H HP IB library constant declarations include CFUNC H 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 int error void main long isc 7 Select code 7 int condition 1 Used in IOSTA...

Page 162: ...egister sendhp SRE 128 This is the bit from the Operation Status register that is summarized in the Status Byte Register sendhp CALC3 LFIL STAT ON Enable statistics filter sendhp CALC3 LFIL LOWER 1 MHz Set lower limit to 1 MHz sendhp CALC3 LFIL UPPER 2 MHz Set upper limit to 2 MHz sendhp CALC3 AVER ON Enable statistics sendhp CALC3 AVER COUNT 50 Use 50 measurements for stats sendhp CALC2 LIM STAT ...

Page 163: ...h Get the data from the counter sendhp CALC3 AVERAGE TYPE MEAN CALC3 DATA IOENTERS ctr mean length Get the data from the counter sendhp CALC3 AVERAGE TYPE SDEV CALC3 DATA IOENTERS ctr sdev length Get the data from the counter printf Mean frequency s mean printf Minimum frequency s minimum printf Maximum frequency s maximum printf Standard deviation s sdev printf Press a key to continue n getch Fun...

Page 164: ...rror void main long isc 7 Select code 7 int status Used in IOSTATUS int state 1 Used in IOEOI int i Used for loop counter float exp_freq Expected frequency value int readings 1000 Number of measurements to take int length 23 Max number of bytes per measurement char freq 1001 23 Array to hold measurements char destination 130 Used for expected frequency IORESET isc Clear the HP IB interface sendhp ...

Page 165: ...E OFF sendhp DDT 15FETC Define the Trigger command This means the command FETC does not need to be sent for every measurement decreasing the number of bytes transferred over the bus sendhp INIT CONT ON Put the counter in Run mode sendhp FETCH FREQ Fetch the frequency to be IOENTER ctr exp_freq for the expected frequency strcpy destination FREQ EXP1 Copy string sprintf destination strlen destinatio...

Page 166: ...ze 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 strcpy hpcmd hpib_cmd length strlen hpcmd error IOOUTPUTS ctr hpcmd length Send command to HP 53131A if error 0 printf Error during HP IB d Command s n error hpcmd ...

Page 167: ...4 4 Command Reference A Dictionary ...

Page 168: ...criptions are also included on pages 4 31 and 4 42 respectively For each command description where the phrase Sets or queries is used the command setting can be queried by omitting the parameter and appending a to the last command keyword For example INPut COUPling AC DC can be queried with INPut COUPling unless otherwise noted a command described as an event cannot be queried unless otherwise not...

Page 169: ...art of the command s parameter the quotation marks shown must be sent to the Counter unless otherwise noted the command is sequential 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 ...

Page 170: ...ent will be aborted and pending operation flag set false If ABORt is issued while repetitive measurement are being made INIT CONT ON the current measurement in progress will be aborted and the pending operation flag set false Then a new measurement will automatically be initiated and the pending operation flag set true If ABORt is issued while a block of measurements is in progress TRIG COUN AUTO ...

Page 171: ... to transform making it possible to change the configuration of CALCulate and consequently derive a different set of results from the same SENSe data set without re acquiring SENSe data Calculated results are available valid until new results are computed or until relevant instrument state is changed The CALCulate3 subsystem consists of two sub blocks as shown in Figure 4 1 The data flows through ...

Page 172: ...Chapter 4 Command Reference CALCulate Subsystems 4 6 Programming Guide Figure 4 1 The CALCulate Subsystems ...

Page 173: ... The number of significant digits will range from 1 to 15 depending on the measurement resolution Only significant digits will be returned If no valid result exists Not a Number 9 91E37 is returned and error 230 is generated If the current measurement is Totalize or Voltage Peaks Not a Number 9 91E37 is returned and error 221 is generated Query only If this command is issued when math is enabled a...

Page 174: ...to CALC IMM DATA The query form outputs the results of the new calculation This command will not affect CALC2 LIM FCO CALC2 LIM PCO CALC3 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 Only signific...

Page 175: ...ion changes in the CALCulate 1 2 subsystems and immediately have new CALCulate 1 2 results on the same SENSe data Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF This command affects all of the post processing subsystems settings CALC IMM AUTO Note that the Counter powers up with CALC IMM AUTO set to ON but RST sets it to OFF CALCulate 1 MATH Subtree T...

Page 176: ...TH EXPRession SELect SCALE_OFFSET Sets or queries the name of the expression selected for math processing A sequence of ASCII encoded bytes SCALE_OFFSET RST SCALE_OFFSET CALCulate 1 MATH STATe Boolean Sets or queries the math enable This enable specifies whether or not measurement SENSe data will be scaled and offset Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicate...

Page 177: ...s an event that causes the Counter to recalculate existing data without re acquiring data This recalculation also happens automatically when any change is made to the CALCulate 1 2 subsystems while CALC2 IMM AUTO is ON The only limit result that can be truly post processed is CALC2 LIM FAIL The limit counts CALC2 LIM FCO and CALC2 LIM PCO reflect measurements that were limit tested at time of data...

Page 178: ...Se data Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF This command affects all of the post processing subsystems settings CALC 1 IMM AUTO Note that the Counter powers up with CALC2 IMM AUTO set to ON but RST sets it to OFF The only limit result that can be truly post processed is CALC2 LIM FAIL The limit counts CALC2 LIM FCO and CALC2 LIM PCO reflect...

Page 179: ...LC2 LIM FCOunt and CALC2 LIM PCOunt information Turn off the front panel display s Limit annunciator Set the Limit Detect output of the RS 232 connector to the in limit voltage level When AUTO is OFF the only way to clear the limit test results is to send CALC2 LIM CLE IMM CALCulate2 LIMit CLEar IMMediate This command is an event that causes the Counter to immediately invalidate the limit data cle...

Page 180: ...n titled How to Program the Counter to Display Results in Chapter 3 for programming examples Limit Modes CALCulate2 LIMit FAIL Queries the status of the last measurement that was limit tested Single ASCII encoded byte 0 or 1 A value of zero indicates the last tested measurement passed the limit test A value of one indicates the last tested measurement failed If no valid result exists 0 is returned...

Page 181: ... number of measurements that have failed the limit test No failures is indicated by 0 Numeric 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 If the current measurement is Totalize or Voltage Peaks 0 is returned and error 221 is generated Query only CALCulate2 LIMit F...

Page 182: ...9999990000E 12 11 digits Numeric data transferred as ASCII bytes in NR3 format with eleven significant digits RST 0 0000000000 This command couples CALC3 LFIL LOW to the same value Updating the lower limit value causes the limit counts CALC2 LIM FCO CALC2 LIM PCO to be cleared The front panel menu item is not always able to display all of the significant digits of this value When this is the case ...

Page 183: ...is Totalize or Voltage Peaks 0 is returned and error 221 is generated Query only CALCulate2 LIMit STATe Boolean Sets or queries the limit test enable Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF When CALC2 LIM STAT OFF is sent it causes the Counter to Invalidate the limit data and clear the information in CALC2 LIM FAIL CALC2 LIM FCOunt and CALC2 LI...

Page 184: ...9999990000E 12 11 digits Numeric data transferred as ASCII bytes in NR3 format with eleven significant digits RST 0 0000000000 This command couples CALC3 LFIL UPP to the same value Updating the upper limit value causes the limits counts CALC2 LIM FCO CALC2 LIM PCO to be cleared The front panel menu item is not always able to display all of the significant digits of this value When this is the case...

Page 185: ...composite result Not until CALCulate3 AVERage STATe is set to ON will any of one CALCulate3 AVERage settings be used CALCulate3 AVERage ALL This query returns all four statistics i e mean standard deviation maximum and minimum Statistics should be enabled CALC3 AVER STATe ON before attempting to query results Numeric data transferred as ASCII bytes in NR3 format The number of significant digits wi...

Page 186: ...stics current count to 0 and report the negative status condition NOT Computing Statistics to bit 8 of the Operation Status Register If CALC3 AVER STATe is OFF error 221 is generated CALCulate3 AVERage COUNt numeric_value Sets or queries the number of measurements to combine for statistics processing After CALC3 AVER COUNt measurements is reached a new set of CALC3 AVER COUNt measurements must be ...

Page 187: ...esults exist until the CALC3 AVER COUN CURR is equal to the specified CALC3 AVER COUN Stats CALCulate3 AVERage STATe Boolean Sets or queries the statistics post processing enable Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF When this enable is ON and TRIG COUN AUTO is ON and SENS FUNC ON is not Totalize or Voltage Peak function then INIT IMM initiat...

Page 188: ...tatistical result specified by CALC3 AVER TYPE Enable statistics CALC3 AVER STATe ON before attempting to query results 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 Only significant digits will be...

Page 189: ...puting statistics out of limit measurements can be filtered out of the statistics processing Not until CALCulate3 LFILter STATe is set to ON will any of the CALCulate3 LFILter settings be used CALCulate3 LFILter LOWer DATA numeric_value HZ S DEG Sets or queries the statistics filter lower limit If limit filtering is enabled CALC3 LFIL STAT ON any measurements below this value will not be combined ...

Page 190: ... STATe Boolean Sets or queries the statistics filter enable When set to ON only measurements scaled and offset if math is enabled which are within the filter limits are combined into the statistics processing When set to OFF all measurements whether they are within or without the filter limits are combined into the statistics processing Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a...

Page 191: ... not always able to display all of the significant digits of this value When this is the case the displayed value is different from the actual value in that the displayed value has been rounded However using the front panel Enter key while this value is in the 11 digit display will update the actual value to the displayed rounded value CALCulate3 PATH Queries the order in which CALCulate3 sub bloc...

Page 192: ...well as the front panel invoked calibrations increment the count upon the completion of a successful calibration DIAG CAL INP 1 2 GAIN AUTO ONCE DIAG CAL INP 1 2 OFFS AUTO ONCE DIAG CAL ROSC AUTO ONCE DIAG CAL TINT FINE 1 2 3 4 DIAG CAL TINT QUICk The CAL DATA command also increments the calibration count Numeric data transferred as ASCII bytes in NR1 format Query only The calibration count is sto...

Page 193: ...w to Read and Store Calibration Information in Chapter 3 Programming Your Universal Counter for Remote Operation Definite Length Block The query response will be 256 56 calibration data bytes terminated with a new line and EOI This command does not affect the interpolator calibration data If the arbitrary block command parameter has the incorrect number of bytes or does not checksum error 220 is g...

Page 194: ...in non volatile memory and is unaffected by power on save recall and RST Scale Offset POWER Calibration Menu CALibration SECurity STATe Boolean NRf Sets and queries the calibration security state To unsecure for calibration specify OFF with the present security code When the Counter is unsecure any calibration can be performed To secure against calibration specify ON with the present security code...

Page 195: ... 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 See the Assembly Level Service Guide for more information Scale Offset POWER Calibration Menu Comments Related Front Panel Keys ...

Page 196: ...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 a description of CONFigure ...

Page 197: ... Device Clear message the Counter clears the input buffer and Output Queue resets the parser execution control and response formatter clears any command that would prevent processing a RST or other commands disables the effect of a prior OPC command and terminates the holdoff action of a WAI OPC or data query MEASure query READ query FETCh query CALC DATA CALC2 LIM FAIL waiting for pending operati...

Page 198: ...ly revisions of the Counter because calibration security does not exist Please refer to the CALibration SECurity subtree for command specifics regarding calibration security DIAGnostic CALibration INPut 1 2 GAIN AUTO ONCE OFF Calibrates the channel 1 or 2 input trigger GAIN when the ONCE parameter is used Before sending this command connect a 5V source to the appropriate input A sequence of ASCII ...

Page 199: ... ON Calibrates the interpolator circuit in the Counter when the ONCE parameter is used AUTO ON enables automatic interpolator calibration on every measurement AUTO OFF disables automatic interpolator calibration A sequence of ASCII encoded bytes OFF or ON RST ON Use DIAG CAL STAT to check for successful calibration After ONCE calibration is completed the state of this command s parameter is OFF Wh...

Page 200: ...atile memory and are unaffected by power on save recall and RST Use DIAG CAL STAT to check for successful calibration After calibration is completed the state of this command s parameter is OFF Scale and Offset POWER Calibration menu DIAGnostic CALibration STATus Queries pass fail status of the last calibration It can be used after any calibration to determine if the calibration was successful Num...

Page 201: ...alibration DIAG CAL TINT FINE2 invokes the second and so on Each step corresponds to the calibration signals produced by each of the four numbered buttons on the HP 59992A J06 Time Interval Calibrator This is a four step calibration all four steps must be successfully completed in sequence starting with step one and ending with step four To restart the calibration from step one power cycle the Cou...

Page 202: ...annels 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 No query The calibration values are stored in non volatile memory and are unaffected by power on save recall and RST Use DIAG CAL STAT to check for successful calibration Scale and Offset POWER Calibration menu Comments Related Front Panel Keys ...

Page 203: ...is visible Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST ON This value is unaffected by save recall DISPlay MENU STATe OFF This command which only allows the OFF parameter disables the menu display When the menu display is disabled the results display appears The query indicates whether the menu display or result display is enabled Single ASCII encoded b...

Page 204: ...f math is disabled CALC MATH STAT OFF the scaled offset measurement if math is enabled CALC MATH STAT ON the limit graph if limit testing is enabled with the graphic display CALC2 LIM STAT ON CALC2 LIM DISP GRAPh CALCulate3 should be used to direct the statistical result if statistics are enabled CALC3 AVER STAT ON to the result display the particular statistic displayed is determined by CALC3 AVE...

Page 205: ...n used in the USA specify decimal point with DPOint To conform to the numerical convention used in many other countries specify COMMa For example With DPOint one thousand is displayed as 1 000 0 With COMMa one thousand is displayed as 1 000 0 A sequence of ASCII encoded bytes DPO or COMM This value is stored in non volatile memory It is unaffected by power on save recall and RST Utility POWER Quer...

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

Page 207: ...ansferred as ASCII bytes in NR3 format The numbers are separated by commas as specified in IEEE 488 2 To indicate that no response data exists Not a Number 9 91E37 is returned When REAL type is selected response data is transferred in a definite length block as a 64 bit IEEE 754 floating point number To indicate that no response data exists Not a Number 9 91E37 is returned in the definite length b...

Page 208: ...mplemented 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 In response to the IEEE 488 1 Group Execute Trigger GET remote interface message while the Counter is addressed to listen the Counter performs the action defined by the DDT command see page 4 124 ...

Page 209: ...inimum and maximum will be printed in addition to the individual measurements If limit testing is enabled CALC2 LIMit STAT ON an indication will be printed for the measurements that fail the limit test Refer to the sections titled Using the Print Menu and To Configure the RS 232 Serial Port for Printing in the Operating Guide for more details on printing Single ASCII encoded byte 0 or 1 A value of...

Page 210: ...st fails The AUTO ON capability is only meaningful when the Counter is limit testing CALC2 LIM STAT is ON and INIT CONT is ON Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF Limit Modes INITiate CONTinuous Boolean Sets or queries the enable for continuously initiated measurements With CONTinuous set to OFF no measurements are made until CONTinuous is s...

Page 211: ... ON the Counter performs an auto trigger on the measurement channel s whenever the INIT CONT ON command is executed and also at the beginning of each measurement cycle while INIT CONT is ON The state of TRIG COUN AUTO has no affect on the operation of INIT CONT ON INIT CONT ON operates as if TRIG COUN was 1 The commencement of the first measurement due to setting INITiate CONTinuous to ON sets the...

Page 212: ...T CONT to OFF Run INITiate IMMediate This event command causes the instrument to initiate either a single measurement or a block of measurements When TRIG COUN AUTO is OFF or CALC3 AVER STAT is OFF or SENS FUNC ON is Totalize function or SENS FUNC ON is any Voltage Peaks function then INIT IMM initiates a single measurement When TRIG COUN AUTO is ON and CALC3 AVER STAT is ON and SENS FUNC ON is no...

Page 213: ... FCOunt and CALC2 LIM PCOunt information turns off the front panel display s Limit annunciator and sets the Limit Detect output to the in limit voltage level This command is an overlapped command see IEEE 488 2 Section 12 Beginning a measurement or block of measurements with an INITiate IMMediate sets the Pending Operation Flag to true Completing the measurement or block of measurements normally o...

Page 214: ...ic data transferred as ASCII bytes in NR1 format RST 1 X10 Attenuate INPut 1 2 COUPling AC DC Sets or queries the input coupling A sequence of ASCII encoded bytes AC or DC RST AC DC AC INPut 1 2 FILTer LPASs STATe Boolean Sets or queries the state of the low pass filter Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST OFF 100kHz Filter Query Response Commen...

Page 215: ...n NR3 format with six significant digits A value of 100E 3 is returned Units are Hertz INPut 1 2 IMPedance numeric_value OHM Sets or queries the input impedance 50Ω or 1MΩ 50 or 1E6 Numeric data transferred as ASCII bytes in NR3 format with six significant digits RST 1E6 OHM Units are Ohms 50Ω 1MΩ Query Response Comments numeric_value Range Query Response Comments Related Front Panel Keys ...

Page 216: ... input coupling A sequence of ASCII encoded bytes AC This command is only available if Option 030 050 is installed INPut3 IMPedance Queries the channel 3 input impedance Numeric data transferred as ASCII bytes in NR3 format with six significant digits The value returned is 50 or Not a Number 9 91E37 if Option 030 050 Channel 3 is not installed Units are Ohms This command is only available if Optio...

Page 217: ...Chapter 4 Command Reference Introduction Programming Guide 4 51 MEASure Subsystem Refer to the Measurement Instructions section on page 4 52 in this chapter for a description of MEASure ...

Page 218: ...tes the measurement process The READ command in turn is composed of the INITiate IMMediate and FETCh commands INITiate IMMediate performs the data acquisition FETCh performs the post processing function if any and places the result in the Output Queue This allows more than one FETCh on a single set of acquired data Summary of the Measurement Instruction Commands MEASure query This command is the s...

Page 219: ...mple Easiest Way to Make a Measurement in Chapter 3 of this guide CONFigure SCALar function parameters source_list Configures the instrument to perform the specified function but does not initiate the measurement Use INITiate FETCh or READ to make and query a measurement Parameters other than source_list may be defaulted from the right by omitting them or anywhere by substituting the keyword DEFau...

Page 220: ...gure or MEASure query the instrument will not track these changes and the query response will not reflect these changes A string of the form function parameters source_list omitting the leading colon from the function The Rise Time Fall Time and Duty Cycle functions each have two ways of being specified This query response will use RTIM FTIM or DCYC to indicate these functions The response is unaf...

Page 221: ...avior is apparent when switching between frequency and period or when switching among the voltage peaks functions Issuing this query while a measurement is in progress has the effect of holding off further commands from being processed until the measurement completes This hold off action can only be canceled by the measurement completing Device Clear or power on Result will be formatted according ...

Page 222: ...surement before initiating the desired measurement and then waiting for the measurement to complete Consequently this has the effect of holding off further commands from being processed until the desired measurement completes This hold off action can only be canceled by the measurement completing Device Clear or power on Result will be formatted according to FORMat DATA ASCii REAL setting When ASC...

Page 223: ... type are frequency to from period voltage minimum to from voltage maximum voltage minimum to from voltage peak to peak and voltage maximum to from voltage peak to peak When SCALar function is omitted the function specified used by the last CONFigure MEASure READ or FETCh will be used if possible This behavior is apparent when switching between frequency and period or when switching among the volt...

Page 224: ...the sub section in this section titled Descriptions of Measurement Functions for descriptions of each measurement function Refer to Table 4 1 for a summary of the function parameters and source_list for each of the measurement functions If READ is executed while the Counter is configured to make an automatically armed Totalize measurement Not a Number 9 91E37 is returned and error 221 is generated...

Page 225: ...reference 1 VOLTage RISE TIME or VOLTage RTIMe lower_reference upper_reference 1 VOLTage TINTerval 1 2 VOLTage TOTalize CONTinuous 1 VOLTage TOTalize TIMed gate_time 1 _______________________ The only functions which can be derived using FETC or READ from the stored data are period to from frequency maximum to from minimum maximum to from peak to peak and minimum to from peak to peak All other fun...

Page 226: ...k 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 thus work around commands must be used The commands that required work around commands are MEASure SCALar VOLTage MAXimum parameters source_list MEASure SCALar VOLTage MINimum parameters ...

Page 227: ...s used to configure the trigger settings When the reference is specified as a percentage or defaulted auto trigger is enabled and auto trigger levels are set to the specified or defaulted reference value When the reference is specified in volts auto trigger is disabled and the absolute trigger levels are set to the specified reference value reference percent range 0 to 100 PCT percent resolution 1...

Page 228: ...hannel 2 trigger settings respectively When a reference is specified as a percentage or defaulted auto trigger is enabled and auto trigger level is set to the specified or defaulted value When a reference is specified in volts auto trigger is disabled and the absolute trigger level is set to the specified value lower_reference percent range 0 to 100 PCT percent resolution 10 voltage range For volt...

Page 229: ...esolution arming setting The Channel 1 or Channel 2 trigger settings are coupled so that the measurement channel has auto trigger enabled at 50 with a positive slope Ch1 Ch2 expected_value range 100 Hz to 225 MHz resolution expected value should be within 10 of input frequency for optimum arming configuration default 10 MHz Ch1 Ch2 resolution description value indicates decade corresponding to lea...

Page 230: ...0 GHz resolution expected_value should be within 10 of input frequency for optimum arming configuration default 500 MHz Ch3 resolution description value indicates decade corresponding to least significant digit of the result range 1E 7 to1E7 Hz value which indicates 3 to 15 digits of resolution for the specified expected value resolution resolution should use a mantissa of 1 0 and be an even power...

Page 231: ...rigger settings are coupled so that the measurement channels have auto trigger enabled at 50 with a positive slope expected_value range for Ch1 Ch2 Ch1 Ch3 1 00E 10 to 1 00E11 range for Ch2 Ch1 Ch3 Ch1 1 00E 11 to 1 00E10 resolution expected_value should be within 10 of ratio for optimum arming configuration default 1 resolution description value indicates decade corresponding to least significant...

Page 232: ...o 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 source_list range 1 2 1 3 2 1 3 1 default 1 2 MEASure SCALar VOLTage MAXimum 1 2 Measures Voltage Maximum source_list range 1 2 default 1 MEASure SCALar VOLTage MINimum 1 2 Measures Voltage Minimum source_list range 1 2 default 1...

Page 233: ...arameter is used to configure the trigger settings When the reference is specified as a percentage or defaulted auto trigger is enabled and auto trigger levels are set to the specified or defaulted reference value When the reference is specified in volts auto trigger is disabled and the absolute trigger levels are set to the specified reference value reference percent range 0 to 100 PCT percent re...

Page 234: ... settings are coupled so that the measurement channel has auto trigger enabled at 50 with a positive slope Ch1 Ch2 expected_value range 4 4 ns to 10 0 sec resolution expected value should be within 10 of input period for optimum arming configuration default 100 ns Ch1 Ch2 resolution description value indicates decade corresponding to least significant digit of the result range 1E 23 to 1E 2 sec va...

Page 235: ...od for optimum arming configuration default 2 ns Ch3 resolution description value indicates decade corresponding to least significant digit of the result range 1E 24 to 1E 11 sec value which indicates 3 to 15 digits of resolution for the specified expected value 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 th...

Page 236: ... default 1 MEASure SCALar VOLTage PWIDth reference 1 Measures Positive Pulse Width The measurement arming is coupled to auto The reference specifies the point on the pulse where the positive pulse width is determined This point can be specified as either a percentage or an absolute voltage The default units are percent The reference parameter is used to configure the trigger settings When the refe...

Page 237: ...asures Rise 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 rising edge of an input signal applied to channel 1 These reference points can be specified as either a percentage or an absolute voltage The default units are percent The lower_reference and upper_reference parameters are used to configure...

Page 238: ...olts 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 default 10 PCT upper_reference percent range 0 to 100 PCT percent resolution 10 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 Attenuati...

Page 239: ... routing is coupled to separate inputs source_list range 1 2 default 1 2 CONFigure SCALar VOLTage TOTalize CONTinuous 1 Configures the Counter for Totalize with auto arming The trigger settings are coupled so that the measurement channel has auto trigger disabled with a positive slope Use ABORt to terminate the measurement before querying for the totalize result This function continuous totalize a...

Page 240: ...time The totalize gate mode is set to time and the totalize gate time is defaulted or set to the specified value The trigger settings are coupled so that the measurement channel has auto trigger disabled with a positive slope gate_time range For short gate time 100E 5 to 999E 5 seconds For long gate time 10E 3 to 1000 000 seconds resolution For short gate time 1E 5 seconds For long gate time 1E 3 ...

Page 241: ...lity MEASure causes the Counter to configure itself for a default measurement starts the measurement and queries the result The following example shows how to use query to measure frequency Use MEASURE FREQ to execute a default frequency measurement and have the result sent to the controller The Counter will select settings and carry out the required measurement moreover it will automatically star...

Page 242: ...gure and READ to specify a particular setting For example use CONF FREQ 5 MHZ 1HZ to configure a default frequency measurement where 1 Hz is the required resolution and 5 MHz is the expected value Use SENS EVEN LEV 0V to set the trigger level to 0 Volts Use READ to start the measurement and query the result Using CONFigure with INITiate and FETCh The READ query is composed of the INITiate command ...

Page 243: ...uld 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 CONFigure SCALar VOLTage MAXimum parameters source_list INIT WAI FETCh CONFigure SCALar VOLTage MINimum parameters source_list INIT WAI FETCh CONFigure S...

Page 244: ...d below INIT WAI 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 INIT WAI FETCh When the function is set to Voltage Peaks and the Counter is in RUN mode the HP IB command F...

Page 245: ...on as MEMory DELete MACRo Note however that the Counter complies with IEEE 488 2 1987 Event no query See PMC page 4 135 if you want to delete all macros MEMory FREE MACRo Queries the memory usage and availability corresponding to macro data A total of 6500 bytes is dedicated to macro memory Numeric data transferred as ASCII bytes in NR1 format Two numbers transferred as ASCII bytes in NR1 format a...

Page 246: ... format The number of significant digits will range from 1 to 15 depending on the measurement resolution If no valid result exists Not a Number 9 91E37 is returned and error 230 is generated If this query is executed while an automatically armed Totalize measurement is in progress Not a Number 9 91E37 is returned and error 221 is generated ABORt should be used to terminate the measurement and avoi...

Page 247: ...ion of the Counter Current Firmware Revision Sets or queries the size of the hysteresis window as a percentage of the allowable hysteresis For example 0 is the minimum hysteresis setting and 100 is the maximum hysteresis setting Specifying 100 or MAXimum provides the greatest noise immunity lowest sensitivity while specifying 0 or MINimum provides the least noise immunity most sensitive Prior Firm...

Page 248: ...pe or at the bottom of the hysteresis window for NEGative slope X1 Attenuation 5 125 to 5 125V X10 Attenuation 51 25 to 51 25V X1 Attenuation 005V X10 Attenuation 05V Numeric data transferred as ASCII bytes in NR3 format with six significant digits Execution of this command turns SENS EVEN 1 2 LEV AUTO to OFF The query can be used to determine the current trigger level when auto trigger is enabled...

Page 249: ... triggering if no triggering is found the Counter will measure and compute new trigger level s Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON RST ON Explicitly selecting a trigger level with SENS EVEN 1 2 LEV ABS turns AUTO OFF Trigger Sensitivity SENSe EVENt 1 2 LEVel RELative numeric_value PCT Sets or queries the percentage of the peak to peak range of the ...

Page 250: ...ith the NEGative slope selected the negative going edge of the signal will define an event at the lower hysteresis limit A sequence of ASCII encoded bytes POS or NEG RST POSitive The slopes used for Rise Fall Time Pulse Width and Duty Cycle measurements are independent of this setting Trigger Sensitivity SENSe EVENt3 Subtree This subtree queries the characteristics of the trigger event for channel...

Page 251: ...ination of start stop arming sources are valid STARt SOURce STOP SOURce Front Panel Gating Settings GATE STOP IMMediate IMMediate AUTO _______ IMMediate TIMer TIME _______ IMMediate DIGits DIGITS _______ EXTernal EXTernal EXTERNAL POS NEG EXTernal TIMer EXTERNAL TIME EXTernal IMMediate EXTERNAL AUTO SENSe FREQuency ARM STARt SLOPe POSitive NEGative Sets or queries the slope of the external start a...

Page 252: ...ements 3 to 15 Numeric data transferred as ASCII bytes in NR1 format RST 4 Only applies when SENS FREQ ARM STOP SOUR DIG is selected Gate ExtArm SENSe FREQuency ARM STOP SLOPe POSitive NEGative Sets or queries the slope of the external stop arm signal used in external arming Frequency Frequency Ratio and Period measurements A sequence of ASCII encoded bytes POS or NEG RST NEGative Only applies whe...

Page 253: ...es the gate time used in arming Frequency Frequency Ratio and Period measurements For short gate time 1E 3 to 99 99E 3 seconds For long gate time 100E 3 to 1000 000 seconds For short gate time 0 01E 3 seconds For long gate time 1E 3 seconds Numeric data transferred as ASCII bytes in NR3 format with six significant digits RST 100E 3 S Only applies when SENS FREQ ARM STOP SOUR TIM is selected Gate E...

Page 254: ...E9 HZ For channel 3 Option 050 the frequency range is 200E6 to 5E9 HZ Numeric data transferred as ASCII bytes in NR3 format with fifteen significant digits If SENS FREQ EXP 1 2 3 AUTO is ON Not a Number 9 91E37 is returned and error 221 is generated This value is unaffected by save recall SENSe FREQuency EXPected 1 2 3 AUTO ON The command which only allows the ON parameter configures the Counter t...

Page 255: ...cribed pre measurement step is to specify an expected frequency with SENS FREQ EXP 1 2 3 SENSe FUNCtion ON sensor_function Sets or queries the sensor_function to be sensed by the Counter The sensor_function strings are XNONe DCYCle 1 or XNONe PDUTycycle 1 XNONe FALL TIME 1 or XNONe FTIMe 1 XNONe FREQuency 1 2 3 XNONe FREQuency RATio 1 2 1 3 2 1 3 1 XNONe NWIDth 1 XNONe PERiod 1 2 3 XNONe PHASe 1 2...

Page 256: ...on is omitted from the sensor_function a default channel selection is made For Frequency Period Rise Time Fall Time Pulse Width Duty Cycle Totalize and Voltage Peaks the default is Channel 1 For Time Interval Frequency Ratio and Phase the default is Channel 1 to Channel 2 When the sensor function is changed to XNONe TINTerval 1 2 the input routing is set to separate SENS EVEN2 FEED INP2 Use SENS E...

Page 257: ...ingle measurement Freq Ratio Time Period and Other Meas SENSe PHASe Subtree This subtree controls the Phase measuring capabilities of the instrument SENSe PHASe ARM Subtree This subtree is used to synchronize the Phase start arm with events STARt SOURce Front Panel Arming Mode IMMediate AUTO EXTernal EXTERNAL SENSe PHASe ARM STARt SLOPe POSitive NEGative Sets or queries the slope of the external s...

Page 258: ...lected SENS ROSC SOUR is EXT and SENS ROSC SOUR AUTO is OFF the 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 CHECk ONCE is an event which invokes the external reference check at th...

Page 259: ... reference timebase is external but the frequency is not known because it is not 1 5 or 10 MHz and SENS ROSC SOUR AUTO is OFF Not a Number 9 91E37 is returned If the current reference timebase is internal Not a Number 9 91E37 is returned Query only SENSe ROSCillator SOURce INTernal EXTernal Sets or queries current reference timebase INTernal indicates the timebase is the internal reference EXTerna...

Page 260: ...ting a reference timebase When AUTO is ON the Counter will automatically select the external reference signal as the reference timebase when a valid signal 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 When AUTO is OFF the reference timebase is selected with S...

Page 261: ...nchronize the time interval start and stop arm with events The following combination of start stop arming sources are valid STARt SOURce STOP SOURce Front Panel Arming Settings ARM DELAY IMMediate IMMediate AUTO NONE IMMediate TIMer AUTO TIME EXTernal IMMediate EXTERNAL NONE EXTernal TIMer EXTERNAL TIME SENSe TINTerval ARM STARt SLOPe POSitive NEGative Sets or queries the slope of the external sta...

Page 262: ...SENS TINT ARM STOP SOUR command has no affect on the following measurements Risetime Falltime Duty Cycle and Pulse Width Gate ExtArm SENSe TINTerval ARM STOP TIMer numeric_value S Sets or queries the time used to delay the stop arm for Time Interval measurements For short gate time 0 1E 3 to 99 99E 3 seconds For long gate time 100E 3 to 10 000 seconds For short gate time 0 01E 3 seconds For long g...

Page 263: ...tes in NR3 format with six significant digits 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 Gate ExtArm Query Response Comments Related Front Panel Keys ...

Page 264: ...ies of the HP 53131A and the HP 53132A with a serial number prefix below 3646 SENSe TINTerval ARM ESTART and ESTOP Subtrees HP 53132A With S N Prefix 3646 and Above These subtrees are used to synchronize the time interval start and stop arm with events The following table defines the valid combinations of start stop arming for Time Interval only HP recommends that SCPI programs issue arming comman...

Page 265: ...ernal IMMediate EXTernal INTernal2 EXT NONE EXT EVENT EXTernal TIMer IMMediate IMMediate EXT TIME AUTO NONE EXTernal TIMer IMMediate TIMer EXT TIME AUTO TIME EXTernal TIMer IMMediate INTernal2 EXT TIME AUTO EVENT EXTernal TIMer EXTernal IMMediate EXT TIME EXT NONE EXTernal TIMer EXTernal TIMer EXT TIME EXT TIME EXTernal TIMer EXTernal INTernal2 EXT TIME EXT EVENT EXTernal INTernal1 IMMediate IMMed...

Page 266: ...diate EXTernal Sets or queries the start arm for time interval including Time Interval Risetime Falltime Duty Cycle and Pulse Width functions measurements A sequence of ASCII encoded bytes IMM or EXT RST IMMediate Gate ExtArm SENSe TINTerval ARM ESTART LAYer 1 ECOunt numeric_value Sets or queries the number of events used to delay the start arm for Time Interval measurements 1 to 99 999 999 1 Nume...

Page 267: ...easurements Risetime Falltime Duty Cycle and Pulse Width Gate ExtArm SENSe TINTerval ARM ESTART LAYer 1 TIMer numeric_value S Sets or queries the time used to delay the start arm for Time Interval measurements 100E 9 to 0 999 999 9 seconds 100E 9 seconds Numeric data transferred as ASCII bytes in NR1 format RST 100E 9 seconds Only applies when SENS TINT ARM ESTART LAYer 1 SOUR TIM is selected The ...

Page 268: ...diate EXTernal Sets or queries the stop arm for time interval including Time Interval Risetime Falltime Duty Cycle and Pulse Width functions measurements A sequence of ASCII encoded bytes IMM or EXT RST IMMediate Gate ExtArm SENSe TINTerval ARM ESTOP LAYer 1 ECOunt numeric_value Sets or queries the number of events used to delay the st op arm for Time Interval measurements 1 to 99 999 999 1 Numeri...

Page 269: ...alue S Sets or queries the time used to delay the stop arm for Time Interval measurements For short delay 100E 9 to 0 999 999 9 seconds For long delay 1 000 to 10 000 seconds For short delay 100E 9 seconds For long delay 1E 3 seconds Numeric data transferred as ASCII bytes in NR1 format RST 100E 9 S Only applies when SENS TINT ARM ESTOP LAYer 1 SOUR TIM is selected The SENS TINT ARM ESTOP LAYer 1 ...

Page 270: ... are valid STARt SOURce STOP SOURce Front Panel Gating Settings GATE STOP IMMediate IMMediate AUTO _______ IMMediate TIMer TIME _______ EXTernal EXTernal EXTERNAL POS NEG EXTernal TIMer EXTERNAL TIME SENSe TOTalize ARM STARt SLOPe POSitive NEGative Sets or queries the slope of the external start arm signal used in external arming Totalize measurements A sequence of ASCII encoded bytes POS or NEG R...

Page 271: ...talizing and ABORt to terminate No valid totalize result will exist until the auto totalize measurement is terminated Gate ExtArm SENSe TOTalize ARM STOP SLOPe POSitive NEGative Sets or queries the slope of the external stop arm signal used in external arming Totalize measurements A sequence of ASCII encoded bytes POS or NEG RST NEGative Only applies when SENS TOT ARM STOP SOUR EXT is selected Gat...

Page 272: ...rement is terminated Gate ExtArm SENSe TOTalize ARM STOP TIMer numeric_value S Sets or queries the gate time used in arming Totalize measurements For short gate time 1E 3 to 99 99E 3 seconds For long gate time 100E 3 to 1000 000 seconds For short gate time 0 01E 3 seconds For long gate time 1E 3 seconds Numeric data transferred as ASCII bytes in NR3 format with six significant digits RST 100E 3 S ...

Page 273: ...an enable register The commands in this subtree allow you to control and monitor these registers See the section titled Operation Status Register Group and Questionable Data Signal Status Register Group on page 3 32 in Chapter 3 for a detailed description of the Operation Status Register Group Figure 4 2 The Operation Status Register Group STATus OPERation CONDition Queries the status of the Opera...

Page 274: ...nt Status Enable Register is cleared value is 0 This value is unaffected by RST and save recall STATus OPERation EVENt Queries the status of the Operation Event Status Register The Operation Event Status Register captures changes in conditions by having each event bit correspond to a specific condition bit in the Operation Condition Status Register An event becomes TRUE when the associated conditi...

Page 275: ...rred as ASCII bytes in NR1 format At power on and STAT PRES the negative transition filter is preset such that each bit is a 0 FALSE This value is unaffected by RST and save recall STATus OPERation PTRansition non decimal numeric NRf Sets or queries the positive transition filter for the Operation status reporting structure The parameter and query response value when rounded to an integer value an...

Page 276: ...h that each bit is a 1 TRUE STATus QUEStionable Subtree The STATus QUEStionable subtree commands allow you to examine the status of the Counter monitored by the Questionable Data Signal Status Register group shown in Figure 4 3 The Questionable Status group consists of a condition register two transition registers an event register and an enable register The commands in this subtree allow you to c...

Page 277: ...tus 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 Questionable Data Event Status Enable Register The value of unused bits is zero when queried and ignored when set This register is used to enable a single or inclusive OR group of Questionable Data Event Status Register events to be summarized ...

Page 278: ...eger formed by the binary weighting of bits The value of unused bits is zero STATus QUEStionable NTRansition non decimal numeric NRf Sets or the negative 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 negative transition filter The value of...

Page 279: ...sed bits is zero when queried and ignored when set A TRUE bit in the positive transition filter specifies that a positive FALSE to TRUE transition of the corresponding bit in the Questionable Data Condition Status Register generates the corresponding event in the Questionable Data Event Status Register The range of the non decimal numeric or NRf parameter is 0 to 65 535 Numeric data transferred as...

Page 280: ...the RS 232 connector is always asserted HIGH to always be ready to allow data to be sent to the printer Choose the ON parameter when the printer or cable you are using does not support handshaking The IBFull parameter which is equivalent to DTR HW PACE in the front panel Utility menu sets the RS 232 DTR line to indicate when the device is ready to receive When the number of received bytes in the i...

Page 281: ...eric_value parameter are 300 1200 2400 9600 19200 Numeric data transferred as ASCII bytes in NR1 format This value is stored in non volatile memory It is unaffected by power on save recall and RST Utility POWER SYSTem COMMunicate SERial TRANsmit PACE XON NONE Sets or queries the software pacing scheme A sequence of ASCII encoded bytes XON or NONE This value is stored in non volatile memory It is u...

Page 282: ...error_description The error_number is an integer in the range 32768 32767 The negative error numbers are defined by the SCPI standard positive error numbers are particular to this Counter An error number value of zero indicates that the Error Queue is empty The maximum length of the error_description is 255 characters The queue is cleared emptied on CLS power on or upon reading the last error from...

Page 283: ...as 2 s 26 Gate ExtArm 5 g 27 Uppr Lower 7 Channel 1 Trigger Sensitivity 13 Limit Modes 8 Channel 1 50Ω 1MΩ 14 Scale Offset 10 Channel 1 DC AC 15 Stats 11 Channel 1 X10 Attenuate 16 Recall Utility 3 Channel 1 100kHz Filter 17 Save Print 6 Channel 2 Trigger Sensitivity 19 Run 9 Channel 2 50Ω 1MΩ 20 Stop Single 12 Channel 2 DC AC 21 29 Channel 2 X10 Attenuate 22 Enter 30 Channel 2 100kHz Filter 23 1 ...

Page 284: ...s ASCII bytes in NR1 format A value of 1 indicates the queue is empty Numbers representing key codes are separated by commas The key codes appear in a last in first out sequence The maximum number of key codes is 500 Each key code has a range of 1 to 30 At RST and power on the Key Queue is cleared emptied The Key Queue is unaffected by save recall SYSTem VERSion Queries the SCPI version number wit...

Page 285: ...0000000E 13 to 9 9999990000E 12 11 digits Response will be formatted according to FORMat DATA ASCii REAL setting When ASCii format is used the numeric data is transferred as ASCII bytes in NR3 format with eleven significant digits RST 0 0000000000 Updating the offset causes the limit counts CALC2 LIM FCO CALC2 LIM PCO to be cleared The front panel menu item is not always able to display all of the...

Page 286: ...R3 format with eleven significant digits RST 1 000000 Updating the scale causes the limit counts CALC2 LIM FCO CALC2 LIM PCO to be cleared The front panel menu item is not always able to display all of the significant digits of this value When this is the case the displayed value is different from the actual value in that the displayed value has been rounded However using the front panel Enter key...

Page 287: ...n statistics are enabled CALC3 AVER STAT is ON INIT IMM will initiate a complete block of N CALC3 AVER COUN valid measurements when statistics are enabled CALC3 AVER STAT is ON and limit filtering is enabled CALC3 LFIL STAT is ON INIT IMM will initiate a complete block of N CALC3 AVER COUN valid in limit measurements when statistics are disabled CALC3 AVER STAT is OFF INIT IMM initiates a single m...

Page 288: ... Calibration Query CAL 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 without error A value of one indicates the calibration completed with error Query Response ...

Page 289: ... command will not clear data memories or any other settings It also places the instrument in Operation Complete Idle State and Operation Complete Query Idle State IEEE 488 2 This results in the disabling of any prior OPC command If CLS immediately follows a program message terminator the output queue and the MAV bit are cleared because any new program message after a program message terminator cle...

Page 290: ...AD or FETCh otherwise error 224 is generated If a zero length arbitrary block is specified as the parameter the Counter will do nothing when it receives a GET or TRG command Definite length block The query response will be one of the following 14INIT 15FETC 15READ 0 terminated with a new line and EOI RST 14INIT When defining the device trigger to FETCh or READ note that these definitions do not al...

Page 291: ...may be executed by disabling macros The arbitrary block contains the sequence of commands queries being labeled Parameters may be passed to the sequence during execution Placeholders for parameters appear in the sequence as a dollar sign followed by a single digit in the range one to nine inclusive The first parameter following the macro label is substituted for the parameter placeholder labeled 1...

Page 292: ...name as a macro The value of the numeric parameter determines whether the defined macros are enabled or disabled A value that rounds to an integer value of zero disables any defined macros A value that rounds to an integer value not equal to zero enables any defined macros 32767 to 32767 1 Single ASCII encoded byte 0 or 1 A value of zero indicates that macros are disabled and a value of one indica...

Page 293: ...ro when queried and ignored when set This register is used to enable a single or inclusive OR group of Standard Event Status Register events to be summarized in the Status Byte Register bit 5 Figure 4 4 The Standard Event Status Enable Register See the section titled Standard Event Status Register Group page 3 24 in Chapter 3 of this guide for a detailed description of the Standard Event Status Re...

Page 294: ...current status of a related condition until they are read This register is cleared by CLS by ESR and at power on Note that the instrument s power on sequence initially clears the register but then records any subsequent events during the power on sequence including setting the PON power on bit Figure 4 5 Standard Event Status Register See the section titled Standard Event Status Register Group pag...

Page 295: ...n of a macro The string parameter must be a currently defined macro label 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 A zero length block response indicates that no command sequence is stored by the specified label Query Response ...

Page 296: ... Counter identification A sequence of ASCII encoded bytes HEWLETT PACKARD 53131A 0 XXXX or HEWLETT PACKARD 53132A 0 XXXX terminated with a new line and EOI XXXX represents the firmware date code This query should be the last query in a terminated program message otherwise error 440 is generated Query Response Comments ...

Page 297: ...ramming Guide 4 131 LMC Learn Macro Query LMC Queries the currently defined macro labels 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 Query Response ...

Page 298: ...ement cycle is already idle this command will immediately set the OPC bit See the section titled Standard Event Status Register Group page 3 24 in Chapter 3 of this guide for a detailed description of the Standard Event Status Register s Operation Complete bit This event command is disabled by CLS RST Device Clear page 4 31 power on or upon the transition of the measurement cycle from measuring to...

Page 299: ... read of the Output Queue Note that this query does not actually read a state as most queries do Since this query will not respond until the measurement cycle transitions from measuring to idle the only way to cancel the query holdoff is by Device Clear page 4 31 or power on See the section titled Using the OPC Command page 3 47 in Chapter 3 for an example using this command Single ASCII encoded b...

Page 300: ...uence of ASCII encoded bytes indicating timebase option 3 0 GHz RF Input option terminated with a new line and EOI The timebase option is 001 010 or 0 Note that the counter responds with 010 for either the high stability or ultra high stability oven timebase The 3 0 GHz RF Input option is 030 or 0 Note that the counter responds with 030 for either the 3 0 GHz or 5 0 GHz RF Input option A missing o...

Page 301: ...Chapter 4 Command Reference Introduction Programming Guide 4 135 PMC Purge Macro Command PMC The Purge MaCros command deletes all macros previously defined using the DMC command ...

Page 302: ...ALibration 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 QUEStion...

Page 303: ...e Query Idle State and clears empties the Key Queue The reset does not affect the macros defined with DMC the calibration data the Service Register Enable or the Standard Event Status Enable the Output Queue and the IEEE 488 1 address or the state of the IEEE 488 1 interface See the section titled RST Response page 2 36 in Chapter 2 of this guide for a complete listing of the RST state Each comman...

Page 304: ...polator 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 QUEStionabl...

Page 305: ... single or inclusive OR group of Status Byte Register events to generate an SRQ Figure 4 6 The Service Request Enable Register See the section titled Status Byte Register and Service Request Enable Register page 3 21 in Chapter 3 of this guide for a detailed description of the Service Request Enable Register to 255 The value of bit 6 and unused bits is ignored when set 1 Numeric data transferred a...

Page 306: ...f the Status Byte Register Numeric data transferred as ASCII bytes in NR1 format Range is 0 to 255 The response value when rounded to an integer value and expressed in base 2 binary represents the bit values of the Status Byte Register The value of unused bits is zero when queried The Master Summary Status not the RQS message is reported on bit 6 Master Summary Status indicates that the Counter ha...

Page 307: ...de 4 141 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: ...enerated when the self test fails 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 The following are tested CPU ROM RAM EEPROM QSPI FPGA Front End Measurement hardware and Interpolator hardware Query Respo...

Page 309: ...rument 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 3 4 6 in Chapter 3 for an example using this command ...

Page 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...

Page 311: ...5 5 Errors ...

Page 312: ...ges Reading an Error Executing the SYSTem ERRor command reads the oldest error from the error queue and erases that error from the queue The SYST ERR response has the form error number error string An example response is 113 Undefined header Positive error numbers are specific to the Counter Negative error numbers are command language related and are discussed later in this chapter All errors set ...

Page 313: ... SYST ERR Subsequent responses continue until the queue is empty If the error queue overflows the last error in the queue is replaced with error 350 Queue overflow Any time the queue overflows the least recent errors remain in the queue and the most recent error is discarded The length of the Counter s error queue is 30 29 positions for the error messages and 1 position for the Queue overflow erro...

Page 314: ...er on or CLS Command Error An error number in the range 100 to 199 indicates that an IEEE 488 2 syntax error has been detected by the Counter s parser The occurrence of any error in this class causes the command error bit bit 5 in the Event Status Register to be set One of the following events has occurred An IEEE 488 2 syntax error has been detected by the parser That is a controller to Counter m...

Page 315: ...d not be properly executed due to some Counter condition Execution errors are reported by the Counter after rounding and expression evaluation operations have been taken place Rounding a numeric data element for example is not reported as an execution error Events that generate execution errors do not generate command errors device specific errors or query errors Device or Counter Specific Error A...

Page 316: ...nter 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 One of the following is true An attempt is being made to read data from the output queue when no output is either present or pending Data in the output queue has been lost ...

Page 317: ...eived within a program message More parameters were received than expected for the header Fewer parameters were received than required for the header The header or character data element contains more than twelve characters The header is syntactically correct but it is undefined for the Counter For example XYZ is not defined for the Counter This error as well as errors 121 through 129 are generate...

Page 318: ...data element was invalid see IEEE 488 2 For example unmatched parentheses or an illegal character Expression data was encountered but was not allowed by the Counter at this point in parsing Indicates that a macro parameter placeholder number was encountered outside of a macro definition Indicates that the program message unit sequence sent with a DMC command is syntactically invalid This is the ge...

Page 319: ...as a legal string syntax but it could not be accepted by the Counter For example the label was too long the same as a common command header or contained invalid header syntax Indicates that a syntactically legal macro program data sequence could not be executed because the Counter found the maximum recursion level of four was exceeded Indicates that a syntactically legal macro label in the DMC com...

Page 320: ...tput buffer are full and the Counter cannot continue Indicates that a query was received in the same program message after a query requesting an indefinite response for example IDN or OPT was executed DIAGnostic CALibration INP OFFS AUTO ONCE failed DIAGnostic CALibration INP2 OFFS AUTO ONCE failed DIAGnostic CALibration INP GAIN AUTO ONCE failed DIAGnostic CALibration INP2 GAIN AUTO ONCE failed D...

Page 321: ... Common Commands Summary Table 2 22 Common Commands IEEE 488 2 4 122 CAL Calibration 4 122 CLS Clear Status 4 123 DDT Define Device Trigger Command 4 124 DMC Define Macro Command 4 125 EMC Enable Macro Command 4 126 EMC Enable Macro Command 4 126 ESE Standard Event Status Enable 4 127 ESE Standard Event Status Enable Query 4 127 GMC Get Macro Contents Query 4 129 IDN Identificarion Query 4 130 LMC...

Page 322: ...ecution error definition 5 5 status bit 3 26 F fail limit test 4 14 fall time 4 62 4 89 4 96 firmware date code 4 130 revision 4 130 firmware revision 2 32 4 81 firmware revisions 1 3 2 31 2 34 format ASCII 4 41 REAL 4 41 frequency 4 63 4 85 4 89 frequency ratio 4 65 4 89 front panel to SCPI command maps 2 3 function 4 60 4 89 G GET 4 42 Getting Started 1 6 group execute trigger 4 42 Group Execute...

Page 323: ... 30 3 31 memory 4 79 messages program 3 14 response 3 16 MINimum 3 12 4 19 minimum value 3 11 multipliers 3 13 N N 4 20 negative pulse width 4 67 4 89 negative transition filter register 3 27 new line 3 11 3 18 non decimal numeric 3 11 Not a Number 9 91E37 3 17 NR1 3 17 NR2 3 17 NR3 3 17 NRf 3 11 numeric value 3 12 O offset scale 4 7 OHM 3 12 OPC 3 24 operation complete 4 132 operation complete st...

Page 324: ...r 5 2 key 4 117 output 4 133 QuickBASIC using 3 59 QYE 3 24 R radix 3 17 ratio 4 89 ratio frequency 4 65 reading an error 5 2 REAL 4 41 recall 4 136 reference oscillator calibration 4 34 reference oscillator 4 92 Related Documentation 1 10 remote 3 6 reset 4 137 response message syntax 3 16 response messages 3 16 data types 3 17 results display 4 38 math 4 7 query 4 7 4 14 4 19 raw 4 38 statistics...

Page 325: ...D 4 11 CALCulate2 IMMediate 4 11 CALCulate2 IMMediate AUTO 4 12 CALCulate2 LIMit 4 12 CALCulate3 4 19 CALCulate3 AVERage 4 19 CALCulate3 DATA 4 22 CALCulate3 FEED 4 23 CALCulate3 LFILter 4 23 CALCulate3 PATH 4 25 CALibration 4 26 CALibration COUNt 4 26 CALibration DATA 4 27 CALibration SECurity 4 28 CALibration ALL 4 26 CONFigure 4 30 DIAGnostic 4 32 DIAGnostic CALibration INPut 1 2 GAIN AUTO 4 32...

Page 326: ... CONFigure 4 53 4 54 CONFigure 4 54 FETCh 4 55 MEASure query 4 56 READ 4 57 Descriptions of the Measurement Functions function 4 60 How to Use the Measurement Instruction Commands 4 75 4 11 suffix elements 3 12 multiplers 3 13 suffix multipler 3 13 suffixes 3 12 summary bits 3 21 synchronizing measurements 3 46 syntax program messages 3 14 response messages 3 16 T terminator command 3 13 throughpu...

Page 327: ...ers 5200 Blue Lagoon Drive 9th Floor Miami Florida 33126 U S A 305 267 4245 4220 United States Hewlett Packard Company Test and Measurement Organization 5301 Stevens Creek Blvd Bldg 51L SC Santa Clara CA 95052 8059 1 800 452 4844 In Europe Africa and Middle East please call your local HP sales office or representative Austria East Central Europe 1 25000 0 Belgium and Luxembourg 02 778 3417 Denmark...

Page 328: ...ents and other customer assistance agreements are available for Hewlett Packard products For any assistance contact your nearest Hewlett Packard Sales and Service Office Safety Considerations contd WARNING ANY INTERRUPTION OF THE PROTECTIVE GROUNDING CONDUCTOR INSIDE OR OUTSIDE THE INSTRUMENT OR DISCONNECTING THE PROTECTIVE EARTH TERMINAL WILL CAUSE A POTENTIAL SHOCK HAZARD THAT COULD RESULT IN PE...

Page 329: ......

Page 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...

Reviews: