background image

Chapter 4  Command Reference

:MEASure Subsystem

4-18

Programming Guide

4

Using :MEAsure

This is the simplest Measurement Instruction command to use, but it does 
not offer much flexibility.  :MEASure causes the Counter to configure 
itself for a default measurement, starts the measurement, and queries the 
result. The following example shows how to use the :MEASure query to 
measure frequency.

Use

:MEASURE:FREQ?

t

o execute a default frequency measurement and have the result sent to 

the controller. The Counter selects settings and carries out the required 
measurement; it automatically starts the measurement and sends the 
result to the controller.

You can add parameters to provide more details about the signal you are 
going to measure.

Use

:MEASURE:FREQ?  50 MHZ, 1 HZ

where 50 MHz is the expected value (this value can also be sent as 
50E6 HZ), and 1Hz is the required resolution. 

The channel numbers can also be specified. For example, you can send:

:MEASURE:FREQ?  (@1)

:MEASURE:FREQ?  50 MHz, 1 HZ, (@1)

Using :CONFigure with :READ?

The :CONFigure command causes the instrument to choose default 
settings for the specified measurement. :READ? starts the measurement 
and queries the result.

This sequence operates in the same way as the :MEASure query, but it 
allows you to insert commands between :CONFigure and :READ? to 
specify a particular setting. 

Summary of Contents for 53150A Series

Page 1: ... Programming Guide HP 53150A 151A 152A Microwave Frequency Counter ...

Page 2: ......

Page 3: ...53150A 53151A and 53152A Microwave Frequency Counters The information in this guide applies to instruments having the number prefix listed below unless accompanied by a Manual Updating Changes package indicating otherwise SERIAL PREFIX NUMBER 3735A and above 53150A 3736A and above 53151A 3737A and above 53152A ...

Page 4: ...ill replace software media which does not execute its programming instructions due to such defects For detailed warranty information see back matter Safety Considerations General This product and related documentation must be reviewed for familiarization with this safety markings and instructions before operation Before Cleaning Disconnect the product from operating power before cleaning Warning S...

Page 5: ... Summary Introduction 2 2 Chapter Summary 2 2 Front Panel to SCPI Command Map 2 3 HP 53150A 151A 152A Command Summary 2 8 SCPI Conformance Information 2 8 IEEE 488 2 Common Commands 2 9 HP 53150A 151A 152A SCPI Subsystem Commands 2 12 Std New Column 2 12 Parameter Form Column 2 12 RST Response 2 19 3 Programming Your Counter for Remote Operation Introduction 3 2 Chapter Summary 3 3 Where to Find S...

Page 6: ...ommand Syntax 3 13 Abbreviated Commands 3 14 Keyword Separator 3 14 Optional Keyword 3 14 Parameter Types 3 16 Parameter Separator 3 17 Query Parameters 3 17 Suffixes 3 17 Command Terminator 3 18 Using Multiple Commands 3 19 Program Messages 3 19 Program Message Syntax 3 19 Overview of Response Message Formats 3 21 Response Messages 3 21 Response Message Syntax 3 21 Response Message Data Types 3 2...

Page 7: ...Completed Example 3 3 43 Programming the Counter to Display Results 3 46 Configuring the Counter s Display 3 46 Commands for Displaying Results 3 47 Command for Displaying Raw Results 3 47 Commands for Displaying Relative Results 3 47 Commands for Enabling and Disabling the Display 3 47 Programming the Counter to Synchronize Measurements 3 48 Synchronizing Measurement Completion 3 48 Resetting the...

Page 8: ...stem 4 5 Group Execute Trigger GET 4 7 INITiate Subsystem 4 8 INPut Subsystem 4 9 MEASure Subsystem 4 10 Measurement Instructions CONFigure FETCh MEASure READ 4 10 Descriptions of the Measurement Functions 4 16 How to Use the Measurement Instruction Commands 4 17 MEMory Subsystem 4 20 SENSe Subsystem 4 22 SENSe FUNCtion Subtree 4 27 SENSe POWer Subtree 4 29 SENSe ROSCillator Subtree 4 30 STATus Su...

Page 9: ...ation Complete Command 4 51 OPC Operation Complete Query 4 51 PRE Parallel Poll Enable Register PRE Parallel Poll Enable Register Query 4 52 RCL Recall Command 4 52 RST Reset Command 4 53 SAV Save Command 4 54 SRE Service Request Enable Command SRE Service Request Enable Query 4 55 TRG Trigger Command 4 58 TST Self Test Query 4 59 WAI Wait to Continue Command 4 61 5 Errors Introduction 5 2 Reading...

Page 10: ...Contents x Programming Guide ...

Page 11: ...1 Before You Start ...

Page 12: ...you can remotely operate many of the Counter s front panel functions via the Hewlett Packard Interface Bus HP IB or the RS 232 serial interface These 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 Interface Bus HP IB or the RS 232 seria...

Page 13: ...ments 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 NOTE With two minor exceptions the only difference between programming the Counter using the HP IB interface and the RS 232 serial interface is the manner in which you connect the Counter to the computer These exceptions are 1...

Page 14: ...g Scan the summary tables in Chapter 2 Command Summary to get a feeling for the number and structure of commands available to you Read and study map drawings in the section titled Front Panel to SCPI Command Map in Chapter 2 Read Chapter 3 Programming Your Counter for Remote Operation for an overview of SCPI concepts as they relate to the HP 53150A 53151A and 53152A Frequency Counters Look at the ...

Page 15: ...peration Review the summary tables in Chapter 2 Command Summary If this chapter contains sufficient information to get you started write some test programs to explore the Counter s capabilities If you need additional information on any command refer to the applicable command description in Chapter 4 Command Reference Review the remaining information in this guide to determine what is applicable to...

Page 16: ...and maps SCPI conformance information and command summary tables Chapter 3 Programming Your Counter for Remote Operation describes how to connect and set up the Counter for remote operation briefly explains the SCPI elements and formats describes status reporting describes how to write programs and provides programming examples for each of the main tasks that you want the Counter to perform Chapte...

Page 17: ...ction in this chapter titled Related Documentation for ordering information If you intend to use the RS 232 serial interface see the section in Chapter 3 titled To Connect With the RS 232 Serial Interface As previously mentioned this guide also assumes you are familiar with the front panel operation of the Counter See the HP 53150A 151A 152A Operating Guide for detailed information about front pan...

Page 18: ... Standard Commands for Programmable Instruments SCPI latest version This standard is a guide for the selection of messages to be included in programmable instrumentation It is primarily 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 command...

Page 19: ... and data types used in SCPI It is intended more for firmware engineers than for instrument users programmers However it can be useful if you need to know the precise definition of specific message formats data types 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 Com...

Page 20: ...Chapter 1 Before You Start Related Documentation 1 10 Programming Guide 1 ...

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

Page 22: ...I Subsystem Commands pg 2 12 RST Response3 pg 2 19 1 The section titled Front Panel to SCPI Command Map provides maps that show the front panel keys and their corresponding or related SCPI commands 2 The section titled HP 53150A 151A 152A Command Summary lists the IEEE 488 2 Common Commands and SCPI Subsystem commands in Table 2 1 and Table 2 2 respectively 3 The section titled RST Response lists ...

Page 23: ...e Counter 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 applies to all SCPI commands NOTE When you see quotation marks in a command s parameter ...

Page 24: ...er Resol Reset Local Pwr Offset Freq Offset Menu On Off Avg Clear Rate Shift 1 Reset Local 5 4 Shift Freq Offset Shift Pwr Offset Rate Avg 2 3 7 6 Resolution Shift HPIB POWER FREQ Gate Rel Freq Rel Pwr dBm W Channel 2 Chan Select Offset On Off Offset On Off Display Power 10 Power Offset On Off 9 Display Power Freq Offset On Off 11 Chan Select 12 8 Shift On Off ...

Page 25: ...FREQuency OFFSet 4 SENSe POWer AC REFerence 5 SENSe AVERage COUNt 6 SENSe AVERage STATe 7 SYSTem COMMunicate GPIB ADDRess 8 SENSe FREQuency RESolution 9 DISPlay BACKground STATe 10 SENSe FUNCtion 11 SENSe POWer AC REFerence STATe 12 SENSe FREQuency OFFSet STATe 13 SENSe FUNCtion Figure 2 1 Front Panel Control to SCPI Command Map Part 2 of 2 ...

Page 26: ...gramming Guide 2 Figure 2 2 Front Panel Menu to SCPI Command Map Part 1 of 2 REF OSC SAVE RECALL BAUD PRESET Instrument ID OP HRS BATT VOLTAGE CH1 LPF PWR CORR FM 3 9 10 12 4 5 Shift Menu Reset Local Freq Offset Menu On Off Clear Rate Shift 1 2 6 7 8 DO SELF TEST 11 ...

Page 27: ...SAV 3 RCL 4 INPut FILTer LPASs STATe 5 SENSe FILTer FM AUTO 6 SYSTem COMMunicate SERial RECeive BAUD 7 RST 8 IDN 9 See Service Manual 10 See Service Manual 11 TST 12 MEMory CLEar NAME MEMory DATA SENSe CORRection CSET SELect SENSe CORRection CSET STATe Figure 2 2 Front Panel Menu to SCPI Command Map Part 2 of 2 ...

Page 28: ...I Standard Version 1995 0 The SCPI command set consists of the following Common Commands as defined in IEEE 488 2 1987 listed and summarized in Table 2 1 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 comma...

Page 29: ...ment configuration They are used for functions like resetting the instrument identification or synchronization Table 2 1 lists the IEEE 488 2 Common Commands supported by the HP 53150A 151A 152A in alphabetical order by mnemonic name and function More information concerning the operation of IEEE 488 2 status reporting commands and structure can be found in the Status Reporting section of Chapter 3...

Page 30: ...T Instrument Status Query Queries the current state of the parallel poll response Instrument Status OPC Operation Complete Causes Counter to set the operation complete bit in the Standard Event Status Register when all pending operations see Note at the end of table are finished OPC Operation Complete Query Places an ASCII 1 in the Output Queue when all pending operations see Note at the end of ta...

Page 31: ...the Status Byte and Master Summary Status bit TRG Trigger This trigger command is the device specific analog of the IEEE 488 1 defined GET It initiates the action specified by the DDT command TST Self Test Query Executes an internal self test and reports the results WAI Wait to Continue Makes the Counter wait until all pending operations see Note are completed before executing commands that follow...

Page 32: ...ts CAUTION Not all commands have a query form Unless otherwise stated in Table 2 2 commands have 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 shows 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 th...

Page 33: ...e entire display is visible Turns the LCD display backlight ON or OFF FETCh Std See Measurement Instructions in this table INITiate CONTinuous IMMediate Boolean Std Std Std Subsystem Controls the initiation of measurements Sets the instrument for continuously initiated or user initiated measurements Event no query Causes the instrument to initiate and complete one full measurement cycle INPut FILT...

Page 34: ...rs and source_list below See parameters and source_list below Std Std Std Std Std Configures the instrument to perform the specified measurement Returns the function configured by the last CONFigure or MEASure command Configures the instrument initiates measurement and queries for the result i e provides a complete measurement sequence Initiates measurement and queries for the result Performs a FE...

Page 35: ...this table SENSe AVERage STATe COUNt CORRection CSET SELect STATe DATA FILTer FM AUTO Boolean numeric_value character_data CORR1 CORR2 CORR9 Boolean data_handle XNONe FREQuency 1 2 XNONe POWer 2 Boolean Std New New New Std Std Std Std Std Std Std New Subsystem setup commands Subtree Configures the averaging function Turns averaging ON and OFF Specifies the number of measurements to combine when AV...

Page 36: ...on OFF ON STATe POWer AC REFerence STATe ROSCillator sensor_function sensor_function XNONe FREQuency 1 2 XNONe POWer 2 sensor_function sensor_function XNONe FREQuency 1 2 XNONe POWer 2 sensor_function numeric_value Boolean Std New Std Std Std Std Std Std Subtree Selects the sensor_function s to be sensed by the instrument Selects the sensor_function s to be turned OFF Selects the sensor_function t...

Page 37: ...Queries and then clears the Operation Event Status Register Sets and queries the negative transition filter for the Operation status reporting structure PTRansition PRESet QUEStionable EVENt CONDition ENABle non decimal numeric NRf non decimal numeric NRf Std Std Std Std Std Std Sets and queries the positive transition filter for the Operation status reporting structure Event No query Presets the ...

Page 38: ...e Subtree Collects together configuration of control communication interfaces Subtree Controls the HPIB Sets the HPIB address of the instrument Subtree Sets the baud rate Query only Queries the oldest error in the Error Queue and removes the error from the queue first in first out See Chapter 5 for error definitions Simulates the pressing of a front panel key Query only Returns a list of defined k...

Page 39: ...N ON INITiate CONTinuous Boolean OFF INPut FILTer LPASs STATe Boolean OFF SENSe AVERage STATe SENSe AVERage COUNt SENSe FILTer FM AUTO Boolean numeric_value Boolean OFF 1 ON SENSe CORRection CSET SELect SENSe CORRection CSET STATe SENSe FREQuency OFFset SENSe FREQuency OFFset STATe SENSe FREQuency RESolution SENSe FREQuency TRACking SENSe FUNCtion OFF SENSe FUNCtion ON SENSe POWer AC REFerence SEN...

Page 40: ...Chapter 2 Command Summary RST Response 2 20 Programming Guide 2 Table 2 4 Unaffected by RST Item ESE PRE SRE MEMory NSTates STATus subsystem all command settings SYSTem subsystem all command settings ...

Page 41: ...3 Programming Your Counter for Remote Operation ...

Page 42: ...ifference between programming these Counters using the HP IB interface and the RS 232 serial interface is the manner in which you connect the Counter to the computer These exceptions are 1 The Counter sends a command prompt over the RS 232 interface but not the HP IB after receiving and executing each command 2 When an error is detected during the Self Test or during operation the Counter automati...

Page 43: ... Elements of SCPI Commands pg 3 13 Using Multiple Commands pg 3 19 Overview of Response Message Formats pg 3 21 Status Reporting pg 3 25 Programming the Counter for Status Reporting pg 3 41 Programming the Counter to Display Results pg 3 46 Commands for Displaying Results pg 3 47 Programming the Counter to Synchronize Measurements pg 3 48 Writing SCPI Programs pg 3 52 Programming Examples pg 3 54 ...

Page 44: ... pg 3 7 Making an RS 232 Cable pg 3 7 Remote Local Operation pg 3 11 Common Command Format pg 3 12 SCPI Command and Query Format pg 3 12 Abbreviated Commands pg 3 14 Optional Keyword pg 3 14 Parameter Types pg 3 16 Parameter Separator pg 3 17 Command Terminator pg 3 18 Program Messages pg 3 19 Response Messages pg 3 21 Programming Examples Making a Frequency Measurement HP BASIC pg 3 56 Making a F...

Page 45: ...ommands and setups from a computer and it can send data and measurement results There is one configurable setting related to HP IB communication the HP IB Address Counter Rear Panel HP 10833A B C D HP IB Cable WARNING WARNING To avold electric shock To avold electric shock do not remove covers do not remove covers No user serviceable parts inside No user serviceable parts inside Refer all servicin...

Page 46: ...he arrow keys flashes 2 Press the right arrow key The blinking indicator changes direction from to and the current HP IB address blinks 3 Press or press and hold the up arrow or down arrow key to change the HP IB address the available addresses are 1 to 30 4 When your desired address is displayed press the Enter key The address you selected is assigned and the display returns to its normal operati...

Page 47: ...e DB25 connectors for their serial ports Therefore you must use either a cable with an RJ12 plug at the Counter end and a female DB25 connector at the computer end or a double ended RJ12 cable and an RJ12 to DB25F adapter to interface the Counter with a computer Since pre manufactured RJ12 DB25 cables are rare it is probably most efficient to obtain the necessary parts and assemble the cable yours...

Page 48: ...PC part number TXW6151 are also available from SPC Technology and other manufacturers 2 Adapter kits like the Voltrex MAK206F usually include a pre wired RJ12 modular receptacle a DB25F connector and the adapter body or wiring shroud Wire the RJ12 receptacle to the DB25F connector according to the diagrams in Figure 3 3 and then assemble the adapter according to the instructions included in the ki...

Page 49: ... length of 6 conductor flat telephone cable as shown in Figure 3 4 Be sure to attach the connectors in the orientations shown in the figure 25 13 24 12 23 11 22 10 21 9 20 8 19 7 18 6 17 5 16 4 15 3 14 2 1 RED RXD BLK TXD GRN GND 1 Pin 4 GND Pin 3 RXD Pin 2 TXD Viewed from front side of the connectors SPC Technology Voltrex Brand Part number MAK206 F DB 25F female to RJ12 male Adapter 2 3 4 5 6 DB...

Page 50: ...end of the cable to the adapter by inserting the RJ12 plug into the receptacle on the adapter 1 2 3 4 5 6 Pin 1 2 3 4 5 6 1 2 3 4 5 6 6 5 4 3 2 1 Pin SPC Technology 6 Conductor Flat Telephone Wire Part number TXW6151 RJ12 Modular Plug SPC Technology Part number TA 30 6 6 BLU 5 YEL 4 GRN 3 RED 2 BLK 1 WHT Wire No Color 6 BLU 5 YEL 4 GRN 3 RED 2 BLK 1 WHT Wire No Color ...

Page 51: ... is off When the Counter is in Local mode the front panel Rmt indicator in the display is off Computer Rear Panel Counter Rear Panel WARNING WARNING To avold electric shock To avold electric shock do not remove covers do not remove covers No user serviceable parts inside No user serviceable parts inside Refer all servicing to qualified personnel Refer all servicing to qualified personnel OPTIONS O...

Page 52: ...rm 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 Command and Query Format SCPI commands perform functions like instrument setup A subsystem command ...

Page 53: ... OUTPUT 712 CLS OUTPUT 712 DISP ENAB ON FREQ RES 1KHz Subsystem Command Syntax Figure 3 6 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 decim...

Page 54: ...hows DISPlay then DISP and DISPLAY are both acceptable forms Other forms of DISPlay such as DISPL or DISPLA are illegal and they generate errors You may use upper and or lower case letters Therefore DISPLAY display and DiSpLaY are all acceptable Keyword Separator A colon always separates one keyword from the next lower level keyword as shown below DISPlay ENABle Optional Keyword Optional keywords ...

Page 55: ...I Commands Programming Guide 3 15 3 Examine the portion of the SENSe subsystem shown below SENSe FREQuency RESolution The root level keyword SENSe is an optional keyword To set the Counter s frequency resolution you can use either of the following SENS FREQ RES or FREQ RES ...

Page 56: ...ch valid setting An example is the INPut COUPling AC DC command parameters AC DC Flexible numeric representation 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 non decimal numeric arbitrary block The following HP BASIC statement sends a command containing a string parameter OUTPUT 703 FUNC FREQ Form...

Page 57: ...eter AVER COUN the present setting is returned If you send the MIN parameter using AVER COUN MIN the command returns the minimum acceptable count 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 inter...

Page 58: ...cter decimal 10 an EOI End of Identify asserted concurrent with last byte or an EOI asserted concurrent with a new line as the last byte Table 3 2 Suffix Multipliers DEFINITION MNEMONIC NAME 1E15 PE PETA 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 ...

Page 59: ...am Message Syntax Figure 3 8 shows the simplified syntax of a program message You can see Common Commands and Subsystem Commands in the same program message If you send more than one command in one message you must separate adjacent commands with a semicolon new line ASCII character decimal 10 END EOI asserted concurrent with last byte Figure 3 8 Simplified Program Message Syntax Diagram When usin...

Page 60: ...resent immediately after the command separator the semicolon For example sending SENS AVER COUN 5 STAT ON is equivalent to sending SENS AVER COUN 5 SENS AVER STAT ON or SENS AVER COUN 5 SENS AVER STAT ON The must be present to distinguish another root level command For example SENS AVER COUN 5 INIT CONT OFF is equivalent to sending SENS AVER COUN 5 INIT CONT OFF If the which is following the and i...

Page 61: ... the message is transmitted across the HP IB or the serial interface to the computer You read the message by using some type of enter statement that includes the device address and an appropriate variable 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 ROSC SOUR 20 ENTER 703 A 30 PRINT A 40 END R...

Page 62: ...Programming Guide 3 NOTE new line ASCII character decimal 10 END EOI asserted concurrent with last byte multiple response separator ASCII character decimal 59 data separator within a response ASCII character decimal 44 Figure 3 9 Simplified Response Message Syntax Diagram response data new line END ...

Page 63: ... 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 is represented by the value 9 91E37 Not a Number is defined in IEEE 754 The Counter responds with this numeric value when qu...

Page 64: ...presenting 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 data The terminator is a line feed asserted with EOI For example for transmitting 8 bytes of data the format might be The 2 indicates the number of digits that follow and the two digits 08 indicate the number of data bytes to be tr...

Page 65: ...how 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 a summary of the Standard Status Structure Registers defined by IEEE 488 2 1987 is shown in addition to the Operation Status and Questionable Data Signal Register groups Refer to the section in this chapter titled Programming t...

Page 66: ...e 9 Not Used 10 Acquiring 11 LOGICAL OR Use STATus OPERation Commands to control and read registers 32 Frequency 5 Not Used 6 to 11 LOGICAL OR Use STATus QUEStionable Commands to control and read registers Command Warning 14 Not Used 15 16384 Use SYSTem ERRor to query the Error Queue SRQ Interrupt to Computer Query Counter to read the Output Queue NOTES 1 The numbers that are in parentheses and po...

Page 67: ... 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 but it is altered only when the state of the overlying status data structures is altered The entire Status Byte Register can be cleared by sending just the CLS command to the Counter in a program message Table 3 4 lists the Status Byte Register bits and briefly des...

Page 68: ...an enabled event in the Questionable Data Status Event Register is set TRUE Conversely this bit is set FALSE zero when no enabled events are set TRUE Bit 4 MAV Message AVailable summarizes the Output Queue This bit indicates whether or not the Output Queue is empty This bit is set TRUE one when the Counter is ready to accept a request by the external computer to output data bytes that is the Table...

Page 69: ... by a serial poll When STB is used 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 t...

Page 70: ...specific IEEE 488 2 defined events as shown in Figure 3 12 Use ESR to read this register Use ESR or CLS to clear this register Table 3 5 lists the Standard Event Status Register bits and briefly describes each bit 0 1 2 3 4 5 6 7 0 1 2 3 4 5 7 Standard Event Status Register To ESB bit bit 5 of the Status Byte Register Logical OR 6 Operation Complete Not Used Query Error Device Dependent Error Exec...

Page 71: ... OPC bit once the instrument completes a measurement consisting of AVERage COUNt measurements NOTE The OPC bit is not in any way affected by the OPC query Bit 1 is not used Bit 2 Query Error is an event bit which indicates that either 1 an attempt was made to read the Output Queue when it was empty or 2 data in the Output Queue has been lost Table 3 5 Standard Event Status Register BIT WEIGHT SYMB...

Page 72: ...s 200 through 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 occ...

Page 73: ...ransition filters an event register an event enable register Figure 3 13 shows the model that these register groups follow Figure 3 13 Operation and Questionable Data Status Reporting Model 0 1 2 n 1 n Condition Register Logical AND Logical OR Transition Filter 0 1 2 n 1 n Event Register 0 1 2 n 1 n Event Enable Register Summary Bit OSB or QSB Status Byte Register Device Status Continuously Monito...

Page 74: ... setting event bits TRUE When the transition filter specifies a positive transition the event becomes TRUE when its associated condition makes a FALSE to TRUE transition 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 filters specify both a positive and a negative transiti...

Page 75: ...ansition Event Register An event register captures changes in conditions An event register bit event bit is 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 Table 3 6 Transition Filter Definition Positive Transition Filter Bit Negative Transition Filter Bi...

Page 76: ...LS to clear event registers Event Enable Register An event enable register selects which event bits in the corresponding event register can generate a summary bit To write the event enable registers use STATus OPERation ENABle STATus QUEStionable ENABle To read the event enable registers use STATus OPERation ENABle STATus QUEStionable ENABle The event enable registers are cleared by STATus PRESet ...

Page 77: ... negative transition filter register NTR an event register an event enable register Table 3 7 lists the Operation Status Register bits and briefly describes each bit Figure 3 13 shows the model that these register groups follow Table 3 7 Operation Status Register BIT WEIGHT DESCRIPTION 0 Not used 1 3 Not used 4 16 Measuring 5 32 Waiting for Trigger 6 8 Not used 9 512 Using Internal Reference 10 No...

Page 78: ...t which indicates the Counter is using the internal reference The condition bit is TRUE one when the Counter is using the internal reference The condition bit is FALSE zero while the Counter is using the external reference The setting of this bit is not affected by the setting of the REF OSC option in the user settings menu Bit 10 is not used Bit 11 Acquiring indicates that the counter is searchin...

Page 79: ...cription of each bit in the Questionable Data Status Register Group follows Bits 0 2 are not used Bit 3 Power Power Cal is turned off or the Power Cal tables in EEPROM are defective or missing Bit 5 Frequency is a condition bit which indicates that frequency measurements may be affected by component failures Bits 6 11 are not used Table 3 8 Questionable Data Status Register BIT WEIGHT DESCRIPTION ...

Page 80: ...is TRUE when an internal hardware fault has been detected either in normal operation or by the self test Bit 13 is not used Bit 14 Command Warning is an event bit indicating a command such as CONFigure or MEASure ignored a parameter during execution Since this is an event bit the transition filters have no effect on it Bit 15 is not used ...

Page 81: ...ert a computer These registers shown in Figure 3 10 are Operation Status Register Group Questionable Data Signal Register Group Standard Event Status Register Group Status Byte Register Group The first three groups all have event registers that can be fed into the Status Byte Register The Status Byte Register can be used to assert the SRQ line and thus alert the computer that the Counter needs att...

Page 82: ...ation on how to issue this command 2 Issue the following commands RST CLS SRE 0 ESE 0 STAT PRES Using the Standard Event Status Register to Trap an Incorrect Command Example 2 The following command grouping shows how to use the Standard Event Status Register and the Status Byte Register to alert the computer when an incorrect command is sent to the Counter The command ESE 32 tells the Counter to s...

Page 83: ...mputer 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 the detected event bit 4 of the Operation Status Register in the Status Byte Register The command SRE 128 tells the Counter to assert SRQ when the s...

Page 84: ...o you want to report a measurement complete event from the Operation Status Group YES Use the following STAT OPER PTR 6688 STAT OPER NTR 16 This enables the negative transition of the measuring event bit to generate a summary bit to the Status Byte Register Do you want to report events monitored by the Questionable Data Signal Status Group YES Use the following STAT QUES ENAB 20 520 This enables a...

Page 85: ...ead the Status Byte Register use the following STB enter A print A This reads the decimal value of the Status Byte Register You can also use the serial poll command to read this value If bit 3 QSB is set use the following STAT QUES EVENt This returns the decimal value of the event register It also clears the register so that subsequent events can be monitored If bit 5 ESB is set use the following ...

Page 86: ...er to Display Results Configuring the Counter s Display The Counter has three display modes 1 Raw results This display mode is used on power up 2 Relative results results modified by offset values 3 Display Disabled All LCD display segments disabled The following command groupings show how to program the Counter to any of the above display modes ...

Page 87: ...auses raw measurement results to be displayed Commands for Displaying Relative Results 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 RST Turns off all offsets FREQ OFFS STAT ON POW AC REF STAT ON Turns on offsets Turns on offsets DISP ENABLE OFF DISP ENABLE ON Disable the display all segments off Normal ...

Page 88: ...er and Clearing the Interface Before attempting any programming it is best to set the Counter to a known state The following command grouping illustrates how to reset the Counter Before issuing these commands execute a device clear to reset the interface and the Counter You should consult your interface card s documentation for information on issuing a device clear since the device clear command i...

Page 89: ...es the DATA command which requests the results Using the OPC Command This method is useful if you want to hold off execution of the program while you wait for the Counter to complete any pending activity In the WAI example above the line following the WAI command is accepted by the Counter However the Counter does not execute the command AVERAGE STATE ON AVERAGE COUNT 50 INIT WAI DATA Enable avera...

Page 90: ...nded when the Counter is interfaced with many other instruments any of which can assert SRQ The commands OPC ESE 1 and SRE 32 are used to assert the SRQ line to alert the computer that the Counter has completed a measurement It is up to the computer to use the serial poll command to determine which of the instruments on the bus requested service Of the three procedures discussed here this one is t...

Page 91: ...mming Guide 3 51 3 Set up program to specify service routine and enable interrupt when SRQ is asserted The program can do other things while it is waiting for SRQ When SRQ occurs and the Counter has been identified as the cause of the SRQ ask for the data INIT OPC Start measurements Enable OPC bit DATA Ask for data ...

Page 92: ... 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 93: ...us reporting See section titled Status Reporting in this chapter See Chapter 4 STATus ESE and SRE See Figure 3 14 Do you want to do Status Reporting Do you want to make a new measurement Select the function you want to perform See Figure 2 1 See SENS FUNC in Chapter 4 YES NO Do you want to average NO Configure Averaging See Averaging in Chapter 3 To transfer measurement data see Chapter 4 SENS DAT...

Page 94: ... be enclosed by either double or single quotes Each method is discussed in the following sub sections Sending Double Quoted and Single Quoted Strings In HP BASIC OUTPUT statements strings enclosed in double quotes need special consideration For example you can send the FUNC FREQ 1 command as follows OUTPUT 703 FUNC FREQ 1 Note that a pair of double quotes shown in bold is required to embed a doubl...

Page 95: ...nside your IBM PC or compatible List of the Programming Examples The following examples are provided 1 Making a Frequency Measurement HP BASIC 2 Making a Frequency Measurement QuickBASIC 3 Making a Frequency Measurement C NOTE All programming examples use the ASCII format to transfer data from the Counter to the computer The ASCII format is the default format when RST is used ...

Page 96: ...SSIGN Count TO 703 Assign I O path for counter 150 CLEAR 703 Clear the counter and interface 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 operatio...

Page 97: ...haracters that can ever be sent is 20 per measurement source 703 Counter at address 3 isc p 7 Select code 7 state 1 Used in IOEOI CLS Clear screen CALL IOEOI isc p state Make sure EOI enabled CALL IOCLEAR source Clear the counter and interface CALL sendhp RST Reset counter and stop autotriggering CALL sendhp CLS Clear event registers and error queue CALL sendhp SRE 0 Clear service request enable r...

Page 98: ...sc 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 register sendhp STAT PRES Preset enable registers and transition filters for operation and questionable status structures IOEOI isc state Enable use of EOI sendhp FUNC FREQ 1 Measure frequency on channel...

Page 99: ...59 3 getch Function to send command to HP 5315xA void sendhp hpib_cmd char hpib_cmd char hpcmd 80 Variables used by function int length strcpy hpcmd hpib_cmd length strlen hpcmd error IOOUTPUTS ctr hpcmd length Send command to HP 5315xA if error 0 printf Error during HP IB d Command s n error hpcmd ...

Page 100: ...Chapter 3 Programming Your Counter for Remote Operation Programming Examples 3 60 Programming Guide 3 ...

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

Page 102: ... A description of the Group Execute Trigger command is also included on page 4 7 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 ROSC SOUR INT EXT can be queried with ROSC SOUR Unless otherwise noted a command described as an event cannot be queried Unless othe...

Page 103: ... shown in uppercase Quotation marks may be part of the command s parameter the quotation marks shown must be sent to the Counter Unless otherwise noted a command is sequential not overlapped See Chapter 3 of this guide for details regarding command syntax parameter types and query response types ...

Page 104: ...hile a single measurement is in progress the measurement is aborted and the pending operation flag is set false If ABORt is issued while repetitive measurements are being made INIT CONT ON the measurement in progress is aborted and the pending operation flag is set false Then a new measurement is automatically initiated and the pending operation flag is set true If ABORt is issued while a block of...

Page 105: ...le ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON COMMENTS RST ON Turning the display backlight OFF conserves battery power if the Counter has the Battery option If the Counter is operating from battery power Battery option required the display backlight is automatically turned off after a period of inactivity When activity is subsequently detected a measurable sign...

Page 106: ...olean Sets or queries whether the entire display annunciators and indicators with the exception of Rmt is visible QUERY RESPONSE Single ASCII encoded byte 0 or 1 A value of 0 indicates OFF a value of 1 indicates ON COMMENTS RST ON This value is unaffected by SAV RCL RELATED FRONT PANEL KEYS None ...

Page 107: ...r IEEE 488 1 interface function is implemented in the Counter This function permits the Counter to have its operation initiated over the Bus In response to the IEEE 488 1 Group Execute Trigger GET remote interface message while the Counter is addressed to listen the Counter performs the action defined by the DDT command see page 4 46 RELATED FRONT PANEL KEYS None ...

Page 108: ...MMENTS RST OFF The commencement of the first measurement due to setting INITiate CONTinuous to ON sets the Pending Operation Flag to true The Pending Operation Flag is set false by aborting a measurement or by the completion of the last measurement after INITiate CONTinuous is set OFF With the measurements being made continuously the ABORt command aborts the current measurement in progress however...

Page 109: ...ediate sets the Pending Operation Flag to true Completing the measurement or block of measurements normally or by aborting sets Pending Operation Flag to false RELATED FRONT PANEL KEYS None INPut Subsystem This subsystem controls the characteristics of the Counter s input ports COMMAND INPut FILTer LPASs STATe Boolean Sets or queries the state of the Channel 1 low pass filter QUERY RESPONSE Single...

Page 110: ... more precise control of the measurement is required the CONFigure and READ commands can be used The CONFigure command is used to configure the instrument for the measurement to be taken and the READ command acquires the data performs any required post processing and then places the results in the Output Queue This allows you to configure the instrument generically using CONFigure and then to cust...

Page 111: ...query This command is the simplest to use but it allows little flexibility This command lets the Counter configure itself for an optimal measurement initiate the measurement and return the result i e it provides a complete measurement sequence MEAS query is equivalent to the CONF INIT FETC command sequence but with no flexibility CONFigure READ The combined use of these two commands allows for mor...

Page 112: ...easurement capabilities of the Counter model an error is generated and the command does not execute For POWer resolution must be defaulted or set to 0 01 dB See Descriptions of the Measurement Functions on page 4 16 for a description of each of the measurement functions See Table 4 2 for a summary of the function parameters and source_list for each of the measurement functions COMMAND CONFigure Qu...

Page 113: ... retrieves the specified result if it matches the current measurement type or can be derived from the current measurement type When SCALar function is omitted the function specified used by the last CONFigure MEASure READ or FETCh is used if possible Issuing this query while a measurement is in progress prevents further commands from being processed until the measurement completes This hold off ac...

Page 114: ...he Counter model an error is generated and the command does not execute Issuing this query while a measurement is in progress aborts the current measurement before initiating the measurement specified in the query The Counter then waits for the measurement to complete This has the effect of holding off processing of further commands until the desired measurement completes This hold off action can ...

Page 115: ...Figure MEASure READ or FETCh is used if possible Issuing this query while a measurement is in progress aborts the current measurement and idles the measurement cycle before initiating the desired measurement The Counter then waits for the measurement to complete This has the effect of holding off processing of further commands until the desired measurement completes This hold off action can be can...

Page 116: ... FUNCTION DESCRIPTION function parameters source_list VOLTage FREQuency expected_value resolution 1 2 POWer AC expected_value resolution 2 source_list uses the same syntax as SCPI channel _list expected_value Channel 1 range 10 Hz to 125 MHz MIN MAX DEF Channel 2 range 100 MHz to 20 GHz 53150A 26 5 GHz 53151A 46 GHz 53152A MIN MAX DEF default 100 MHz resolution description The value specifies the ...

Page 117: ...sure Instruction describe the signal you are going to measure This means that the Measure Instructions give compatibility between instruments since you do not need to know anything about the instrument you are using expected_value range 40 to 10 dBm default 0 00 resolution 0 01 resolution description resolution is supported only for compatibility with other instruments values 0 01 dB MIN MAX DEF d...

Page 118: ...ent it automatically starts the measurement and sends the result to the controller You can add parameters to provide more details about the signal you are going to measure Use MEASURE FREQ 50 MHZ 1 HZ where 50 MHz is the expected value this value can also be sent as 50E6 HZ and 1Hz is the required resolution The channel numbers can also be specified For example you can send MEASURE FREQ 1 MEASURE ...

Page 119: ...e measurement and query the result Using CONFigure with INITiate and FETCh The READ query is composed of the INITiate command which starts the measurement and the FETCh command which returns the results to the controller For example use CONF FREQ 5 GHZ 1 HZ to configure for a default frequency measurement where 1 Hz is the required resolution and 5 GHz is the expected value Use INITIATE to start t...

Page 120: ...ten comma separated NRf format number pairs The data point number pairs in the named profile are automatically sorted by frequency value before the profile is stored When power correction is in use the Counter uses the data points in the currently selected profile to determine the amount of loss correction to apply If the measured frequency is between two defined data points the Counter uses the t...

Page 121: ...cy value of 1 GHz and the other contains a frequency value equal to the highest frequency the Counter model can measure 53150A 20 GHz 53151A 26 5 GHz 53152A 46 GHz The remaining eight data points contain loss and frequency values of zero This is an event There is no query form of this command RELATED FRONT PANEL KEYS Shift Menu PWR CORR COMMAND MEMory NSTates Queries the Number of available SAV RC...

Page 122: ...mand COMMENTS An ABORt command interrupts the averaging and prevents a valid measurement result Averaging cannot be turned ON when the value of AVERage COUNt is one Attempting to turn averaging ON when AVERage COUNt 1 causes an error RELATED FRONT PANEL KEYS Avg COMMAND SENSe AVERage COUNt numeric_value Specifies the number of measurements to combine when AVERage STATe is ON RANGE The acceptable r...

Page 123: ...rrent session only To store the profile selection in non volatile memory issue a SAV command RELATED FRONT PANEL KEYS Shift Menu PWR CORR OFF 1 9 COMMAND SENSe CORRection CSET STATe Boolean Enables or disables power correction mode with the currently selected power correction profile applied COMMENTS RST OFF The power correction state is applied for the current session only To store the setting in...

Page 124: ... by the FUNCtion ON command Values are returned in the same order as the functions returned by the FUNCtion ON query If this query executes while a measurement is in progress the prior measurement result is returned if the prior result was not invalidated RELATED FRONT PANEL KEYS None COMMAND SENSe FILTer FM AUTO Boolean Turns the Counter s ability to automatically compensate for frequency modulat...

Page 125: ...rument It affects only the entered and displayed frequencies The Counter accepts only six digits of resolution for an offset entry through this command For example the command FREQ OFFSet 12345 678912MHz results in an offset of approximately 12 3456 GHz The coupling equation for this command is Entered Displayedfrequency Hardwarefrequency offset RELATED FRONT PANEL KEYS Freq Offset COMMAND SENSe F...

Page 126: ...t is used RELATED FRONT PANEL KEYS Resol COMMAND SENSe FREQuency TRACking character_program_data Selects one of three signal tracking modes SLOW FAST OFF When TRACking is set to SLOW the Counter applies two tracking routines after each measurement when it is set to FAST it uses only one tracking routine when it is set to OFF it does not use either of the tracking routines COMMENTS RST FAST The SLO...

Page 127: ...m mnemonics If the channel specifier s are set to default value s no channel specifier is returned in response If the channel specifier s are not set to default value s they are returned in the response with a single space separating the first channel specifier from the function name For example FREQ is returned for frequency on Channel 1 FREQ 2 is returned for frequency on Channel 2 COMMENTS RST ...

Page 128: ...annel specifier is returned in response If the channel specifier s are not set to default value s they are returned in the response with a single space separating the first channel specifier from the function name For example FREQ is returned for frequency on Channel 1 FREQ 2 is returned for frequency on Channel 2 The only functions that can be turned ON simultaneously are POW 2 and FREQ 2 COMMENT...

Page 129: ...unction COMMAND SENSe POWer AC REFerence numeric_value power_units This command sets a reference amplitude in dB for display of power measurements It is intended for use as a measurement offset so that a measurement can be referenced to a known value RANGE 50 dBm to 10 dBm UNITS dB dBm COMMENT RST 0 RELATED FRONT PANEL KEYS Shift Pwr Offset COMMAND SENSe POWer AC REFerence STATe Boolean Determines...

Page 130: ... rear panel of the Counter Reference connector is the reference timebase The Counter does not switch to EXTernal unless a suitable 1 2 5 or 10 MHz signal is present on the Reference connector on the back panel Execution of the command that is explicitly selecting internal or external timebase sets SENS ROSC SOUR AUTO to OFF If this is set toEXT and no valid external signal is available at the back...

Page 131: ...eration Status Register Group consists of a condition register two transition registers an event register and an enable register The commands in this subtree allow you to control and monitor these registers See the sections titled Operation Status Register Group and Questionable Data Status Register Group on pages 3 37 and 3 39 for a detailed description of the Operation Status Register Group Figu...

Page 132: ...ts or queries the Operation Event Status Enable Register RANGE The range for the non decimal numeric or NRf parameter is 0 to 32 767 QUERY RESPONSE Numeric data transferred as ASCII bytes in NR1 format COMMENTS The parameter and query response value when rounded to an integer value and expressed in base 2 binary represent the bit values of the Operation Event Status Enable Register The value of un...

Page 133: ...it in the Operation Event Status Register corresponds to a specific condition bit in the Operation Condition Status Register this allows the Operation Event Status Register to detect changes in conditions An event becomes TRUE when the associated condition makes the transition specified by the transition filters The event bits once set are sticky i e they cannot be cleared until they are read even...

Page 134: ...n filter specifies that a negative TRUE to FALSE transition of the corresponding bit in the Operation Condition Status Register generates the corresponding event in the Operation Event Status Register 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 CLS and SAV RCL RELATED FRONT PANEL KEYS None COMMAND STATus OPERati...

Page 135: ... Operation Event Status Register At power on and STAT PRES the positive transition filter is preset such that each bit is a 1 TRUE This value is unaffected by RST CLS and SAV RCL RELATED FRONT PANEL KEYS None COMMAND STATus PRESet This event command presets the enable registers and transition filters associated with the Operation and Questionable status reporting structures The enable registers an...

Page 136: ...tatus Register Group on pages 3 37 and 3 39 for a detailed description of the Questionable Data Signal Status Register Group Figure 4 2 The Questionable Data Signal Status Register Group COMMAND STATus QUEStionable CONDition Queries the status of the Questionable Data Condition Status Register QUERY RESPONSE Numeric data transferred as ASCII bytes in NR1 format Range is 0 to 32 767 The query respo...

Page 137: ...ueried 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 in the Status Byte Register bit 3 At power on and STAT PRES the Questionable Data Event Status Enable Register is cleared value is 0 This value is unaffected by RST CLS and SAV RCL RELATED FRONT PANEL KEYS None COMMAND STATus QUEStionable EVE...

Page 138: ...event becomes TRUE when the associated condition makes the transition specified by the transition filters The event bits once set are sticky i e they cannot be cleared until they are read even if they do not reflect the current status of a related condition The Questionable Data Event Status Register is cleared by CLS by STAT QUES EVEN and at power on RELATED FRONT PANEL KEYS None ...

Page 139: ...program message termination These settings are stored in non volatile memory and are unaffected by power on SAV RCL and RST The SYSTem COMMunicate SERial TRANsmit subtree controls parameters associated with transmission The Counter always uses eight data bits one stop bit and no parity COMMAND SYSTem COMMunicate GPIB SELF ADDress numeric_value Sets the HP IB address that the Counter uses REPLY FOR...

Page 140: ...g the SAV 0 command after changing the Baud rate RELATED FRONT PANEL KEYS Shift Menu BAUD 19200 14400 9600 4800 2400 1200 COMMAND SYSTem ERRor Queries the oldest error in the Error Queue and removes that error from the queue first in first out See Chapter 5 Errors for detailed error information QUERY RESPONSE The response is in the following form error_number error_description The error_number is ...

Page 141: ...naffected by RST and SAV RCL It is cleared by CLS RELATED FRONT PANEL KEYS None COMMAND SYSTem KEY CATalog This query returns a list of the Counter s keys that have command equivalents The response is a definite length block that lists the key codes and their meanings There is no command version RELATED FRONT PANEL KEYS None COMMAND SYSTem KEY numeric_value This command simulates the pressing of a...

Page 142: ...ermixing key commands and non key commands RELATED FRONT PANEL KEYS None COMMAND SYSTem VERSion Queries the SCPI version number with which the Counter complies QUERY RESPONSE Numeric data transferred as ASCII bytes in NR2 format The response is an NR2 formatted numeric value which has the form YYYY V where YYYY represents the year and V represents an approved version for that year RELATED FRONT PA...

Page 143: ...follows NUMERIC_VALUE RATE 0 0 FAST 0 5 MEDium 1 0 SLOW COMMENTS RST 0 0 The only settings that are accepted are the three listed above The measurement rate is also affected by the Resolution setting When INIT CONT is OFF the holdoff has no effect There is no setting for this command that corresponds to the front panel rate setting of HOLD The HOLD mode is entered through RST or INIT CONT OFF The ...

Page 144: ...ds The IEEE 488 2 Common Commands are general purpose commands that are common to all instruments as defined in IEEE 488 2 These commands are generally not related to measurement configuration They are used for functions like resetting the instrument identification or synchronization ...

Page 145: ...LS 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 since any new program message after a program message terminator clears the output queue This command clears any displayed error messag...

Page 146: ...eives the IEEE 488 1 Group Execute Trigger GET interface message page 4 7 or a TRG common command QUERY RESPONSE Definite length block The query response is one of the following terminated with a new line and EOI 14INIT 216INIT WAI DATA 0 15FETC 15READ COMMENTS RST 18INIT 1MM If a zero length arbitrary block is specified as the parameter the Counter does nothing when it receives a GET or TRG comma...

Page 147: ...tandard 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 Standard Event Status Register events to be summarized in the Status Byte Register bit 5 Figure 4 3 The Standard Event Status Enable Register See the section titled Standard Event Status Register on page 3 30 of this guide for a d...

Page 148: ... QUERY RESPONSE Numeric data transferred as ASCII bytes in NR1 format COMMENTS At power on the Standard Event Status Enable Register is cleared value is 0 This value is unaffected by RST and SAV RCL Values for ESE may be entered as decimal hexadecimal octal or binary numbers RELATED FRONT PANEL KEYS None ...

Page 149: ... 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 4 Standard Event Status Register See the section titled Standard Event Status Register on page 3 30 of this guide for a detailed description of the Standard Event Status ...

Page 150: ...ram message if it is not the last query an error 440 is generated The model number is either 53150A 53151A or 53152A The number of digits in the serial number is not fixed The format for the firmware ID is H0 nnn where nnn is a three digit number This is followed by the date and time of the firmware release RELATED FRONT PANEL KEYS Shift Menu IST Instrument Status COMMAND IST Queries the current s...

Page 151: ...as no query form See the section titled Using the OPC Command to Assert SRQ on page 3 50 for an example that uses this command RELATED FRONT PANEL KEYS None OPC Operation Complete Query COMMAND OPC This query causes the instrument to place a response in the output queue when a triggered action is complete This allows synchronization between a controller and the instrument using the MAV bit in the ...

Page 152: ...same bit definitions as the status byte The status byte and parallel poll enable registers are anded together the result determines the value of IST TRUE or FALSE RELATED FRONT PANEL KEYS None RCL Recall Command COMMAND RCL NRf non decimal numeric This command restores the state of the instrument from a copy stored in local non volatile memory Before the recall occurs the current state of the inst...

Page 153: ...ets instrument settings to their RST states and places the instrument in Operation Complete Idle State and Operation Complete Query Idle State COMMENTS See the section titled RST Response on page 2 19 for a complete listing of the RST state Each command description in this chapter includes the RST state in the Comment portion of the definition RELATED FRONT PANEL KEYS Reset Local ...

Page 154: ...te CONTinous SENSe AVERage STATe SENSe AVERage COUNt SENSe CORRection CSET SELect SENSe CORRection CSET STATe SENSe FILTer FM AUTO SENSe FREQuency OFFset STATe SENSe FREQuency RESolution SENSe FREQuency TRACking SENSe FUNCtion ON SENSe POWer AC REFerence SENSe POWer AC REFerence STATe SENSe ROSCillator SOURce TRIGger SEQuence HOLDoff DDT The following front panel settings are saved these settings ...

Page 155: ...Service Request Enable Register This register is used to enable a single or inclusive OR group of Status Byte Register events to generate an SRQ Figure 4 5 The Service Request Enable Register See the section titled Status Byte Register and Service Request Enable Register starting on page 3 27 for a detailed description of the Service Request Enable Register NRF RANGE 0 to 255 The value of bit 6 is...

Page 156: ...Chapter 4 Command Reference Common Commands 4 56 Programming Guide 4 COMMENTS At power on this value is cleared set to 0 This value is unaffected by RST CLS and SAV RCL RELATED FRONT PANEL KEYS None ...

Page 157: ...meric 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 has at least one reason for req...

Page 158: ...rigger Command COMMAND TRG This command is the device specific analog of the IEEE 488 1 Group Execute Trigger GET interface message page 4 7 and has exactly the same effect The TRG command performs the action defined by the DDT command page 4 46 RELATED FRONT PANEL KEYS None ...

Page 159: ...mpleted with errors detected The test failures that can be detected and their corresponding bit numbers are shown below The decimal weight of each bit is 2n where n is the bit number Table 4 4 Self Test Error Values Bit Test Failed Bit Test Failed 0 Band 1 Signal Path 19 ROM 1 Band 1 Threshold 20 Unused 2 Band 2 RF Threshold 21 Front Panel Hardware 3 Band 2 IF Through Threshold 22 HP IB 4 Band 2 I...

Page 160: ...nd Reference Common Commands 4 60 Programming Guide 4 COMMENTS The following are tested RELATED FRONT PANEL KEYS Shift Menu DO SELF TEST CPU EEPROM Front panel components Measurement hardware ROM Power supply outputs ...

Page 161: ...mmand prevents the instrument from executing any further commands or queries until all pending operations are complete The only way to cancel this holdoff is by device clear power on RST or CLS See the section titled Using the WAI Command on page 3 49 for an example that uses this command RELATED FRONT PANEL KEYS None ...

Page 162: ...Chapter 4 Command Reference Common Commands 4 62 Programming Guide 4 ...

Page 163: ...5 Errors ...

Page 164: ...uction 5 2 Programming Guide 5 Introduction This chapter explains how to read error messages from the Counter discusses the types of errors and provides a table of all of the Counter s error messages and their probable causes ...

Page 165: ...wing short program reads all errors one at a time oldest to newest from the error queue As each error is read it is automatically erased from the error queue When the error queue becomes empty that is when all errors have been read from the queue further queries return the 0 No error response 10 ASSIGN Cntr TO 703 20 Assign path name 30 DIM Err_string 255 40 Creates array for error string 50 REPEA...

Page 166: ...w 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 10 9 positions for the error messages and 1 position for the Queue overflow error Reading an error from the head of the queue removes that error from the queue and opens a position at the tail of the queue for a new error if one is subsequentl...

Page 167: ...error described in each class for example 100 200 300 400 is a generic error No Error The SYST ERR response 0 No error indicates that there are no errors in the Counter s error queue The error queue is empty when every error in the queue has been read SYST ERR query or the queue was cleared by power on or CLS Error Number Error Type 0 No Error 100 to 199 Command Errors 200 to 299 Execution Errors ...

Page 168: ...ed Unrecognized headers include incorrect Counter specific headers and incorrect or unimplemented IEEE 488 2 Common Commands A Group Execute Trigger GET was entered into the input buffer inside of an IEEE 488 2 program message Events that generate command errors do not generate execution errors device specific errors or query errors Execution Error An error number in the range 200 to 299 indicates...

Page 169: ...ossibly due to an abnormal hardware or firmware condition These codes are also used for self test response errors The occurrence of any error in this class causes the device specific error bit bit 3 in the Event Status Register to be set Query Error An error number in the range 400 to 499 indicates that the output queue control of the Counter has detected a problem with the message exchange protoc...

Page 170: ...cted in the header A character that is not a legal header separator was encountered while parsing the header 112 113 114 120 121 123 124 128 130 Program mnemonic too long Undefined header Header suffix out of range Numeric data error Invalid character in number Exponent too large Too many digits Numeric data not allowed Suffix error The header or character data element contains more than twelve ch...

Page 171: ...s received before the terminal quote character A string data element was encountered but was not allowed by the Counter at this point in parsing 160 161 168 170 171 178 181 200 210 Block data error Invalid block data Block data not allowed Expression error Invalid expression Expression data not allowed Invalid outside macro definition Execution error Trigger error This error can be generated when ...

Page 172: ...s Used where exact value from a list of possible values was expected No valid data available New measurement started but not completed Indicates that a legal program command or query could not be executed because of a hardware problem in the Counter 241 300 310 321 330 350 400 410 Hardware missing Device specific error System error Out of memory Self test failed Queue overflow Query error Query IN...

Page 173: ... an UNTERMINATED Query error occurred For example the Counter was addressed to talk and an incomplete program message was received Indicates that a condition causing a DEADLOCKED Query error occurred For example both input buffer and output 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...

Page 174: ...Chapter 5 Errors Error Types 5 12 Programming Guide 5 ...

Page 175: ...B 3 6 4 39 Applications 1 5 ASCII format 3 55 Assumptions 1 7 auto trigger 4 8 AVERage 2 5 2 15 4 22 STATe 2 15 averaging 2 15 B BACKground 2 5 4 5 BASIC 1 4 BAUD 2 7 2 18 4 40 baud rate 2 18 4 40 Block data error 5 9 Block data not allowed 5 9 Boolean 2 12 C C 1 4 CATalog 4 41 CATalog 2 18 Character data error 5 9 Character data not allowed 5 9 Character data too long 5 9 CLEAR 2 15 4 21 clear 4 ...

Page 176: ...9 Service Request Enable 2 10 Service Request Enable Command 4 55 Service Request Enable Query 2 11 4 55 Standard Event Status Enable 2 10 Standard Event Status Enable Command 4 47 Standard Event Status Enable Query 2 10 4 47 Status Byte Query 2 11 4 57 Trigger 2 11 Trigger Command 4 58 Wait to Continue 2 11 Wait to Continue Command 4 61 common commands definition 2 9 4 44 summary list 2 10 syntax...

Page 177: ...ist 5 8 ESB 3 29 EVENt 2 17 4 33 4 37 Event Enable Register 3 33 3 36 3 37 Event Register 3 33 3 35 3 37 Event Status Register Query 2 10 4 49 EXE 3 31 Execution Error 5 6 5 9 definition 5 6 status bit 3 32 expected_value 4 12 4 13 Exponent too large 5 8 Expression data not allowed 5 9 Expression error 5 9 F fall time 4 27 4 28 FETCh 2 13 2 14 4 10 FETCh 4 11 4 13 FILTer 2 7 2 15 4 9 4 24 filter 2...

Page 178: ...itiate measurements 4 8 INITitiate 2 5 INPut 2 7 2 13 4 9 Instrument Status 2 10 4 50 Instrument Status Query 2 10 Invalid block data 5 9 Invalid character 5 8 Invalid character data 5 9 Invalid character in number 5 8 Invalid expression 5 9 Invalid outside macro definition 5 9 Invalid separator 5 8 Invalid string data 5 9 Invalid suffix 5 9 K KEY 2 18 4 41 key codes 2 18 key queue 4 41 L Learning...

Page 179: ...oup 3 33 3 37 4 31 Operation status reporting structure 4 34 OSB 3 29 oscillator reference 4 27 4 29 4 30 Out of memory 5 10 Output Queue 2 10 output queue 4 51 P Parallel Poll Enable Register 2 10 4 52 Parallel Poll Enable Register Query 2 10 parallel poll response 2 10 4 50 Parameter error 5 10 Parameter not allowed 5 8 parameter types 2 12 3 16 parameters 2 14 4 12 peak to peak voltage 4 27 4 2...

Page 180: ...5 reference oscillator 2 16 4 27 4 29 4 30 reference timebase 4 30 Related Documentation 1 8 remote 3 2 Reset 2 10 4 53 Reset Command 4 53 RESolution 2 16 4 26 resolution 2 14 4 13 4 26 response format 4 11 rise time 4 27 4 28 ROSCillator 2 16 4 30 RQC 3 31 RQS 4 57 RQS MSS 3 29 RS 232 1 2 1 7 3 5 3 7 4 39 S Save 2 10 4 54 Save Command 4 54 SCALar 4 12 4 13 4 14 4 15 SCPI 1 2 1 5 1 8 1 9 2 8 3 2 o...

Page 181: ... 16 SEQuence 2 5 2 18 SERial 2 7 2 18 4 40 serial cable 3 7 serial interface 1 2 1 7 Service Request Enable 2 10 Command 4 55 Query 2 11 4 55 Register 3 29 4 55 Settings conflict 5 10 signal tracking modes 2 16 SOURce 2 16 source_list 2 14 4 11 4 12 SRQ 4 55 4 57 Standard Event Status Enable 2 10 Command 4 47 Query 2 10 4 47 Register 2 10 3 30 3 32 4 47 4 49 5 3 Standard Event Status Reporting 3 3...

Page 182: ...ystem error 5 10 T time interval 4 27 4 28 Too many digits 5 8 Too much data 5 10 totalize 4 27 4 28 TRACking 2 16 4 26 Transition Filter 3 34 transition filter 4 35 TRIGger 2 5 2 18 4 43 trigger 2 11 device 4 46 command 4 58 error 5 9 ignored 5 10 system 2 13 Turbo C using 3 55 U Unaffected by RST 2 20 Undefined header 5 8 URQ 3 31 user settings 2 10 using internal reference status bit 3 38 V ver...

Page 183: ... Canada Ltd 5150 Spectrum Way Mississauga Ontario L4W 5G1 905 206 4725 Latin America Hewlett Packard Latin American Region Headquarters 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 Boulevard Building 51L SC Santa Clara California 95052 8059 1 800 452 4844 Europe Africa and Mid...

Page 184: ......

Page 185: ...and the warranty terms contained in this statement except to the extent lawfully permitted do not exclude restrict or modify and are in addition to the mandatory statutory rights applicable to the sale of this product to you Assistance Product maintenance agreements and other customer assistance agreements are available for Hewlett Packard products For any assistance contact your nearest Hewlett P...

Page 186: ... Manual Part Number 53150 90002 Printed in U S A NOVEMBER 1997 ...

Reviews: