Agilent Technologies 8935 Series E6380A CDMA Cellular/PCS Base Station Test Set and E6381A TDMA Base Station Test Set Programmer’s Guide Firmware Version: E6380A - A.02.02 and above E6381A - A.02.
Notice Information contained in this document is subject to change without notice. All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under the copyright laws. This material may be reproduced by or for the U.S. Government pursuant to the Copyright License under the clause at DFARS 52.227-7013 (APR 1988).
Contents 1. Using HP-IB Overview of the Test Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manual Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internal Automatic Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . External Automatic Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 4. IEEE Common Commands IEEE 488.2 Common Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Common Command Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 *IDN? (Identification Query) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 *OPT? (Option Identification Query) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Calibration Status Register Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware Status Register #2 Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware Status Register #1 Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Communicate Status Register Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HP-IB Service Requests . . . .
Contents Copying Files Using IBASIC Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 Copying an Entire Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 Using RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 Initializing RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents PROGram Subsystem Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the EXECute Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The TESTS Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Writing Programs For the TESTS Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 8
About this manual, its companions, and product regulatory information. What is discussed in this manual This manual explains how to program the Test Set. This document presents the information needed to perform IBASIC programming operations, such as writing, editing, copying, or cataloguing programs. Where to find other information HP-IB syntax used to write programs for the Test Set if found in the HP-IB Syntax Reference Guide.
HP-IB and GPIB are one and the same. NOTE Trademark Acknowledgements Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company. Microsoft‚, Windows, and MS-DOS‚ are registered trademarks of Microsoft Corporation. ProComm‚ is a registered trademark of DataStorm Technologies, Inc. HyperTerminal is a registered trademark of Hilgraeve, Incorporated Pentiumand Intel are registered trademarks of Intel Corporation.
Regulatory Information Manufacturer’s Declaration This statement is provided to comply with the requirements of the German Sound Emission Directive, from 18 January 1991. This product has a sound pressure emission (at the operator position) < 70 dB(A). • Sound Pressure Lp < 70 dB(A). • At Operator Position. • Normal Operation. • According to ISO 7779:1988/EN 27779:1991 (Type Test).
Safety GENERAL This product and related documentation must be reviewed for familiarization with safety markings and instructions before operation. This product has been designed and tested in accordance with IEC Publication 1010, Safety Requirements for Electronic Measuring Apparatus, and has been supplied in a safe condition. This instruction documentation contains information and warnings which must be followed by the user to ensure safe operation and to maintain the product in a safe condition.
Safety Considerations for this Instrument WARNING ! ! ! This product is a Safety Class I instrument (provided with a protective earthing ground incorporated in the power cord). The mains plug shall only be inserted in a socket outlet provided with a protective earth contact. Any interruption of the protective conductor inside or outside of the product is likely to make the product dangerous. Intentional interruption is prohibited. This product is not intended for use in wet or damp environments.
WARNING Whenever it is likely that the protection has been impaired, the instrument must be made inoperative and be secured against any unintended operation. If this instrument is to be energized via an autotransformer (for voltage reduction), make sure the common terminal is connected to the earth terminal of the power source. If this product is not used as specified, the protection provided by the equipment could be impaired.
CAUTION Always use the three-prong ac power cord supplied with this product. Failure to ensure adequate earth grounding by not using this cord may cause personal injury and/or product damage. This product is designed for use in Installation Category II and Pollution Degree 2 per IEC 1010 and IEC 664 respectively. For indoor use only. This product has autoranging line voltage input, be sure the supply voltage is within the specified range.
WARNING - RUBIDIUM REFERENCE ASSEMBLY (E6381A) The optional Rubidium Reference assembly, A2A15, (OPTION AY5) of the Agilent Technologies 8935 Series E6381A TDMA Base Station Test Set contains the radioactive isotope Rubidium 87. DO NOT attempt to repair this assembly. This assembly contains no user serviceable parts. The Rubidium 87 is isolated inside a vacuum tube which is enclosed within a metal housing, and as a result, there is no measurable external radiation.
Agilent Technologies Warranty Statement for Commercial Products Product Name: E6380A/E6381A Duration of Warranty: 1 year 1. Agilent Technologies warrants Agilent hardware, accessories and supplies against defects in materials and workmanship for the period specified above. If Agilent Technologies receives notice of such defects during the warranty period, Agilent will, at its option, either repair or replace products which prove to be defective. Replacement products may be either new or like-new. 2.
8. Agilent Technologies will be liable for damage to tangible property per incident up to the greater of $300,000 or the actual amount paid for the product that is the subject of the claim, and for damages for bodily injury or death, to the extent that all such damages are determined by a court of competent jurisdiction to have been directly caused by a defective Agilent Technologies product. 9.
Regional Sales Offices Table 2 Regional Sales and Service Offices United States of America: Agilent Technologies Test and Measurement Call Center P.O. Box 4026 Englewood, CO 80155-4026 Canada: Agilent Technologies Canada Inc. 5150 Spectrum Way Mississauga, Ontario L4W 5G1 (tel) 1 800 452 4844 (tel) 1 877 894 4414 Europe: Agilent Technologies European Marketing Organization P.O. Box 999 1180 AZ Amstelveen The Netherlands (tel) (3120) 547 9999 Japan: Agilent Technologies Japan Ltd.
O:\Manuals\E6380A_Progguid\Book\Preface.
1 Using HP-IB 21
Using HP-IB Overview of the Test Set Overview of the Test Set The Test Set combines numerous separate test instruments and an IBASIC controller into one package. All of the Test Set’s functions can be automatically controlled through application programs running on the built-in IBASIC controller or on an external controller connected through HP-IB. Developing programs for the Test Set is simplified if the programmer has a basic understanding of how the Test Set operates.
Using HP-IB Overview of the Test Set Manual Control Mode The Test Set’s primary instruments are shown on the left side of Figure 1-1 on page 28. There are two classes of instruments in the Test Set: signal analyzers (RF Analyzer, AF Analyzer, Oscilloscope, Spectrum Analyzer) and signal sources (RF Generator, AF Generator #1, AF Generator #2). Since so many instruments are integrated into the Test Set, it is not feasible to have an actual “front panel” for each instrument.
Using HP-IB Overview of the Test Set Internal Automatic Control Mode In Internal Automatic Control mode the Test Set’s operation is controlled by an application program running on the built-in IBASIC controller. The built-in controller runs programs written in Agilent Technologies Instrument BASIC (IBASIC), a subset of the BASIC programming language used on the HP 9000 Series 200/300 System Controllers. IBASIC is the only programming language supported on the built-in IBASIC controller.
Using HP-IB Overview of the Test Set Differences Between the Test Set’s IBASIC Controller and Other Single-Tasking Controllers The IBASIC controller is unlike other single tasking instrumentation controllers in several ways. First, it does not have a keyboard. This imposes some limitations on creating and editing IBASIC programs directly on the Test Set.
Using HP-IB Overview of the Test Set External Automatic Control Mode In External Automatic Control mode the Test Set’s operation is controlled by an external controller connected to the Test Set through the HP-IB interface. When in External Automatic Control mode the Test Set’s internal configuration is the same as in Manual Control Mode with two exceptions: 1.
Using HP-IB Overview of the Test Set Writing programs for the Test Set One of the design goals for automatic control of the Test Set was that it operate the same way programmatically as it does manually. This is a key point to remember when developing programs for the Test Set. The benefit of this approach is that to automate a particular task, one need only figure out how to do the task manually and then duplicate the same process in software.
RF ANALYZER SPECTRUM ANALYZER OSCILLOSCOPE AF ANALYZER AF GEN #2 INSTRUMENT SETUP INFORMA- FRONT PANEL INFORMA- INSTRUMENT CONTROL HARDWARE SCREEN CONTROL HARDWARE HP - IB #8 IBASIC CONTROLLER HP - IB #7 PARALLEL PRINTER #15 PARALLEL PRINTER #16 SERIAL I/F #9 SERIAL I/F #10 SERIAL I/F #11 ROM PC CARD KEYPAD/ROTARY KNOB Display FRONT PANEL Figure 1-1 AF GEN #1 RF GEN MEASUREMENT RESULTS AND DUT DATA Using HP-IB Overview of the Test Set Manual Control Mode O:\Manuals\E6380A_Prog
Chapter 1 RF ANALYZER SPECTRUM ANALYZER OSCILLOSCOPE AF ANALYZER AF GEN #2 INSTRUMENT SETUP INFORMA- FRONT PANEL INFORMA- INSTRUMENT CONTROL HARDWARE SCREEN CONTROL HARDWARE HP - IB #8 IBASIC CONTROLLER HP - IB #7 PARALLEL PRINTER #15 PARALLEL PRINTER #16 SERIAL I/F #9 SERIAL I/F #10 SERIAL I/F #11 ROM DISK PC CARD KEYPAD/ROTARY KNOB Display FRONT PANEL Figure 1-2 AF GEN #1 RF GEN MEASUREMENT RESULTS AND DUT DATA Using HP-IB Overview of the Test Set Internal Automatic Control Mode
Using HP-IB Getting Started Getting Started What is HP-IB? The Hewlett-Packard Interface Bus (HP-IB) is a Hewlett-Packard implementation of the IEEE 488.1-1987 Standard Digital Interface for Programmable Instrumentation. Incorporation of the HP-IB into the Test Set provides several valuable capabilities: • Programs running in the Test Set’s IBASIC controller can control all the Test Set’s functions using its internal HP-IB. This capability provides a single-instrument automated test system.
Using HP-IB Getting Started HP-IB Information Provided in This Manual What Is Explained • How to configure the Test Set for HP-IB operation • How to make an instrument setting over HP-IB • How to read-back instrument settings over HP-IB • How to make measurements over HP-IB • How to connect external PCs, terminals or controllers to the Test Set • HP-IB command syntax for the Test Set • IBASIC program development • IBASIC program transfer over HP-IB • Various advanced functions such as, increasing measureme
Using HP-IB Getting Started General HP-IB Programming Guidelines The following guidelines should be considered when developing programs which control the Test Set through HP-IB: • Guideline #1. 1. Bring the Test Set to its preset state using the front-panel PRESET key. This initial step allows you to start developing the measurement sequence with most fields in a known state. 2. Make the measurement manually using the front-panel controls of the Test Set.
Using HP-IB Getting Started 6. Send the MEASure query command to initiate a reading. This will place the measured value into the Test Set’s Output Queue. NOTE When making AF Analyzer SINAD, Distortion, Signal to Noise Ratio, AF Frequency, DC Level, or Current measurements, the measurement type must first be selected using the SELect command. For example, MEAS:AFR:SEL'SINAD' followed by MEAS:AFR:SINAD? 7.
Using HP-IB Getting Started • Guideline #2. If the program stops or “hangs up” when trying to ENTER a measured value, it is most likely that the desired measurement field is not available. There are several reasons that can happen: 1. The screen where the measurement field is located has not been DISPlayed before querying the measurement field. 2. The measurement is not turned ON. 3. The squelch control is set too high.
Using HP-IB Getting Started • Guideline #3. The syntax diagrams in the HP-IB Syntax Reference Guide show where single quotes are needed and where spaces are needed. Example 1-2 Example OUTPUT 714;"DISPAFAN" OUTPUT 714;"AFAN:DEMP’Off’" Improper use of single quotes and spaces will cause, HP-IB Error: −103 Invalid Separator • Guideline #4.
Using HP-IB Getting Started Control Annunciators The letters and symbols at the top right corner of the display indicate these conditions: • R indicates the Test Set is in remote mode. The Test Set can be put into the remote mode by an external controller or by an IBASIC program running on the built-in IBASIC controller. • L indicates that the Test Set has been addressed to Listen. • T indicates that the Test Set has been addressed to Talk.
Using HP-IB Getting Started Preparing the Test Set For HP-IB Use 1. If other HP-IB devices are in the system, attach an HP-IB cable from the Test Set’s HP-IB connector to any one of the other devices in the test system. 2. Access the I/O CONFIGURE screen and perform the following steps: a. Set the Test Set’s HP-IB address using the HP-IB Adrs field. b. Set the Test Set’s HP-IB controller capability using the Mode field. • Talk&Listen configures the Test Set to not be the System Controller.
Using HP-IB Getting Started Using the HP-IB with the Test Set’s built-in IBASIC Controller The Test Set has two HP-IB interfaces, an internal-only HP-IB at select code 8 and an external HP-IB at select code 7. The HP-IB at select code 8 is only available to the built-in IBASIC controller and is used exclusively for communication between the IBASIC controller and the Test Set. The HP-IB at select code 7 serves three purposes: 1. It allows the Test Set to be controlled by an external controller 2.
Using HP-IB Getting Started Basic Programming Examples The following simple examples illustrate the basic approach to controlling the Test Set through the HP-IB. The punctuation and command syntax used for these examples is given in the HP-IB Syntax Reference Guide. The bus address 714 used in the following BASIC language examples assumes an HP-IB interface at select code 7, and a Test Set HP-IB address of 14. All examples assume an external controller is being used.
Using HP-IB Getting Started To Read a Field’s Setting over HP-IB 1. Use the DISPlay command to access the screen containing the field whose setting is to be read. 2. Use the Query form of the syntax for that field to place the setting value into the Test Set’s output buffer. 3. Enter the value into the correct variable type within the program context (refer to the HP-IB Syntax Reference Guide, for proper variable type). The following example reads several fields.
Using HP-IB Getting Started To Make a Simple Measurement The basic method for making a measurement is very similar to the method used to read a field setting. 1. Use the DISPlay command to access the screen containing the desired measurement. 2. Use the MEASure form of the syntax for that measurement to place the measured value into the Test Set’s output buffer. 3. Enter the value into the correct variable type within the program context (refer to the HP-IB Syntax Reference Guide for proper variable type).
Using HP-IB Remote Operation Remote Operation The Test Set can be operated remotely through the Hewlett-Packard Interface Bus (HP-IB). Except as otherwise noted, the Test Set complies with the IEEE 488.1-1987 and IEEE 488.2-1987 Standards. Bus compatibility, programming and data formats are described in the following sections. All front-panel functions, except those listed in Table 1-1, are programmable through HP-IB.
Using HP-IB Remote Operation Remote Capabilities Conformance to the IEEE 488.1-1987 Standard For all IEEE 488.1 functions implemented, the Test Set adheres to the rules and procedures as outlined in that Standard. Conformance to the IEEE 488.2-1987 Standard For all IEEE 488.2 functions implemented, the Test Set adheres to the rules and procedures as outlined in that Standard with the exception of the *OPC Common Command. Refer to the *OPC Common Command description. IEEE 488.
Using HP-IB Addressing Addressing Factory Set Address The Test Set’s HP-IB address is set to decimal 14 at the factory. The address can be changed by following the instructions in “Setting the Test Set’s Bus Address” on page 44. Extended Addressing Extended addressing (secondary command) capability is not implemented in the Test Set. Multiple Addressing Multiple addressing capability is not implemented in the Test Set.
Using HP-IB IEEE 488.1 Remote Interface Message Capabilities IEEE 488.1 Remote Interface Message Capabilities The remote interface message capabilities of the Test Set and the associated IEEE 488.1 messages and control lines are listed in Table 1-3. Table 1-3 Test Set IEE 488.1 Interface Message Capability Message Type Implemented Response IEEE 488.1 Message Data Yes All front-panel functions, except those listed in Table 1-2 on page 43, are programmable.
Using HP-IB IEEE 488.1 Remote Interface Message Capabilities Table 1-3 Test Set IEE 488.1 Interface Message Capability Message Type Implemented Response IEEE 488.1 Message Clear Lockout/ Set Local Yes The Test Set returns to local mode (front-panel control) and local lockout is cleared when the REN bus control line goes false. When the Test Set returns to local mode the output signals and internal settings remain unchanged, except that triggering is set to TRIG:MODE:SETT FULL;RETR REP.
Using HP-IB IEEE 488.1 Remote Interface Message Capabilities Table 1-3 Test Set IEE 488.1 Interface Message Capability Message Type Implemented Response IEEE 488.1 Message Trigger Yes If in remote programming mode and addressed to listen, the Test Set makes a triggered measurement following the trigger conditions currently in effect in the instrument. The Test Set responds equally to the Group Execute Trigger (GET) bus command or the *TRG Common Command.
Using HP-IB Remote/Local Modes Remote/Local Modes Remote Mode In Remote mode all front-panel keys are disabled (except for the LOCAL key, POWER switch, Volume control and Squelch control). The LOCAL key is only disabled by the Local Lockout bus command. When in Remote mode and addressed to Listen the Test Set responds to the Data, Remote, Local, Clear (SDC), and Trigger messages.
Using HP-IB Remote/Local Modes Local To Remote Transitions The Test Set switches from Local to Remote mode upon receipt of the Remote message (REN bus line true and Test Set is addressed to listen). No instrument settings are changed by the transition from Local to Remote mode, but triggering is set to the state it was last set to in Remote mode (if no previous setting, the default is FULL SETTling and REPetitive RETRiggering). The R annunciator in the upper-right corner of the display is turned on.
Using HP-IB Remote/Local Modes Local Lockout The Local Lockout mode disables the front-panel LOCAL key and allows return to Local mode only by commands from the System Controller (Clear Lockout/Set Local message). When a data transmission to the Test Set is interrupted, which can happen if the LOCAL key is pressed, the data being transmitted may be lost. This can leave the Test Set in an unknown state.
2 Methods For Reading Measurement Results 51
Methods For Reading Measurement Results Background Background One of the most common remote user interface operations performed on an Test Set is to query and read a measurement result. Generally, this operation is accomplished by sending the query command to the Test Set, followed immediately by a request to read the requested measurement result.
Methods For Reading Measurement Results Background The following programs demonstrate a recommended technique for querying and entering data from the Test Set. This technique will prevent the Test Set from getting into a ‘hung’ state such that power must be cycled on the Test Set to regain manual or programmatic control. There are a variety of programming constructs which can be used to implement this technique.
Methods For Reading Measurement Results RMB ‘ON TIMEOUT’ Example Program RMB ‘ON TIMEOUT’ Example Program The following example program demonstrates a recommended technique which can be utilized in situations where a measurement result time-out value of 32.767 seconds or less is adequate. In the RMB language, the time-out parameter for the ON TIMEOUT command has a maximum value of 32.767 seconds. If a time-out value of greater than 32.
Methods For Reading Measurement Results RMB ‘ON TIMEOUT’ Example Program Example 2-2 Time-out Example 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 COM /Io_names/ INTEGER Inst_addr,Bus_addr CLEAR SCREEN Inst_addr=714 Bus_addr=7 CLEAR Inst_addr OUTPUT Inst_addr;"TRIG:ABORT" OUTPUT Inst_addr;"*RST" OUTPUT Inst_addr;"DISP RFAN" ! ! Execute a call to the Measure function with a request
Methods For Reading Measurement Results RMB ‘ON TIMEOUT’ Example Program Comments for Recommended Routine Table 2-1 Program Line Number Comments 50 Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem into a known state. This allows the control program to regain programmatic control of the Test Set if it is in an error state when the program begins to run. 60 Command the Test Set to abort the currently executing measurement cycle.
Methods For Reading Measurement Results RMB ‘ON TIMEOUT’ Example Program Table 2-1 Program Line Number Comments 380 Set up a time-out for any I/O activity on the HP-IB while the control program is trying to regain control of the Test Set. This will allow the function to gracefully stop program execution if the control program cannot regain control of the Test Set.
Methods For Reading Measurement Results RMB ‘MAV’ Example Program RMB ‘MAV’ Example Program The following RMB example program demonstrates a technique that can be used in situations where a 32.767 measurement result time-out value is not adequate. Measurement result time-out value is defined to mean the amount of time the control program is willing to wait for the Test Set to return a valid measurement result to the control program.
Methods For Reading Measurement Results RMB ‘MAV’ Example Program Example 2-3 MAV Example 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 COM /Io_names/ INTEGER Inst_addr,Bus_addr CLEAR SCREEN Inst_addr=714 Bus_addr=7 CLEAR Inst_addr OUTPUT Inst_addr;"TRIG:ABORT" OUTPUT Inst_addr;"*RST" OUTPUT Inst_addr;"DISP RFAN" ! ! Execute a call to the Measure functio
Methods For Reading Measurement Results RMB ‘MAV’ Example Program Comments for Recommended Routine Table 2-2 Comments for Measure Function from MAV Example Program Program Line Number Comments 50 Send a Selected Device Clear (SDC) to the Test Set to put the HP-IB subsystem into a known state. This allows the control program to regain programmatic control of the Test Set if it is in an error state when the program begins to run.
Methods For Reading Measurement Results RMB ‘MAV’ Example Program Table 2-2 Comments for Measure Function from MAV Example Program Program Line Number Comments 360 Perform a serial poll to read the Status Byte from the Test Set. A serial poll is used because the *STB Common Command cannot be processed by the Test Set while a query is pending. Sending the *STB command will cause an ’HP-IB Error: -410 Query INTERRUPTED’ error.
Methods For Reading Measurement Results RMB ‘MAV’ Example Program Table 2-2 Comments for Measure Function from MAV Example Program Program Line Number Comments 490 The following lines of code handle the case where the control program cannot regain control of the Test Set. The actions taken in this section of the code will be implementation dependent. For the example case a message is displayed to the operator and the program is stopped.
3 HP-IB Command Guidelines 63
HP-IB Command Guidelines Sequential and Overlapped Commands Sequential and Overlapped Commands IEEE 488.2 makes the distinction between sequential and overlapped commands. Sequential commands complete their task before execution of the next command can begin. Overlapped commands can run concurrently, that is, a command following an overlapped command may begin execution while the overlapped command is still in progress. All commands in the Test Set are sequential.
HP-IB Command Guidelines Guidelines for Operation Guidelines for Operation The following topics discuss rules and guidelines for controlling the Test Set through HP-IB. Command Names All command names of more than four characters have an alternate abbreviated form using only upper case letters and, in some cases, a single numeral. The commands are not case sensitive. Upper and lower case characters can be used for all commands.
HP-IB Command Guidelines Guidelines for Operation Using Quotes for String Entries Quotation marks ’ and " are used to select a non-numeric field setting. The value is entered into the command line as a quoted alphanumeric string. Quotes are used with all Underlined (toggling) and One-of-many (menu choice) fields. For example, to set the RF Generator’s Output Port field to Dupl (duplex), the Dupl would be entered into the command string.
HP-IB Command Guidelines Guidelines for Operation Example 3-4 Example DISP AFAN AFAN:INP:GAIN ’40 dB’ Using the Semicolon to Output Multiple Commands Multiple commands can be output from one program line by separating the commands with a semicolon (;). The semicolon tells the Test Set’s HP-IB command parser to back up one level of hierarchy and accept the next command at the same level as the previous command. For example, on one command line, it is possible to 1. access the AF ANALYZER screen, 2.
HP-IB Command Guidelines Guidelines for Operation Example 3-6 Example RFAN:FREQ 850MHZ;:AFAN:INP ’FM DEMOD’ Using Question Marks to Query Setting or Measurement Fields The question mark (?) is used to query (read-back) an instrument setting or measurement value. To generate the query form of a command, place the question mark immediately after the command.
HP-IB Command Guidelines Guidelines for Operation Display Units (DUNits) Display Units are the units-of-measure used by the Test Set to display numeric data (field settings and measurement results) on the front-panel CRT display. For example, the RF Generator’s frequency can be displayed in Hz, kHz, MHz and GHz. Similarly, the measured TX Frequency can be displayed in Hz, kHz, MHz and GHz.
HP-IB Command Guidelines Guidelines for Operation Example 3-16 mV :MEAS:RFR:POW:DUN MV Example 3-17 µV :RFG:AMPL:DUN µV Example 3-18 dBµV :RFG:AMPL:DUN DBµV Example 3-19 W :MEAS:RFR:POW:DUN W Example 3-20 mW :MEAS:RFR:POW:DUN MW Example 3-21 dBm :MEAS:RFR:POW:DUN DBM Example 3-22 db :MEAS:AFR:DISTN:DUN DB Example 3-23 % :MEAS:AFR:DISTN:DUN PCT Example 3-24 s :DEC:FGEN:GATE:DUN S Example 3-25 ms :DEC:FGEN:GATE:DUN MS Reading Back Display Units Setting Use the Display Units query command,
HP-IB Command Guidelines Guidelines for Operation Example 3-26 Example !Query Display Units setting for TX Power measurement. OUTPUT 714;"MEAS:RFR:POW:DUNits?" !Enter the returned value into a string variable. ENTER 714;A$ The returned units-of-measure will be whatever is shown on the Test Set’s front-panel display for the TX Power measurement: dBm, V, mV, dBuV, or W. All returned characters are in upper case. For example, if dBuV is displayed, DBUV is returned.
HP-IB Command Guidelines Guidelines for Operation HP-IB Units (UNITs) HP-IB Units are the units-of-measure used by the Test Set when sending numeric data (field settings and measurement results) through HP-IB, and the default units-of-measure for receiving numeric data (field settings and measurement results) through HP-IB. Changing HP-IB Units has no affect on the Display Units or Attribute Units settings. Table 3-1 lists the HP-IB Units used in the Test Set.
HP-IB Command Guidelines Guidelines for Operation Changing HP-IB Units Use the UNITs command to change the HP-IB Units setting for selected measurement or instrument setup fields. Only the HP-IB units for power, relative level, and frequency error can be changed. Table 3-2 lists the measurement and instrument setup fields which have changeable HP-IB Units.
HP-IB Command Guidelines Guidelines for Operation Guidelines for HP-IB Units • When setting the value of a numeric field (such as AFGen1 Freq), any non–HP-IB Unit unit-of-measure must be specified in the command string, otherwise the current HP-IB Unit is assumed by the Test Set. For example, if the command RFG:FREQ 900 is sent through HP-IB, the Test Set will interpret the data as 900 Hz, since HZ is the HP-IB Unit for frequency. This would result in an Input value out of range error.
HP-IB Command Guidelines Guidelines for Operation Attribute Units (AUNits) Attribute Units are the units-of-measure used by the Test Set when sending or receiving numeric data through HP-IB for the MEASure commands: REFerence, METer (HEND, LEND, INT), HLIMit and LLIMit (refer to “Number Measurements Syntax” in the HP-IB Syntax Reference Guide for further details). These measurement commands are analogous to the front-panel Data Function keys: REF SET, METER, HI LIMIT and LO LIMIT respectively.
HP-IB Command Guidelines Guidelines for Operation Default Data Function Values The majority of measurements made with the Test Set can be made using the Data Functions: REF SET, METER, AVG, HI LIMIT and LO LIMIT. Measurements which can be made using the Data Functions have a cross-reference with the comment “See Number Measurement Syntax” in their syntax. If one or more of the Data Functions are not available to that measurement, the Data Function(s) not available will be listed in the syntax.
HP-IB Command Guidelines Guidelines for Operation The Data Functions are set to their default values whenever • the power is cycled on the Test Set • the front-panel PRESET key is selected • the *RST Common Command is received through HP-IB Changing Attribute Units The AUNits command can be used to change the Attribute Units setting for selected measurements. Only the Attribute Units for power and relative level measurements can be changed.
HP-IB Command Guidelines Guidelines for Operation If it is not possible to properly convert all the values to the new unit-of-measure, the Attribute Units are not changed and the following error is generated: HP-IB Error: HP-IB Units cause invalid conversion of attr. This error is most often encountered when one of the Data Function values listed above is set to zero.
HP-IB Command Guidelines Guidelines for Operation Example 3-29 Example !Reset the Test Set OUTPUT 714;"*RST" !Set HIgh LIMIT value to 15 OUTPUT 714;"MEAS:AFR:DIST:HLIM:VAL 15" !Set LOw LIMIT value to 1 OUTPUT 714;"MEAS:AFR:DIST:LLIM:VAL 1" !Set the Meter Lo End value to 1 OUTPUT 714;"MEAS:AFR:DIST:MET:LEND 1" !Set Attribute Units for Distortion measurement to DB OUTPUT 714;"MEAS:AFR:DIST:AUN DB" !Query the REFerence SET value OUTPUT 714;"MEAS:AFR:DIST:REF:VAL?" !Read the REFerence SET value into variable
HP-IB Command Guidelines Guidelines for Operation Reading-back Attribute Units Use the AUNits? command to read back the Attribute Units setting for the selected measurement.
HP-IB Command Guidelines Guidelines for Operation Guidelines for Attribute Units • When setting the value of measurement functions REFerence, METer, HLIMit and LLIMit through HP-IB, a non–Attribute Unit unit-of-measure must be specified in the command string, otherwise the current Attribute Unit is assumed by the Test Set.
HP-IB Command Guidelines Guidelines for Operation Using the STATe Command The STATe command corresponds to the front-panel ON/OFF key and is used to programmatically turn measurements, instrument functions, and data functions ON or OFF. Turning measurements, instrument functions and data functions ON/OFF Use 1 or ON to turn measurements, instrument functions, or data functions ON. Use 0 or OFF to turn measurements, instrument functions, or data functions OFF.
HP-IB Command Guidelines Guidelines for Operation Reading back the measurement, instrument function, or data function state Use the query form of the command, STATe?, to determine the current state of a measurement, instrument function or data function. If a measurement, instrument function, or data function is queried, the returned value will be either a “1” (ON) or a “0” (OFF).
HP-IB Command Guidelines Guidelines for Operation Sample HP-IB Program The following program was written on an HP 9000 Series 300 controller using Agilent Technologies Rocky Mountain BASIC (RMB). To run this program directly in the Test Set’s IBASIC controller make the following modifications: 1. Use exclamation marks (!) to comment-out lines 440, 450, and 460 (these commands not supported in IBASIC). 2. Change line 70 to Bus = 8 (internal HP-IB select code = 8).
HP-IB Command Guidelines Guidelines for Operation 300 ! 310 !Measure and plot oscilloscope trace to see the waveform shape.
HP-IB Command Guidelines Guidelines for Operation 86 Chapter 3 O:\Manuals\E6380A_Progguid\Book\Guidelin.
4 IEEE Common Commands This chapter describes IEEE 488.2 common commands.
IEEE Common Commands IEEE 488.2 Common Commands IEEE 488.2 Common Commands The IEEE 488.2 Standard defines a set of common commands which provide for uniform communication between devices on the HP-IB. These commands are common to all instruments which comply with the IEEE 488.2 Standard. These commands control some of the basic instrument functions, such as instrument identification, instrument reset, and instrument status reporting.
IEEE Common Commands Common Command Descriptions Common Command Descriptions *IDN? (Identification Query) The *IDN? query causes a device to send its identification information over the bus. The Test Set responds to the *IDN? command by placing its identification information, in ASCII format, into the Output Queue. The response data is obtained by reading the Output Queue into a string variable of length 72. The response data is organized into four fields separated by commas.
IEEE Common Commands Common Command Descriptions *OPT? (Option Identification Query) The *OPT? command tells the Test Set to identify any reportable device options install in the unit. The Test Set responds to the *OPT? command by placing information which describes any reportable installed options into the Output Queue. The data is in ASCII format. The response data is obtained by reading the Output Queue into a string variable of length 255. The response data is organized into fields separated by commas.
IEEE Common Commands Common Command Descriptions *RST (Reset) The *RST command resets the Test Set. When the *RST command is received the majority of fields in the Test Set are “restored” to a default value, some fields are “maintained” at their current state and some are “initialized” to a known state. Refer to “Instrument Initialization” on page 177 for further information. Other operational characteristics are also affected by the *RST command as follows: • All pending operations are aborted.
IEEE Common Commands Common Command Descriptions *TST? (Self-Test Query) The *TST? self-test query causes the Test Set to execute a series of internal self-tests and place a numeric response into the Output Queue indicating whether or not the Test Set completed the self-test without any detected errors. The response data is obtained by reading the Output Queue into a numeric variable, real or integer.
IEEE Common Commands Common Command Descriptions *OPC (Operation Complete) The *OPC command allows for synchronization between the Test Set and an external controller. The *OPC command causes the Test Set to set bit 0, Operation Complete, in the Standard Event Status Register to the TRUE, logic 1, state when the Test Set completes all pending operations.
IEEE Common Commands Common Command Descriptions Example BASIC program - Service Request Example 4-5 Example 10 OUTPUT 714;"*SRE 32" 20 !Enable SRQ on events in the Standard Event Status Register 30 OUTPUT 714;"*ESE 1" 40 !Enable Operation Complete bit in Standard Event Status Register 50 ON INTR 7,15 CALL Srvice_interupt!Set up interrupt 60 ENABLE INTR 7;2 !Enable SRQ interrupts 70 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC" 80 LOOP!Dummy loop to do nothing 90 DISP "I am
IEEE Common Commands Common Command Descriptions Example BASIC program - Polling the Standard Event Status Register Example 4-6 Example 10 INTEGER Stdevnt_reg_val 20 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC" 30 LOOP 40 OUTPUT 714;"*ESR?" ! Poll the register 50 ENTER 714;Stdevnt_reg_val 60 EXIT IF BIT(Stdevnt_reg_val,0) ! Exit if Operation Complete bit set 70 END LOOP 80 PRINT "All operations complete.
IEEE Common Commands Common Command Descriptions *OPC? (Operation Complete Query) The *OPC? query allows for synchronization between the Test Set and an external controller by reading the Output Queue or by polling the Message Available (MAV) bit in the Status Byte Register. The *OPC? query causes the Test Set to place an ASCII character, 1, into its Output Queue when the Test Set completes all pending operations.
IEEE Common Commands Common Command Descriptions Example 4-7 Example BASIC program 10 INTEGER Output_que_val 20 OUTPUT 714;"*SRE 0"! Disable Service Requests 30 OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;AMPL 0 dBm;FREQ 320 MHz;*OPC?" 40 ENTER 714;Output_que_val 50 !Program will wait here until all operations complete 60 PRINT "All operations complete." 70 END Using the *OPC? query using the MAV bit in the Status Byte Bit 4 in the Service Request Enable Register is set to a value of 1 (enabled).
IEEE Common Commands Common Command Descriptions *WAI (Wait To Complete) The *WAI command stops the Test Set from executing any further commands or queries until all commands or queries preceding the *WAI command have completed. Example BASIC statement Example 4-9 Example OUTPUT 714;"DISP RFG;RFG:OUTP ’Dupl’;*WAI;AMPL 0 dBm" NOTE The Test Set contains signal generation and signal measurement instrumentation.
IEEE Common Commands Common Command Descriptions *CLS (Clear Status) The *CLS command clears the contents (sets all bits to zero) of all Event Registers summarized in the Status Byte. The *CLS command also empties all queues (removes all current messages) which are summarized in the Status Byte, except the Output Queue. The Status Byte Register is cleared and any pending service request is cleared.
IEEE Common Commands Common Command Descriptions *SRE? (Service Request Enable Query) The Test Set responds to the *SRE? command. See “HP-IB Service Requests” on page 167 for a detailed explanation of the *SRE? command. *STB? (Status Byte Query) The Test Set responds to the *STB? command. See “Status Reporting” on page 121 for a detailed explanation of the *STB? command. *TRG (Trigger) The *TRG command is equivalent to the IEEE 488.
IEEE Common Commands Common Command Descriptions *SAV (Save Instrument State) The *SAV command saves the present state of the Test Set into a file in battery-backed internal memory or on a PC card. The *SAV command is followed by a decimal number in the range of 0 to 99 which indicates the name of the stored SAVE/RECALL file. The mass storage location for SAVE/RECALL files is selected using the SAVE/RECALL field on the I/O CONFIGURE screen.
IEEE Common Commands Common Command Descriptions 102 Chapter 4 O:\Manuals\E6380A_Progguid\Book\Ieee.
5 Triggering Measurements 103
Triggering Measurements This chapter gives you information about triggering your measurements. This includes the following topics: • “Arming Hardware-Triggered Measurements” on page 112 • “Default Trigger Mode” on page 108 • “Local/Remote Triggering Changes” on page 108 • “Measurement Pacing” on page 111 • “Trigger Commands” on page 109 • “Trigger Event” on page 105 • “Trigger Mode and Measurement Speed” on page 110 • “Trigger Modes” on page 106 104 Chapter 5 O:\Manuals\E6380A_Progguid\Book\Trigmeas.
Triggering Measurements Triggering Measurements Triggering Measurements The measurement cycle is started (triggered) by the occurrence of a trigger event. The reliability and accuracy of the measurement result, as well as the speed of the measurement cycle are influenced by the trigger mode in effect at the time the trigger event occurs. Some modes are faster than others; some modes provide settling for signals that may contain transients.
Triggering Measurements Triggering Measurements Trigger Modes The Trigger Mode is defined by two parameters: retriggering and settling. Retriggering Retriggering refers to what a measurement does once it has completed a measurement cycle. There are two options: 1. Single retriggering causes the measurement cycle to stop once a valid measurement result has been obtained. A valid trigger command must be received to start the measurement again.
Triggering Measurements Triggering Measurements Settling Settling refers to the amount of delay introduced to allow signal transients to propagate through the analysis chain and settle out. There are two options: 1. Full settling introduces the appropriate delay for all signal transients which might have occurred at the front panel at just the same time as the trigger event, to pass through the analysis chain and settle out. Delays are also inserted to allow for internal hardware transients to settle. 2.
Triggering Measurements Triggering Measurements Default Trigger Mode The Trigger mode is set to FULL SETTling and REPetitive RETRiggering whenever • the Test Set is powered on • the PRESET key is selected • the Test Set is put into LOCAL mode • the Test Set is reset using the *RST command • the Test Set is put in remote mode and no other trigger mode is set Local/Remote Triggering Changes Local To Remote Transitions The Test Set switches from Local to Remote mode upon receipt of the Remote message (REN bu
Triggering Measurements Triggering Measurements Trigger Commands :TRIGger:IMMediate The :TRIGger:IMMediate command tells the Test Set to “start a measurement cycle now.” The type of triggering used depends on the trigger mode settings. This command is equivalent to a Group Execute Trigger Command (GET) as defined by IEEE 488.1-1987 or a Trigger Common Command (*TRG) as defined by IEEE 488.2-1987. The IMMediate statement is implied and is optional.
Triggering Measurements Triggering Measurements Example 5-7 Settling Syntax :TRIGger:MODE:SETTling FAST :TRIGger:MODE:SETTling FULL Example 5-8 Settling Examples OUTPUT 714;"TRIG:MODE:SETT FAST" OUTPUT 714;"TRIG:MODE:SETT FULL" Trigger Mode and Measurement Speed There are two generalized scenarios which can be described for HP-IB triggering control.
Triggering Measurements Triggering Measurements Trigger Mode Settings for Most Reliable Measurements Use the following Test Set configuration and trigger mode settings to get the most accurate, most reliable, fully settled measurement results. See “Increasing Measurement Throughput” on page 114 for more information on improving measurement throughput. 1. Turn on all autoranging functions. (This is the Test Set’s default turn-on and preset state.) 2. Use SINGle RETRiggering. 3. Use FULL SETTling. 4.
Triggering Measurements Triggering Measurements Arming Hardware-Triggered Measurements Some measurements require an external signal to trigger the measurement. These measurements require that the measurement be “armed” in order for it to be triggered by the external signal. The :TRIGger:IMMediate command is used to arm these types of measurements within the Test Set. When the trigger mode is set to RETRigger SINGle, the measurement must be re-armed after each measurement cycle.
6 Advanced Operations 113
Advanced Operations Increasing Measurement Throughput Increasing Measurement Throughput Measurement throughput is defined as the number of measurements made per unit of time. When operating the Test Set in the Internal or External Automatic Control Mode, measurement throughput is influenced by measurement speed, measurement setup time, and execution speed of the control program. Each of these factors is, in turn, influenced by several parameters.
Advanced Operations Increasing Measurement Throughput 2. Autoranging The autoranging functions continuously calculate and adjust gain to provide the optimum instrument setup for each measurement. This results in greater measurement accuracy but increases measurement cycle time. The autoranging functions can be turned off to decrease the measurement cycle time. Time-to-first-reading after making new settings is usually much slower than the repetitive reading rate once the first reading has been returned.
Advanced Operations Increasing Measurement Throughput 3. Frequency Counter Gate Time The frequency counter’s gate time specifies how long the RF or AF frequency counter samples the signal before displaying the measured result. Short gate times measure instantaneous frequency and long gate times measure average frequency. The longer the gate time, the longer the measurement cycle. The proper gate time is determined by the measurement requirements.
Advanced Operations Increasing Measurement Throughput Optimizing the Execution Speed of the Control Program Execution speed of the control program is defined as the time required to execute a given number of program lines. Each time the HP-IB is accessed, a given amount of time is required to configure the devices on the bus for data transfer. Every time a BASIC or IBASIC OUTPUT or ENTER statement is executed this bus configuration time is incurred.
Advanced Operations Increasing Measurement Throughput Example 6-7 Example #3 OUTPUT 714;"ENC:AMPS:SAT:FM 2.35 KHZ;FREQ 5.970 KHZ" This OUTPUT statement sets the AMPS SAT tone’s frequency and deviation. The semicolon separator tells the Test Set’s HP-IB command parser to back up only one level of command hierarchy. The following OUTPUT statement illustrates improper use of the semicolon separator.
Advanced Operations Increasing Measurement Throughput Screen Display Time Each time the screen being displayed on the Test Set (active screen) is changed, it takes approximately 250 ms to access and draw the new screen. Additionally, each time a field on the active screen is changed it takes a finite amount of time to update the field. This update time is depends on the length and type of field.
Advanced Operations Increasing Measurement Throughput Example 6-13 Syntax :SPECiaL:DISPlay? Example 6-14 Example OUTPUT 714;"SPEC:DISP?" ENTER 714;Lock_unlock$ This queries the lock/unlock state of the Test Set’s display screen. NOTE Locking and unlocking the Test Set’s display screen is an External Automatic Control mode, HP-IB only function and cannot be done through the Test Set’s front panel. SPECial:DISPlay 'LOCKED'|'UNLOCKED' must not be invoked from the Test Set’s built-in IBASIC controller.
Advanced Operations Status Reporting Status Reporting This section describes the status reporting structure used in the Test Set. The structure is based on the IEEE 488.1-1987 and 488.2-1987 Standards and the Standard Commands for Programmable Instruments (SCPI) Version 1994.0. Status Reporting Structure Overview Figure 6-1 on page 122 shows an overview of the status reporting structure used in the Test Set.
Advanced Operations Status Reporting Figure 6-1 Status Reporting Structure Overview Status Register Group Status Register Group Status Register Group Status Register Group Summary Message Bits RQS 7 6 Status Byte Register 1 0 MSS Service Request Enable Register Enabled Summary Message MSS Service Request Generation Function Request Service Message RQS Service Request Interface Message SRQ ch4drw01.ds4 122 Chapter 6 O:\Manuals\E6380A_Progguid\Book\Advoper.
Advanced Operations Status Reporting Status Byte Register The Status Byte Register is an 8-bit register that is used to summarize the Summary Messages from all the register groups in the Test Set, and the Request Service (RQS) or Master Summary Status (MSS) messages. The contents of the Status Byte Register, referred to as the status byte, can be read by the Active Controller to determine the condition of each of the register groups.
Advanced Operations Status Reporting Table 6-1 details the Status Byte Register bit assignments and their associated meaning.
Advanced Operations Status Reporting Reading with a Serial Poll The contents of the Status Byte Register can be read by a serial poll from the Active Controller in response to some device on the bus sending the Service Request (SRQ) message. When read with a serial poll, bit 6 in the Status Byte Register represents the Request Service (RQS) condition. Bit 6 is TRUE, logic 1, if the Test Set is sending the Service Request (SRQ) message and FALSE, logic 0, if it is not.
Advanced Operations Status Reporting Example BASIC program to read Status Byte with *STB command Example 6-15 Example 10 INTEGER Stat_byte_reg,Stat_byte,Mstr_sum_msg 20 OUTPUT 714;"*STB?" 30 ENTER 714;Stat_byte_reg 40 Stat_byte=BINAND(Stat_byte_reg,191) !mask out the MSS bit 50 PRINT Stat_byte 60 Mstr_sum_msg=BINAND(Stat_byte_reg,64) !mask out the Stat Byte 70 PRINT Mstr_sum_msg 80 END Example 6-16 Example 32 0 Writing the Status Byte Register The Status Byte Register is a read-only register and is alt
Advanced Operations Status Reporting Status Register Structure Overview The structure of the register groups used in the Test Set is based upon the status data structures outlined in the IEEE 488 and SCPI 1994.0 Standards. There are two types of status data structures used in the Test Set: status registers and status queues. The general models, components, and operation of each type of status data structure are explained in the following sections.
Advanced Operations Status Reporting Status Register Model This section explains how the status registers are structured in the Test Set. The generalized status register model shown in Figure 6-3 is the basis upon which all the status registers in the Test Set are built. The model consists of a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message. A set of these registers is called a Status Register Group.
Advanced Operations Status Reporting Transition Filters are read-write. Transition Filters are unaffected by a *CLS (clear status) command or queries. The Transitions Filters are set to pass positive transitions (PTR) at power on and after receiving the *RST (reset) command (all 16 bits of the PTR register set to 1 and all 16 bits of the NTR register set to 0). Event Register The Event Register captures bit-state transitions in the Condition Register as defined by the Transition Filters.
Advanced Operations Status Reporting Status Reporting Structure Operation In general the status reporting structure described on the previous pages is used as follows: • Determine which conditions, as defined by their bit positions in the Condition Register, should cause the Summary Message to be set TRUE if they occur. For example, Condition Register Bit 3 = Overpower Protection Tripped • Determine the polarity of the bit-state transition which will indicate the condition has occurred.
Advanced Operations Status Reporting Figure 6-4 Status Data Structure - Queue Mode data data data data data data ch4drw04.
Advanced Operations Status Reporting Status Register Group Contents Figure 6-5 shows the Status Register Groups in the Test Set. The contents of each Status Register Group is explained in the following sections.
Advanced Operations Status Reporting Operation Status Register Group The Operation Status Register Group contains information about the state of the measurement systems in the Test Set. This status group is accessed using the STATus commands. The Operation Status Register Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message.
Advanced Operations Status Reporting Table 6-2 shows the Operation Status Register Group Condition Register bit assignments. Table 6-2 Operation Status Register Group Condition Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.0 14 16384 IBASIC Program Running 1 = an IBASIC program is running on the built-in IBASIC controller.
Advanced Operations Status Reporting Accessing the Operation Status Register Group’s Registers The following sections show the syntax and give programming examples, using the Agilent Technologies Instrument BASIC (IBASIC) programming language, for the STATus commands used to access the Operation Status Register Group’s registers.
Advanced Operations Status Reporting Example 6-24 Example OUTPUT 714;"STAT:OPER:EVEN?" ENTER 714;Register_value Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations Status Reporting Standard Event Status Register Group The Standard Event Status Register Group is a specific implementation of the status register model described in the Status Register Structure Overview section. The conditions monitored by the Standard Event Status Register Group are defined by the IEEE 488.2-1987 Standard. The Standard assigns specific Test Set conditions to specific bits in the Standard Event Status Register.
Advanced Operations Status Reporting Table 6-3 Standard Event Status Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32879 Always 0 Reserved by IEEE 488.2 14 16384 Always 0 Reserved by IEEE 488.2 13 8192 Always 0 Reserved by IEEE 488.2 12 4096 Always 0 Reserved by IEEE 488.2 11 2048 Always 0 Reserved by IEEE 488.2 10 1024 Always 0 Reserved by IEEE 488.2 9 512 Always 0 Reserved by IEEE 488.2 8 256 Always 0 Reserved by IEEE 488.
Advanced Operations Status Reporting Table 6-3 Standard Event Status Register Bit Assignments Bit Number Binary Weighting Condition Comment 3 8 Device Dependent Error 1 = A Test Set dependent error has occurred. This means that some Test Set operation did not execute properly due to some internal condition, such as overrange. This bit indicates that the error was not a command, query, or execution error.
Advanced Operations Status Reporting Reading the Event Register Example 6-29 Syntax *ESR? Example 6-30 Example OUTPUT 714;"*ESR?" ENTER 714;Register_value The *ESR? query allows the programmer to determine the current contents (bit pattern) of the Standard Event Status Register. The Test Set responds to the *ESR? query by placing the binary-weighted decimal value of the Standard Event Status Register bit pattern into the Output Queue.
Advanced Operations Status Reporting Example 6-34 Example OUTPUT 714;"*ESE?" ENTER 714;Register_value The *ESE? query allows the programmer to determine the current contents (bit pattern) of the Standard Event Status Enable Register. The Test Set responds to the *ESE? query by placing the binary-weighted decimal value of the Standard Event Status Enable Register bit pattern into the Output Queue. The decimal value of the bit pattern will be a positive integer in the range of 0 to 255.
Advanced Operations Status Reporting Example 6-38 Example OUTPUT 714;"*ESE 255" The *ESE command sets the bit pattern (bits 0 through 7) of the Standard Event Status Enable Register. The Standard Event Status Enable Register allows the programmer to indicate the occurrence of one or more events (as defined by bits 0 through 7 of the Standard Event Status Register) in bit 5 of the Status Byte Register.
Advanced Operations Status Reporting Output Queue Group The Output Queue Group is a specific implementation of the status queue model described in “Status Queue Model” on page 130. The Output Queue queue type is defined by the IEEE 488.2-1987 Standard to be a first in, first out (FIFO) queue. The Output Queue Group includes a FIFO queue and a Message Available (MAV) Summary Message. Refer to the “Status Reporting Structure Overview” on page 121 for an overview of status queue operation.
Advanced Operations Status Reporting Accessing the Output Queue When messages are sent to the Test Set, it decodes the message to determine what commands have been sent. Depending upon the type of command, the Test Set’s processor sends messages to various parts of the instrument. Many commands generate data which must be sent back to the controller. This data is buffered in the Output Queue until it is read by the controller.
Advanced Operations Status Reporting Error Message Queue Group The Error Message Queue Group is an implementation of the status queue model described in “Status Queue Model” on page 130. The Error Message Queue queue type is a first-in, first-out (FIFO) queue that holds up to 20 messages. The Error Message Queue Group includes a FIFO queue but no Message Available (MAV) Summary Message. Refer to the “Status Reporting Structure Overview” on page 121 for an overview of status queue operation.
Advanced Operations Status Reporting Accessing the Error Message Queue A message appears in the Error Message Queue any time bit 2, 3, 4, or 5 of the Standard Event Status register is asserted. Each message consists of a signed error number, followed by a comma separator, followed by an error description string in double quotes. The maximum length of the error description string is 255 characters.
Advanced Operations Status Reporting Questionable Data/Signal Register Group The Questionable Data/Signal Register Group contains information about the quality of the Test Set’s output and measurement data. This status group is accessed using the STATus commands. The Questionable Data/Signal Register Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message.
Advanced Operations Status Reporting Table 6-5 shows the Questionable Data/Signal Register Group’s Condition Register bit assignments. Table 6-5 Questionable Data/Signal Register Group, Condition Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.
Advanced Operations Status Reporting Accessing the Questionable Data/Signal Register Group’s Registers The following sections show the syntax and give programming examples (using the IBASIC programming language) for the STATus commands used to access the Questionable Data/Signal Register Group’s registers.
Advanced Operations Status Reporting Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations Status Reporting Calibration Status Register Group The Calibration Status Register Group contains information about the Test Set’s hardware. This status group is accessed using the STATus commands. The Calibration Status Register Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message. Refer to the “Status Reporting Structure Overview” on page 121 for a discussion of status register operation.
Advanced Operations Status Reporting Table 6-6 details the Calibration Status Register Group’s Condition Register bit assignments. Table 6-6 Calibration Status Register Group, Condition Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.
Advanced Operations Status Reporting Accessing the Calibration Status Register Group’s Registers The following sections show the syntax and give programming examples (using the IBASIC programming language) for the STATus commands used to access the Calibration Status Register Group’s registers.
Advanced Operations Status Reporting Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations Status Reporting Hardware Status Register #2 Group The Hardware Status Register #2 Group contains information about the Test Set’s hardware. This status group is accessed using the STATus commands. The Hardware Status Register #2 Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message. Refer to the “Status Reporting Structure Overview” on page 121 for a discussion of status register operation.
Advanced Operations Status Reporting Table 6-7 shows the Hardware Status Register Group #2’s Condition Register bit assignments. Table 6-7 Hardware Status Group Register #2, Condition Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.
Advanced Operations Status Reporting Accessing the Hardware Status Register #2 Group’s Registers The following sections show the syntax and give programming examples (using the IBASIC programming language) for the STATus commands used to access the Hardware Status Register #2 Group’s registers.
Advanced Operations Status Reporting Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations Status Reporting Hardware Status Register #1 Group The Hardware Status Register #1 Group contains information about the Test Set’s hardware. This status group is accessed using the STATus commands. The Hardware Status Register #1 Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message.
Advanced Operations Status Reporting Table 6-8 shows the Hardware Status Register Group #1’s Condition Register bit assignments. Table 6-8 Hardware Status Register Group #1, Condition Register Bit Assignments Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.
Advanced Operations Status Reporting Table 6-8 Hardware Status Register Group #1, Condition Register Bit Assignments Bit Number Binary Weighting Condition 3 8 Overpower Protection Tripped 2 4 Unused in Test Set 1 2 External Mike Keyed 0 1 External Battery Voltage Low Comment Accessing the Hardware Status Register #1 Group’s Registers The following sections show the syntax and give programming examples (using the IBASIC programming language) for the STATus commands used to access the Hardw
Advanced Operations Status Reporting Example 6-86 Example OUTPUT 714;"STAT:HARD1:PTR 256" Reading the Event Register Example 6-87 Syntax STATus:HARDware1:EVENt? Example 6-88 Example OUTPUT 714;"STAT:HARD1:EVEN?" ENTER 714;Register_value Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations Status Reporting Communicate Status Register Group The Communicate Status Register Group contains information about the Test Set’s hardware. This status group is accessed using the STATus commands. The Communicate Status Register Group uses 16-bit registers and includes a Condition Register, Transition Filters, an Event Register, an Enable Register, and a Summary Message. Refer to the “Status Reporting Structure Overview” on page 121 for a discussion of status register operation.
Advanced Operations Status Reporting Table 6-9 shows the Communicate Status Register Group’s Condition Register bit assignments. Table 6-9 Communicate Status Register Group, Condition Register Bit Assignment Bit Number Binary Weighting Condition Comment 15 32768 Not Used (Always 0) Defined by SCPI Version 1994.
Advanced Operations Status Reporting Accessing the Communicate Status Register Group’s Registers The following sections show the syntax and give programming examples (using the IBASIC programming language) for the STATus commands used to access the Communicate Status Register Group’s registers.
Advanced Operations Status Reporting Clearing the Event Register The EVENT register is cleared whenever it is queried or whenever the Common Command *CLS is sent to the Test Set.
Advanced Operations HP-IB Service Requests HP-IB Service Requests The Test Set is capable of generating a “service request” when it requires the Active Controller to take action. Service requests are generally made after the Test Set has completed a task (such as making a measurement) or when an error condition exists (such as an internal self-calibration has failed). The mechanism by which the Active Controller detects these requests is the SRQ interrupt.
Advanced Operations HP-IB Service Requests Setting Up and Enabling SRQ Interrupts Test Set status information is maintained in eight register groups. Information in each register group is summarized into a Summary Message.
Advanced Operations HP-IB Service Requests Service Request Enable Register Service request enabling allows the application programmer to select which Summary Messages in the Status Byte Register may cause a service request. The Service Request Enable Register, illustrated in Figure 6-15, is an 8-bit register that enables corresponding Summary Messages in the Status Byte Register.
Advanced Operations HP-IB Service Requests Reading the Service Request Enable Register The Service Request Enable Register is read with the *SRE? Common Command. The *SRE? query allows the programmer to determine the current contents (bit pattern) of the Service Request Enable Register. The Test Set responds to the *SRE? query by placing the binary-weighted decimal value of the Service Request Enable Register bit pattern into the Output Queue.
Advanced Operations HP-IB Service Requests Writing the Service Request Enable Register The Service Request Enable Register is written with the *SRE Common Command. The *SRE command sets the bit pattern (bits 0-5 and 7) of the Service Request Enable Register. The Service Request Enable Register allows the programmer to select which condition(s), as defined by bits 0-5 and 7 of the Status Byte Register, will generate a Service Request on the HP-IB bus.
Advanced Operations HP-IB Service Requests Procedure for Generating a Service Request The following steps outline a generalized procedure for properly setting up the Test Set to generate a Service Request (SRQ) message to the Active Controller. This procedure does not include instructions for setting up the Active Controller to respond to the Service Request message generated by the Test Set.
Advanced Operations HP-IB Service Requests Example BASIC Program to Set Up and Service an SRQ Interrupt The following Agilent Technologies Instrument BASIC (IBASIC) program was written for an HP 9000 Series 300 Controller and a Test Set. The program assumes that the Test Set is the only instrument on the bus. The program sets up an interrupt from the Standard Event Status Register Group, the Calibration Status Register Group, and the Hardware Status Register #1 Group.
Advanced Operations HP-IB Service Requests 470 480 490 500 ! OUTPUT Inst_address;"STAT:CAL:PTR";Calibration_reg OUTPUT Inst_address;"STAT:CAL:NTR 0" ! 510 520 530 540 550 560 570 580 590 600 610 ! Set up the Calibration Status Register Group Enable Register to ! generate the Summary Message.
Advanced Operations HP-IB Service Requests 1080 ! 1090 ENABLE INTR 7;2 1100 ! 1110 ! Start of the dummy loop: 1120 ! 1130 LOOP 1140 DISP "I am sitting in a dummy loop." 1150 END LOOP 1160 ! 1170 END 1180 ! 1190 Srvice_interupt:SUB Srvice_interupt 1200 ! 1210 OPTION BASE 1 1220 COM /Io_names/ INTEGER Inst_address,Std_event_reg,Calibration_reg 1230 COM / Io_names/ INTEGER Hardware1_reg,Srq_enab_reg,Status_byte,Event_reg 1240 ! 1250 !Turn off interrupts while processing the current interrupt.
Advanced Operations HP-IB Service Requests 1700 ! appropriate action. 1710 ! NOTE: Read the Event Register to clear it. If the Event Register is 1720 ! not cleared it will NOT latch another event from the Condition 1730 ! Register, thereby preventing the Test Set from generating another SRQ. 1740 ! 1750 OUTPUT Inst_address;"STAT:HARD1:EVEN?" 1760 ENTER Inst_address;Event_reg 1770 RETURN 1780 ! 1790 SUBEND 176 Chapter 6 O:\Manuals\E6380A_Progguid\Book\Advoper.
Advanced Operations Instrument Initialization Instrument Initialization This section discusses the various methods available to the programmer to initialize the Test Set to a known state. With over 22 instruments utilizing greater than 25 screens containing hundreds of fields which can be programmed through the HP-IB bus, a hard copy list of the default condition for every field in every instrument screen would be cumbersome.
Advanced Operations Instrument Initialization Methods of Initialization There are six methods of initializing the Test Set: 1. Power On Reset 2. Front panel PRESET key 3. *RST IEEE 488.2 Common Command 4. Device Clear (DCL) HP-IB Bus Command 5. Selected Device Clear (SDC) HP-IB Bus Command 6.
Advanced Operations Instrument Initialization Power-On Reset The Power-On Reset is accomplished by applying or cycling AC/DC power to the Test Set. For the INSTRUMENT CONFIGURE, PRINTER CONFIGURE, TESTS (Execution Conditions), TESTS (Printer Setup) and I/O CONFIGURE screens, Table 6-12 lists the fields which are restored/initialized when the Test Set AC/DC power is cycled. The restored state or initialized value is listed below the field name.
Advanced Operations Instrument Initialization The Power-On Reset condition in the Test Set was specifically designed to configure the instruments for manual testing of an FM radio. The Power-On Reset default display screen is the RX TEST screen. Other operational characteristics are also affected by the Power-On Reset as follows: • The Power-up self-test diagnostics are performed. • The Contents of the SAVE/RECALL registers are not affected. • All pending operations are aborted.
Advanced Operations Instrument Initialization Front-panel PRESET Key The Front-panel Reset is accomplished by pressing the PRESET key on the front panel of the Test Set. For the INSTRUMENT CONFIGURE, PRINTER CONFIGURE, TESTS (Execution Conditions), TESTS (Printer Setup) and I/O CONFIGURE screens, Table 6-12 on page 179 lists the fields which are restored/initialized when the front-panel Preset key is pressed. The restored state or initialized value is listed below the field name.
Advanced Operations Instrument Initialization *RST IEEE 488.2 Common Command The *RST Reset is accomplished by sending the *RST Common Command to the Test Set through the HP-IB. Table 6-13 lists the fields which are restored/initialized when the *RST command is received. The restored state or initialized value is listed with the field’s name. Fields which are not listed are maintained at their current value. All fields in the SOFTWARE MENU screen and the TESTS (External Devices) screen are maintained.
Advanced Operations Instrument Initialization The *RST Reset condition in the Test Set was specifically designed to configure the instruments for manual testing of an FM radio. The *RST Reset default display screen is the RX TEST screen. Other operational characteristics are also affected by the *RST reset as follows: • All pending operations are aborted. • Measurement triggering is set to TRIG:MODE:SETT FULL;RETR REP. • Any previously received Operation Complete command (*OPC) is cleared.
Advanced Operations Instrument Initialization Device Clear (DCL) HP-IB Bus Command The Device Clear (DCL) Reset is accomplished by sending the DCL message to the Test Set through the HP-IB bus. The DCL command clears the Input Buffer and Output Queue, clears any commands in process, puts the Test Set into the Operation Complete idle state, and prepares the Test Set to receive new commands.
Advanced Operations Instrument Initialization Selected Device Clear (SDC) HP-IB Bus Command The Selected Device Clear (SDC) Reset is accomplished by sending the SDC message to the Test Set through HP-IB. The Test Set responds to the Selected Device Clear (SDC) and the Device Clear (DCL) bus commands equally. Refer to the “Device Clear (DCL) HP-IB Bus Command” on page 184 for a description of the effects of the SDC Reset.
Advanced Operations Passing Control Passing Control Communications on the HP-IB bus are accomplished according to a precisely defined set of rules (IEEE 488.1 and 488.2 Standards). Communication (data transfer) is accomplished by designating one device to be a talker (source of data or commands) and designating one or more devices to be listeners (receivers of data or commands). The device on the bus responsible for designating talkers and listeners is the Controller.
Advanced Operations Passing Control Configuring the Test Set as the System Controller To configure the Test Set as a System Controller, select the I/O CONFIGURE screen, position the cursor to the Mode field using the Cursor Control knob, highlight the Mode field by pushing the Rotary Knob, select Control from the Choices menu. As a consequence of setting the Test Set to be the System Controller it will also become the Active Controller.
Advanced Operations Passing Control Passing Control to the Test Set Control is passed to the Test Set when it is addressed to TALK and then receives the Take Control Talker (TCT) command. The programming or controller command which implements the pass control protocol as outlined in the IEEE 488.1 and 488.2 Standards is language/controller specific. Refer to the appropriate language/controller documentation for specific implementations.
Advanced Operations Passing Control Passing Control Back to Another Controller The Test Set has two methods of passing control back to another controller: 1) automatically and 2) using the IBASIC PASS CONTROL command from an IBASIC program. The two methods are described in the following sections.
Advanced Operations Passing Control Requesting Control using IBASIC The Test Set has the capability to request control of the bus from the Active Controller from a running IBASIC program using the IBASIC command EXECUTE ("REQUEST_CONTROL"). When the EXECUTE ("REQUEST_CONTROL") command is executed from a running IBASIC program, the Request Control bit, bit 1, of the Test Set’s Standard Event Status Register is set to the TRUE, logic 1, condition.
Advanced Operations Passing Control Pass Control Examples The following examples illustrate how pass control could be implemented in two of the common Test Set operating configurations: 1. Test Set controlled by an external controller, and 2. Test Set running an IBASIC program with an external Controller connected to the HP-IB.
Advanced Operations Passing Control Example 6-110 Example PASS CONTROL 714 This command passes control to the Test Set. 7. Put the Test Set in local mode (press the LOCAL key on the front panel). 8. Press SHIFT, then TESTS on the front panel of the Test Set to print the screen. 9. After the Test Set finishes printing the screen it will automatically pass control back to the HP 9000 Workstation.
Advanced Operations Passing Control Example 6-111 Example 10 COM /Hpib_names/ INTEGER Internal_hpib,Inst_address,Cntrl_state 20 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs 30 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs 40 COM /Io_values/ REAL Meas_power,Prog_state$[80],Prog_name$[50] 50 COM /Reg_vals/ INTEGER Status_byte,Stdevnt_reg_val 60 ! 70 Internal_hpib=7 80 Ext_cntrl_addrs=14 90 Int_cntrl_addrs=21 100 Printer_addrs=1 110 Pwr_suply_addrs=26 120 Inst_address=(Internal_hpib*100)+Ext_cntr
Advanced Operations Passing Control 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 COM /Reg_vals/ INTEGER Status_byte,Stdevnt_reg_val ! OFF INTR Internal_hpib Status_byte=SPOLL(Inst_address) IF NOT BIT(Status_byte,5) THEN PRINT "SRQ for unknown reason.
Advanced Operations Passing Control 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 GOTO Try_again ELSE PRINT "ERROR =";ERRN STOP END IF ! END ! SUB Start_program ! COM COM COM COM /Hpib_names/ INTEGER Internal_hpib,External_hpib /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs /Io_values/ REAL Meas_power ! PRINT "SETTING POWER SUPPLY" OUTPUT External_hpib+Pwr_suply_addrs;"IMAX 8;ISET 5"
Advanced Operations Passing Control 196 Chapter 6 O:\Manuals\E6380A_Progguid\Book\Advoper.
7 Memory Cards/Mass Storage 197
Memory Cards/Mass Storage This chapter contains information about using the mass storage devices available in the Test Set for storing and retrieving program and data files. Access to the mass storage devices in the Test Set was designed primarily for the built-in IBASIC controller. The Test Set’s mass storage devices are not directly accessible by an external controller. The programming examples used in this chapter apply only to the Test Set’s built-in IBASIC controller.
Memory Cards/Mass Storage Default File System Default File System The Test Set’s default file system is DOS (the Microsoft Disk Operating System MS-DOS®).
Memory Cards/Mass Storage Mass Storage Device Overview Mass Storage Device Overview There are four types of mass storage devices in the Test Set (see Figure 7-1 on page 201): 1. Random-access memory (RAM) located on the Test Set’s internal memory board 2. Read-only memory (ROM) located on the Test Set’s internal memory board 3. Static random-access memory (SRAM) PC cards which are inserted into the Test Set’s front-panel card slot 4.
Memory Cards/Mass Storage Mass Storage Device Overview Figure 7-1 Mass Storage Devices Microprocessor Remove SRAM card from test set. INTERNAL DATA BUS RAM :Memory, 0, n n = 0, 1, 2, 3 ROM :Memory, 0, 4 Front Panel Card Slot ROM or SRAM :INTERNAL, 4 ch5drw01.drw Programs and data can be retrieved from any of these mass storage devices. Programs and data can only be stored to RAM or SRAM PC card mass storage devices. Typical uses • Temporary program and data storage.
Memory Cards/Mass Storage Mass Storage Device Overview Table 7-1 Mass Storage Type Non-volatile random access memory RAM Mass Storage Overview Physical Location Mass Storage Volume Specifier Media Type Test Set’s internal memory board ":MEMORY,0,unit number" N/A unit number = 0, 1, 2, or 3 default = 0 • Temporary Save/Recall register storage Comments • Easily overwritten or erased • Not recommended for permanent program or data storage • Unit 0 can be overwritten by the RAM_MANAGER utility (IB_UTIL
Memory Cards/Mass Storage Mass Storage Device Overview Table 7-2 ROM Mass Storage Overview Mass Storage Type Read-only memory Physical Location Test Set’s internal memory board Mass Storage Volume Specifier ":MEMORY,0,4" Media Type N/A Typical Uses • Permanent storage of factory supplied utility programs • Permanent storage of factory supplied diagnostic programs Comments • Non-erasable • Not available for user program or data storage • Not available for Save/Recall register storage Chapter 7 203
Memory Cards/Mass Storage Mass Storage Device Overview Table 7-3 PC Card Mass Storage Overview Mass Storage Type Static Random-Access Memory Card Physical Location Plugs into card slot on front panel of Test Set Mass Storage Volume Specifier ":INTERNAL,4" Media Type PC Card (such as PCMCIA) Typical Uses • Semi-permanent program and data storage • Semi-permanent Save/Recall register storage Comments • Low capacity • Contents retained by on-card lithium battery • Contents lost if on-card battery remove
Memory Cards/Mass Storage Mass Storage Device Overview Table 7-4 ROM Card Mass Storage Overview Mass Storage Type Read-only or OTP Memory Card Physical Location Plugs into card slot on front panel of Test Set Mass Storage Volume Specifier ":INTERNAL,4" Mass Storage Type PC Card (such as PCMCIA) Typical Uses • Permanent storage of factory supplied application programs • Permanent storage of factory supplied utility programs • Permanent storage of factory supplied diagnostic programs Comments • Non-eras
Memory Cards/Mass Storage Default Mass Storage Locations Default Mass Storage Locations Built-in IBASIC Controller Under the following conditions, the default mass storage location for the built-in IBASIC controller is the front-panel card slot (mass storage volume specifier ":INTERNAL,4"): • power-up • initializing RAM with the SERVICE screen’s RAM Initialize function • formatting an SRAM card using the I/O CONFIGURE screen’s PCMCIA, Format Card field The mass storage location for the built-in IBASIC cont
Memory Cards/Mass Storage Default Mass Storage Locations Tests Subsystem The default mass storage location for the Tests Subsystem is set using the Select Procedure Location: field on the SOFTWARE MENU screen.
Memory Cards/Mass Storage Mass Storage Access Mass Storage Access Program and data files stored on the Test Set’s various mass storage locations can be selectively accessed from the following screens: • The TESTS (IBASIC Controller) screen. Any type of file can be accessed from this screen, either through an IBASIC program or the IBASIC command line. • The SOFTWARE MENU screen using the Select Procedure Location: and Select Procedure Filename: fields.
Memory Cards/Mass Storage DOS File System Considerations DOS File System Considerations The DOS file system is used on IBM compatible personal computers. The DOS file system is hierarchical, which means it supports subdirectories. The DOS file system allows up to 8-character file names with an optional extension of up to 3 characters. The file name is separated from the extension (if it exists) with a period (.). DOS file names are case independent.
Memory Cards/Mass Storage DOS File System Considerations Potential File Name Conflicts Unexpected file operation can occur if proper consideration is not given to the different file system naming conventions and the Test Set file entry field width. • A full DOS file name is 12 characters (8 character file name + . + 3 character extension). A full DOS file name will not fit in the Test Set’s file entry field. • Any file with a .PGM extension is considered a Tests Subsystem code file.
Memory Cards/Mass Storage DOS File System Considerations Initializing Media The INITIALIZE command is used to initialize a media (PC card, and RAM).
Memory Cards/Mass Storage Using the ROM Using the ROM The Test Set comes with several Test Procedures stored on the internal ROM. These Test procedures provide instrument diagnostic utilities, periodic calibration utilities, memory management utilities, a variety of general purpose utilities, and several IBASIC demonstration programs. To see a brief description of what each procedure does perform the following steps: 1. Display the SOFTWARE MENU screen by selecting the front-panel TESTS key. 2.
Memory Cards/Mass Storage Using PC Cards Using PC Cards OTP (One-Time Programmable) cards provide removable read-only storage. File editing and erasure are not possible. These cards cannot be programmed by the Test Set; they require a special PC card programmer to save files. PC cards (SRAM) provide removable read/write memory for your files, similar to a flexible disk. Data can be stored, re-stored, read, or erased as needed. PC cards require a battery to maintain stored information.
Memory Cards/Mass Storage Using PC Cards Figure 7-2 Inserting a Memory Card card_in.eps Setting the Write-Protect Switch The SRAM PC card’s write-protect switch lets the user secure its contents from being overwritten or erased. The switch has two positions (see Figure 7-3 on page 215): • Read-write – The memory-card contents can be changed or erased, and new files may written on the card. • Read-only – The memory-card contents can be read by the Test Set, but cannot be changed or erased.
Memory Cards/Mass Storage Using PC Cards Figure 7-3 Inserting the Battery and Setting the Write-Protect Switch Battery Holder Lock Locked Unlocked Read Only Write Write Protect Switch Battery Holder Battery Battery Holder CAUTION: INSERT CARD INTO A POWERED-UP TEST SET BEFORE REMOVING BATTERY.
Memory Cards/Mass Storage Using PC Cards The Memory Card Battery SRAM PC cards use a lithium battery to power the card. Listed below are the batteries for the Test Set’s SRAM cards. SRAM cards typically retain data for over 1 year at 25 × C. To retain data, the battery should be replaced annually. SRAM Card Battery Part Numbers - CR2025 or Agilent 1420-0509 Replacing the Battery 1. Turn the Test Set on and insert the PC card.
Memory Cards/Mass Storage Using PC Cards Memory Card Mass Storage Volume Specifier The front-panel PC card slot’s mass storage volume specifier is ":INTERNAL,4" and is the default mass storage device for the Test Set.
Memory Cards/Mass Storage Backing Up Procedure and Library Files Backing Up Procedure and Library Files Making a backup copy of procedure and library files helps guard against file loss due to PC card (or battery) failure. Using the COPY_PL ROM Program The COPY_PL procedure on the internal ROM will make backup copies of Tests Subsystem’s Procedure and Library files onto a second SRAM PC card, and can also initialize an uninitialized PC card.
Memory Cards/Mass Storage Copying Files Using IBASIC Commands Copying Files Using IBASIC Commands Files can be copied from one mass storage device to another using the IBASIC COPY command.
Memory Cards/Mass Storage Copying Files Using IBASIC Commands Example 7-5 Example COPY ":MEMORY,0,0" TO ":MEMORY,0,1" NOTE Caution should be exercised when using the volume copy form of the COPY command. Using the volume copy form of the COPY command can produce unexpected results. All files on the floppy disk before the volume copy was executed will be lost and are not recoverable.
Memory Cards/Mass Storage Using RAM Using RAM RAM is a section of the Test Set’s internal RAM that has been set aside for use as a mass storage device. RAM acts much the same as an external disk drive; that is, program and data files can be stored, re-stored, erased, and retrieved from the RAM. The RAM is partitioned into four separate volumes: 0-3. Each volume is treated as a separate “disk.” The size of each volume can be specified in 256-byte increments.
Memory Cards/Mass Storage Using RAM Initializing RAM Each RAM volume must be initialized before it can be used. • Volume 0 can be initialized using the RAM_MANAGER in the IB_UTIL internal ROM program. • Volumes 1, 2, and 3 must be initialized from the TESTS (IBASIC Controller) screen. The optional “unit size” parameter in the following procedure specifies the memory area, in 256 byte blocks, set aside for each disk volume. Follow these steps to initialize volumes 1, 2, or 3: 1.
8 IBASIC Controller 223
IBASIC Controller Introduction Introduction The Test Set contains an instrument controller that can run programs to control the various instruments in the Test Set and instruments/devices connected to the Test Set’s external I/O ports (HP-IB, serial, and parallel). Refer to “Overview of the Test Set” on page 22 for a complete description of the Test Set’s hardware architecture.
IBASIC Controller The IBASIC Controller Screen The IBASIC Controller Screen The Test Set has a dedicated screen for interfacing with the built-in IBASIC controller. This is the TESTS (IBASIC Controller) screen as shown in Figure 8-1. This screen is accessed as follows: 1. Select the front panel Menu key. The SOFTWARE MENU screen will be displayed. 2. Using the rotary knob, position the cursor on the IBASIC field in the lower center of the screen. 3.
IBASIC Controller The IBASIC Controller Screen Example 8-1 Example OUTPUT 714;"DISP TIBasic" The TESTS (IBASIC Controller) screen is divided into several areas which are used by the IBASIC controller for different purposes. • The highlighted horizontal rectangle at the top is the IBASIC command line. As the name implies IBASIC commands can be executed from this line. Commands can be entered locally using the rotary knob or remotely using serial port 9.
IBASIC Controller Important Notes for Program Development Important Notes for Program Development The Test Set is designed to operate the same way under automatic control as it does under manual control. This has several implications when designing and writing programs for the Test Set: • To automate a particular task, determine how to do the task manually and then duplicate the steps in the program.
IBASIC Controller Program Development Program Development There are three recommended approaches for developing IBASIC programs. They are outlined in Figure 8-2 and discussed in more detail later in this chapter. Since the Test Set only has the rotary knob and numeric keypad for data/character entry, developing programs on the Test Set alone is not recommended. All three development methods employ an external computer or terminal.
IBASIC Controller Program Development Figure 8-2 Program Development Methods Method 1 Method 2 Develop on BASIC Language Computer external to Test Set Develop on Test Set using screen "EDIT" mode Connect HP-IB cable to Test Set and run program from external computer Run program in IBASIC environment Method 3 (Not Recommended) Develop in Word Processor on PC Download into Test Set over RS-232 using terminal emulator program Debug Debug Run Program Change Address in program and download into Test
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports Interfacing to the IBASIC Controller using Serial Ports This section describes how to interconnect the Test Set to an external PC or terminal using the Test Set’s serial I/O ports. Program development methods #2 and #3 use PC’s or terminals connected to the Test Set through the Test Set’s serial I/O ports. To determine which programming environment best fits your application, refer to “Choosing Your Development Method” on page 241.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports Figure 8-3 Table 8-1 Serial Port Pin Assignments 5 1 9 6 Serial Port Pin Assignment Pin Description 1 CD - Carrier Detect 2 RD - Receive Data 3 TD - Transmit Data 4 DTR - Data Terminal Ready 5 Ground 6 DSR - Data Set Ready 7 RTS - Request to Send 8 CTS - Clear to Send 9 RI - Ring Indicator Serial Port 9 Configuration Table 8-1 on page 231 and the following paragraphs describe how to configure Serial Port 9 f
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports 6. Another method which can be used to output characters to the external PC or terminal is to execute the IBASIC command, PRINTER IS 9. This causes IBASIC to direct all print output to Select Code 9. Select Code 9 is the Test Set’s Serial Port 9. Select Code 1 is the Test Set’s CRT.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports Receive and Transmit Pacing When receiving characters into the IBASIC Command Line field, the Test Set’s microprocessor responds to each entry and no buffering is required. Therefore, when using your PC or terminal to send characters to the IBASIC Command Line field, it is permissible to set Rcv Pace and Xmt Pace to None.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports PC Configuration To prepare for IBASIC program development, the external PC or terminal must be configured to operate with the Test Set. This configuration includes • Hardware • Terminal Emulator Software PC Serial Port Configuration Connect the Test Set’s Serial Port 9 to a serial I/O (input/output) port on the PC. On many PCs, a serial port is available as either a 25-pin DB-25 (female) connector or a 9-pin DB-9 (male) connector.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports Setting Up HyperTerminal on your PC (Windows Version 3.1) 1. Start the HyperTerminal program in Windows. 2. From the Terminal Menu select Settings then Emulation. 3. Select DEC VT-100 (ANSI) 4. From the Terminal Menu select Settings then Terminal Preferences 5.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports 9. Edit the Communications settings to match those of the Test Set. An example setting is shown below. • Baud Rate: 9600 • Data Bits: 8 • Stop Bits: 1 • Parity: None • Flow Control: Xon/Xoff • Connector: Com1 (be sure to match your current setup) • Parity Check: Off • Carrier Detect: Off Setting Up ProComm Revision 2.4.3 on your PC ProComm is a general purpose telecommunications software package for PC’s with MS-DOS.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports 3. To select a different communications port, enter the following numbers: • 20: COM1 • 21: COM2 • 22: COM3 • 23: COM4 4. Enter the number 24 to save changes, to make the new configuration your default, and to exit LINE SETTINGS. 5. Press Alt+S for the SETUP MENU. 6. Enter the number 1 for MODEM SETUP. 7. Enter the number 1 for the Modem init string. 8. Press Enter to set a null string. 9.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports Setting Up HP AdvanceLink (HP 68333F Version B.02.00) on your PC HP AdvanceLink is a software program which allows PCs to be used as an alphanumeric or graphics terminal. It can also automate terminal and file-transfer functions. The version described will work with PCs with the MS-DOS or PC-DOS operating systems. (AdvanceLink for Windows is also available, and configuration is very similar). Running AdvanceLink in MSDOS 1.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports 5. Press REMOTE CONFIG (to set up the Serial port you selected above in Remote To). • Baud Rate: 9600 • Parity/DataBits: None/8 • Enq Ack: NO • Asterisk: OFF • Chk Parity: NO • SR(CH): LO • Recv Pace: Xon/Xoff • CS(CB)Xmit: NO • XmitPace: Xon/Xoff 6. Press DONE to return to the Config screen. 7. Press TERMINAL CONFIG.
IBASIC Controller Interfacing to the IBASIC Controller using Serial Ports 8. Press DONE to return to the Config screen. 9. Press DONE to return to the Terminal screen. 10. Press MAIN to return to the Main screen. 11. Press EXIT ADVLINK to exit. Terminal Configuration Terminals typically have a DB-25 (male) connector. Set the terminal for DEC VT-100 ANSI emulation. Many ASCII terminals will also function properly.
IBASIC Controller Choosing Your Development Method Choosing Your Development Method There are three fundamental methods for developing IBASIC programs for the Test Set. See Figure 8-4.
IBASIC Controller Choosing Your Development Method Method 1 Using a BASIC language computer (either an HP technical computer or a PC running BASIC with HP-IB) is the best method for developing any size program. This is because the program can be debugged directly on the external computer before downloading the program into the Test Set. Using this approach the programmer can observe the Test Set’s display to see changes in state and easily verify the correct measurements.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer Method #1. Program Development on an External BASIC Language Computer Figure 8-5 Connecting IBASIC Language Computers to the Test Set HP-IB HP 200/300 Series Controller Connect to HP-IB connector on rear panel or Test Set HP-IB Personal Computer, BASIC language environment and HP-IB I/O card ch6drw5.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer Configuring the Test Set’s HP-IB Interface To use HP-IB (the IEEE 488 interface bus) as a means of communicating with the Test Set, connect a standard HP-IB cable (such as the Agilent Technologies 10833B) between the Test Set’s rear-panel HP-IB connector and the HP-IB connector on the external BASIC language computer. On the Test Set 1. Select the I/O CONFIGURE screen. 2. Set the Mode field to Talk&Lstn.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer HP BASIC for Windows PC Configuration for Windows NT Operating System To prepare for HP BASIC program development utilizing Windows NT, the external PC must be configured to operate with the Test Set. You will need: • an Agilent Technologies 82341B/C interface card (the Agilent Technologies 82335 card does not support Windows NT) How to install: 1. Install the 82341B/C into an open expansion slot.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer Program Development Procedure As discussed in “Overview of the Test Set” on page 22, the Test Set has two HP-IB buses, an internal HP-IB at select code 8 and an external HP-IB at select code 7. The Test Set’s built-in IBASIC controller uses the internal HP-IB to communicate with the Test Set’s various instruments and devices.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer Example 8-5 Example 20 ! Establishes IO path to select code 7 address 14 10 ASSIGN @Device TO 714 30 ! Commands Test Set to reset at address 714. 20 OUTPUT @Device;"*RST" To change the address, simply change line 10 to Example 8-6 Example 10 ASSIGN @Device TO 800. NOTE The dedicated HP-IB interface at select code 8 conforms to the IEEE 488.2 Standard in all respects but one.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer After the above commands complete the program code will be in the Test Set ready to run. If any bugs are detected when the program is run, the program can be uploaded back into the external BASIC language controller to correct the error. Alternately the full screen IBASIC EDIT function through RS-232 can be used to correct the error (refer to “Method #2.
IBASIC Controller Method #1. Program Development on an External BASIC Language Computer Example 8-7 Example 10 ! PROGRAM TO UPLOAD IBASIC CODE FROM TEST SET TO BASIC CONTROLLER THROUGH HP-IB. 20 !###################################################################### 30 ! 40 ! The file for uploaded code will be "C:\htb386\code". 50 ! If you want to use a different file or directory, modify the two lines 60 ! with the labels "File_name_1" and "File_name_2".
IBASIC Controller Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode If a BASIC language computer is not available, program development can be done directly on the Test Set using the IBASIC EDIT mode. A terminal or PC connected to the Test Set through RS-232 is used as the CRT and keyboard for the Test Set’s built-in IBASIC controller.
IBASIC Controller Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode To Access the IBASIC Command Line Field 1. Position the cursor on the screen’s upper left. This is the IBASIC Command Line field. 2. The IBASIC Command Line field does not have a title like other fields in the Test Set; it is the highlighted, horizontal 2-line “bar” just below the screen title, TESTS (IBASIC Controller). To Use the IBASIC Command Line Field with the Test Set’s Rotary Knob 1.
IBASIC Controller Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode Entering and Exiting the IBASIC EDIT Mode To enter the IBASIC EDIT Mode first position the cursor on the IBASIC Command Line field, type the word EDIT on the terminal or PC connected to the Test Set and then press the ENTER key on the terminal or PC. At this point the Test Set will fill the PC screen with 22 lines of IBASIC code from the program currently in the Test Set’s RAM memory.
IBASIC Controller Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode Setting Up Function Keys In HyperTerminal When in the TERMINAL mode, click on Settings, then Function Keys. ^[ is ESCAPE in HyperTerminal. See Table 8-3 on page 254 for the escape codes. NOTE HyperTerminal seems to work best when a mouse is used to access the function keys, not the keyboard. Also, scrolling a program works best when the HyperTerminal window display is maximized).
IBASIC Controller Method #2. Developing Programs on the Test Set Using the IBASIC EDIT Mode Setting Up Function Keys in ProComm ProComm does not have function keys. However, escape sequences can be assigned to number keys 0 through 9 by using the Keyboard Macro function. This function is accessed by keying Alt+M. There is no method of displaying key labels so they will have to be recorded elsewhere. See the ProComm manual for further information.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) The third method of IBASIC program development is to write the program using a word processor on a PC, save it as an ASCII file, and then download it into the Test Set through the serial port.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) Writing Lines of IBASIC Code on a Word Processor When writing IBASIC programs, follow these steps to ensure that the Test Set will accept the code when it is downloaded. 1. Always begin new lines at the far left margin. Never use a leading space or tab. 2. Number each consecutive line just like an IBASIC language program. 3. Typically begin with 10 and increment by ten for each consecutive line. 4.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) Transferring Programs from the Word Processor to the Test Set For short (less than 100 lines) programs, use an ASCII file transfer utility on the PC to send the program, one line at a time, down to the Test Set over RS-232 directly into the IBASIC Command Line field.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) As the transfer starts the IBASIC Command Line field will intensify and characters will scroll in left to right. As each line is finished the “*” annunciator will be displayed, for about 0.5 seconds, in the upper, right corner of the Test Set indicating that the IBASIC controller is running as the line is parsed.
IBASIC Controller Method #3.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) Sending ASCII Text Files Over RS-232 With HyperTerminal Set up the HyperTerminal emulator software on the PC as covered in “Setting Up HyperTerminal on your PC (Windows Version 3.1)” on page 235. Load and run the ASCII_DN download program in the Test Set’s IBASIC controller. When the prompt Ready to receive ASCII file data is displayed on the Test Set, make the following settings in HyperTerminal on the PC: 1.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) Sending ASCII Text Files over RS-232 with ProComm Communications Software Set up the ProComm terminal emulator software on the PC as covered in “Setting Up ProComm Revision 2.4.3 on your PC” on page 236. On the Test Set, enter and run the ASCII_DN download program in the IBASIC controller.
IBASIC Controller Method #3. Developing Programs Using Word Processor on a PC (Least Preferred) 17.Before running the transferred program, execute a SCRATCH command on the IBASIC Command Line line to remove the ASCII_DN download program from Test Set memory. 18.Next, execute a GET TEMP_CODE command on the IBASIC Command Line. This will load the ASCII text into the IBASIC program memory. 19.Finally, execute a RUN command on the IBASIC Command Line. This will run the program.
IBASIC Controller Uploading Programs from the Test Set to a PC Uploading Programs from the Test Set to a PC As an overview, the following steps must be performed: 1. The Test Set must output the program over Serial Port 9. 2. The PC must receive the data through its serial port and direct the data to a file on disk. This can be done by a terminal emulator program such as HyperTerminal or ProComm.
IBASIC Controller Serial I/O from IBASIC Programs Serial I/O from IBASIC Programs There are two serial ports available for I/O (input / output) to peripherals external to the Test Set. To bring data in to the Test Set through the serial port(s) use the IBASIC ENTER command. To send data out, use the OUTPUT command. Serial Ports 9 and 10 The Test Set uses a small DB-9 connector on the rear panel for connecting to the two serial ports.
IBASIC Controller Serial I/O from IBASIC Programs Example IBASIC Program Using Serial Port 10 The following program illustrates I/O to both serial ports. The program sends a prompt message to a terminal connected to Serial Port 9 and waits for a response from the user at the terminal. When the response is received from the terminal connected to Serial Port 9, a series of ASCII characters are sent out Serial Port 10. Example 8-9 Example 10 !....ASCII CHARACTER CYCLER........... 30 !....
IBASIC Controller Serial I/O from IBASIC Programs Serial Port 10 Information Serial Port 10 is sometimes called Serial Port B in Test Set documentation and programs. The default Serial Port 10 settings are the same as Serial Port 9. They are 1. Serial Baud rate: 9600 2. Parity: None 3. Data Length: 8 Bits 4. Stop Length: 1 Bit 5. Receive and Transmit Pacing: Xon/Xoff 6. Serial in: Not available for Port 10 7.
IBASIC Controller PROGram Subsystem PROGram Subsystem Introduction The PROGram Subsystem provides a set of commands which allow an external controller to generate and control an IBASIC program within the Test Set. The PROGram Subsystem in the Test Set is a limited implementation of the PROGram Subsystem defined in the Standard Commands for Programmable Instruments (SCPI) Standard.
IBASIC Controller PROGram Subsystem Test Set PROGram Subsystem The Test Set was designed to store only one IBASIC program in RAM memory at any given time. The PROGram Subsystem commands, as implemented in the Test Set, operate differently than described in the SCPI Standard. In addition, the SCPI PROGram Subsystem commands which were designed to support multiple programs are not supported in the Test Set. Supported SCPI Commands The Test Set supports the following subset of the :SELected SCPI commands.
IBASIC Controller PROGram Subsystem Unsupported SCPI Commands The Test Set does not support the following SCPI commands.
IBASIC Controller PROGram Subsystem PROGram Subsystem Commands See the “:PROGram Subsystem in the HP-IB Syntax Reference Guide, for PROGram Subsystem command syntax rules. Command Notation The following notation is used in the command descriptions: • Letter case (uppercase or lowercase) is used to differentiate between the short form (the uppercase characters) and long form (the whole keyword) of the command.
IBASIC Controller PROGram Subsystem Example 8-11 Syntax PROGram[:SELected] :DEFine The DEFine command is used to create and download an IBASIC program into the Test Set from an external controller. To download an IBASIC program, any currently resident IBASIC program must first be deleted using the :DELete:ALL command. Attempting to download a new IBASIC program while an IBASIC program is currently resident causes IBASIC Error: -282 Illegal program name.
IBASIC Controller PROGram Subsystem Example 8-13 Example BASIC program to download an IBASIC program to Test Set 10 OUTPUT 714;"PROG:DEL:ALL"!Delete current program 20 OUTPUT 714;"PROG:DEF #0"!Create program, send header 30 OUTPUT 714;"10 FOR J = 1 TO 10"!1st prog line 40 OUTPUT 714;"20 DISP J"!2nd prog line 50 OUTPUT 714;"30 BEEP"!3rd prog line 60 OUTPUT 714;"40 NEXT J"!4th prog line 70 OUTPUT 714;"50 END"END!Send END message at end of last line 80 END Example 8-14 Syntax (length of program known) PROG
IBASIC Controller PROGram Subsystem Example 8-16 Example BASIC program to download an IBASIC program to Test Set 10 OUTPUT 714;"PROG:DEL:ALL" !Delete current program 20 OUTPUT 714;"PROG:DEF #257" !Create program, send header 30 OUTPUT 714;"10 FOR J = 1 TO 10" !18 characters + CR + LF 40 OUTPUT 714;"20 DISP J" !9 characters + CR + LF 50 OUTPUT 714;"30 BEEP" !7 characters + CR + LF 60 OUTPUT 714;"40 NEXT J" !9 characters + CR + LF 70 OUTPUT 714;"50 END"!6 characters 80 END :DEFine? The :DEFine? query c
IBASIC Controller PROGram Subsystem Example 8-19 Example BASIC program to upload an IBASIC program from Test Set 10 DIM Prog_line$[200]!Holds longest program line in Test Set 20 DIM File_name$[10]!Holds the name of file to store IBASIC program 30 LINPUT "Enter name of file to store IBASIC program in:",File_name$ 40 OUTPUT 714;"PROG:DEF?" 50 ENTER 714 USING "X,D,#";Count_length !Get length of count field 60 !Get number of characters in program, includes CR/LF on each line 70 ENTER 714 USING VAL$
IBASIC Controller PROGram Subsystem Example 8-21 Example OUTPUT 714;"PROGram:SELected:DELete:ALL" or OUTPUT 714;"PROG:DEL:ALL" :EXECute The :EXECute command is used to execute, from an external controller, an IBASIC program command in the Test Set’s built-in IBASIC controller. is string data representing any legal IBASIC command. If the string data does not represent a legal IBASIC command, an IBASIC Error: -285 Program syntax error is generated.
IBASIC Controller PROGram Subsystem Example 8-23 Example OUTPUT 714;"PROGram:SELected:EXECute ’CLEAR SCREEN’" or OUTPUT 714;"PROG:EXEC ’CLEAR SCREEN’" :NUMber {,} The :NUMBer command is used to set, from an external controller, the value of numeric variables or arrays in an IBASIC program in the Test Set.
IBASIC Controller PROGram Subsystem Example 8-26 Example setting the value of a one dimensional array [Array(5)] with 6 elements OUTPUT 714;"PROGram:SELected:NUMBer Array,0,1,2,3,4,5" or OUTPUT 714;"PROG:NUMB Array,0,1,2,3,4,5" NOTE Individual array elements cannot be set with the :NUMBer command.
IBASIC Controller PROGram Subsystem For simple variables the value is returned as a series of ASCII characters representing a numeric value in scientific notation (+3.00000000000E+000). For arrays the values are returned as a comma separated list of ASCII characters representing a numeric value in scientific notation. For example: +3.00000000000E+000,+3.00000000000E+000,+3.00000000000E+000. .. Array values are sent by varying the rightmost dimension of the array the fastest.
IBASIC Controller PROGram Subsystem Example 8-30 Example querying the value of a one dimensional array [Array(5)] with 6 elements OUTPUT 714;"PROGram:SELected:NUMBer? Array" ENTER 714;Result_array(*) or OUTPUT 714;"PROG:NUMB? Array" ENTER 714;Result_array(*) In this example, the array named Result_array(*) in the ENTER statement must be dimensioned exactly the same as the array named Array in the IBASIC program. NOTE Individual array elements cannot be queried with the :NUMBer? command.
IBASIC Controller PROGram Subsystem :STATe RUN|PAUSe|STOP|CONTinue The STATe command is used to set, from an external controller, the execution state of the IBASIC program in the Test Set. Table 8-4 defines the effect of setting the execution state of the IBASIC program to a desired state from each of the possible current states.
IBASIC Controller PROGram Subsystem Example 8-34 Syntax PROGram[:SELected]:STATe? Example 8-35 Example OUTPUT 714;"PROGram:SELected:STATe?" ENTER 714;State$ or OUTPUT 714;"PROG:STAT?" ENTER 714;State$ :STRing {,} The :STRing command is used to set, from an external controller, the value of string variables or string arrays in an IBASIC program in the Test Set. is the name of an existing string variable or string array in the IBASIC program.
IBASIC Controller PROGram Subsystem Example 8-36 Syntax PROGram[:SELected]:STRing {,} Example 8-37 Example setting the value of a simple string variable OUTPUT 714;"PROGram:SELected:STRing Variable,’data’" or OUTPUT 714;"PROG:STR Variable,’data’" Example 8-38 Example of setting the value of a string array with 3 elements of 5 characters each, such as Array$(2)[5] OUTPUT 714;"PROGram:SELected:STRing Array,’12345’,’12345’,’12345’" or OUTPUT 714;"PROG:STR Array,’12345’,’12345’,’12345’"
IBASIC Controller PROGram Subsystem If an attempt is made to query the value of a string variable or array and no IBASIC program is in the Test Set an IBASIC Error: -283 Illegal variable name is generated. If an attempt is made to query the value of a string variable or array and the string variable specified in does not exist in the program an IBASIC Error: -283 Illegal variable name is generated.
IBASIC Controller PROGram Subsystem Example 8-42 Example of querying the value of a string array whose name is known but whose current size is unknown 05 OPTION BASE 1 10 DIM Temp$[5000] !This will hold 5000 characters 20 DIM Temp_array$(50)[200]!Temp array: 50 elements of 200 character 30 OUTPUT 714;"PROG:STR? Array" !Query the desired array 40 ENTER 714;Temp$ !Enter the values into a temporary string variable 50 N=0 !Initialize array pointer 60 EPEAT !Start loop to take values from string and put in
IBASIC Controller PROGram Subsystem Example 8-43 Syntax PROGram[:SELected]:WAIT Example 8-44 Example OUTPUT 714;"PROGram:SELected:WAIT" or OUTPUT 714;"PROG:WAIT" :WAIT? The :WAIT? query command stops the Test Set from executing any commands or queries received through HP-IB until after the IBASIC program exits the RUN state, that is - the program is either PAUSED or STOPPED. A 1 is returned in response to the :WAIT? query command when the IBASIC program is either stopped or paused.
IBASIC Controller PROGram Subsystem Example 8-47 Example BASIC program without using the :WAIT? query command 10 OUTPUT 714;"PROG:STAT RUN" 20 LOOP 30 OUTPUT 714;"PROG:STAT?" 40 ENTER 714;State$ 50 EXIT IF State$="STOP" OR State$="PAUS" 60 END LOOP 70 DISP "IBASIC program not running.
IBASIC Controller PROGram Subsystem Using the EXECute Command The PROGram:EXECute command can be used to list, edit and control IBASIC programs in the Test Set from an external controller. This eliminates having to use the cursor control knob and provides a more efficient way of making small changes to programs. The full range of IBASIC program commands can be executed from an external controller using the PROGram:EXECute command.
IBASIC Controller PROGram Subsystem Example 8-52 Example OUTPUT 714;"PROG:EXEC ’30 PRINT ""TEST""’" Editing an existing IBASIC program line Existing IBASIC program lines which are resident in the Test Set’s RAM memory can be edited, one line at a time, from an external controller using the PROGram:EXECute command as follows: Example 8-53 Example PROG:EXEC ’’ where represents an existing IBASIC progr
IBASIC Controller PROGram Subsystem Downloading An IBASIC Program Into the Test Set The following procedure uses the PROGram Subsystem commands to transfer an IBASIC program, which is resident in the memory of the external controller, from the external controller to the Test Set. This procedure assumes the Test Set’s HP-IB address is set to 14. The example also assumes the external controller is an HP 9000 Series 300 Controller. 1. Access the Test Set’s TESTS (IBASIC Controller) screen. 2.
IBASIC Controller PROGram Subsystem Uploading a Program From the Test Set The following BASIC program copies an IBASIC program from the Test Set’s IBASIC controller RAM to the external controller and then stores it to a file on the external controller’s currently assigned mass storage device. When the upload program is entered and run on the external controller, the operator is prompted for the name of the file to store the IBASIC program in.
IBASIC Controller PROGram Subsystem Saving an IBASIC Program To A PC card The following procedure can be used to save an IBASIC program from the IBASIC controller’s RAM memory to a PC card inserted into the front panel of the Test Set. 1. Press Local, Shift, Cancel on the Test Set to perform an IBASIC reset. 2.
IBASIC Controller The TESTS Subsystem The TESTS Subsystem The Test Set makes available to the user an automated user-interface which has been specifically designed for radio test. One of the primary problems associated with automated radio testing is the need to rapidly configure the software with the information needed to test a specific type of radio. Information such as, test frequencies/channels, test specifications, test parameters, test conditions and pass/fail limits.
IBASIC Controller The TESTS Subsystem TESTS Subsystem File Descriptions Three types of files are used in the TESTS Subsystem to store different types of information. Code Files The first aspect of an automated definition is the code itself. This is just a standard IBASIC code file that can reside either on the PC card, or in an internal RAM. The name of this file has a .PGM extension. This extension identifies the file as program code.
IBASIC Controller The TESTS Subsystem Figure 8-6 TESTS Subsystem File Relationship Procedure 1 Name.PRC IBASIC Test Code Name.PGM Test Library Name.LIB Code for all possible radio tests Set of all parameters, specifications, and tests Parameters, Specifications, and test for each radio Procedure 2 Name2.PRC Procedure N NameN.PRC ch6drw06.ds4 TESTS Subsystem Screens The TESTS Subsystem uses several screens to create, select, and copy files, and to run tests.
IBASIC Controller The TESTS Subsystem Figure 8-7 The SOFTWARE MENU Screen TESTS Subsystem User-Interface Screens The TESTS Subsystem allows the user to easily modify the test subroutines, parameters, specifications and configuration to correspond to the requirements of a specific radio. There are several user-interface screens provided to allow the user to make modifications. To access any of these screens, position the cursor on the desired field and push the rotary knob.
IBASIC Controller The TESTS Subsystem • The External Devices screen identifies all connected HP-IB equipped instruments and their HP-IB addresses. • The Save/Delete Procedure screen is used to save or delete Procedures. • The Printer Setup screen is used to select the printer used for IBASIC PRINT commands and to configure the format of the printer page. • The Execution Cond screen is used to configure the IBASIC program execution conditions.
9 Error Messages 297
Error Messages General Information About Error Messages General Information About Error Messages Information concerning error messages displayed by the Test Set may be found in one of the following manuals: • Agilent Technologies 8935 Series E6380A CDMA/PCS Cellular Base Station Test Set and E6381A TDMA Base Station Test Set Programmer’s Guide (this manual) • Test Set’s Assembly Level Repair Manual • Agilent Technologies Instrument BASIC User’s Handbook: • A Beginner’s Guide to SCPI The format of the displ
Error Messages General Information About Error Messages IBASIC Error Messages IBASIC Error Messages are associated with IBASIC operation. IBASIC error messages can have both positive and negative numbers. Refer to the Agilent Technologies Instrument BASIC User’s Handbook for information on positive numbered error messages.
Error Messages General Information About Error Messages Usually, negative numbers preceding the error messages text correspond to the error conditions outlined in the Standard Commands for Programmable Instruments (SCPI).
Error Messages General Information About Error Messages The Message Display During instrument operation, various messages may appear on the Test Set’s display. Prompt-type messages generally appear on the first line of the Test Set’s display. General operating and error messages usually appear on the second line of the display. Some messages are persistent; they remain displayed until the error condition no longer exists, or until another persistent message with greater priority occurs.
Error Messages General Information About Error Messages Text Only Error Messages Operation errors generally occur when you try to do something the Test Set was not designed to do. Most messages tell you what to do to correct the problem, (turn something off, reduce a field’s value, press a certain key,…and so forth). Some common messages are listed here: • All self tests passed. • The Test Set did not detect any hardware or firmware failures during its initial self-diagnostics.
Error Messages General Information About Error Messages • Cal file checksum incorrect - initializing file. This error usually occurs after changing the Test Set’s firmware ROM’s. It is not a problem in that instance, but should not re-appear during subsequent operation of the Test Set. • One or more self tests failed. Error code: XXXX An instrument failure was detected when the Test Set was turned on. (For example, having a stuck front-panel key during turn on.
Error Messages HP-IB Errors HP-IB Errors Most HP-IB errors occur when the control program attempts to query a measurement that is not currently available, or tries to access an instrument connected to the external HP-IB without configuring the Test Set as the System Controller. When diagnosing the cause of an error condition check for these conditions first. 304 Chapter 9 O:\Manuals\E6380A_Progguid\Book\Errormsg.
Error Messages Text Only HP-IB Errors Text Only HP-IB Errors Un-numbered (text only) HP-IB error messages are generally self-explanatory. For example, trying to retrieve a saved register that does not exist generates the following error message: HP-IB Error: Register does not exist. The following list contains a subset of the Test Set’s text only HP-IB error messages. These messages represent error conditions which may require explanation in addition to the error message text.
Error Messages Text Only HP-IB Errors In order to save the current Test Set state into a Save/Recall register more non-volatile RAM will have to be made available.
Error Messages Numbered HP-IB Error Descriptions Numbered HP-IB Error Descriptions The following HP-IB errors can be generated under any of the following conditions: • controlling the Test Set with an IBASIC program running on the built-in IBASIC controller • controlling HP-IB devices/instruments, connected to the Test Set’s external HP-IB bus, with an IBASIC program running on the built-in IBASIC controller • controlling the Test Set with a program running on an external controller • using the Test Set ma
Error Messages Numbered HP-IB Error Descriptions Example 9-12 Error -104 Data type error The parser recognized a data element different than one allowed. For example, numeric or string data was expected but block data was encountered. Example 9-13 Error -105 GET not allowed A Group Execute Trigger was received within a program message (see IEEE 488.2, 7.7). Example 9-14 Error -108 Parameter not allowed More parameters were received than expected for the header.
Error Messages Numbered HP-IB Error Descriptions Example 9-20 Error -114 Header suffix out of range Indicates that a nonheader character has been encountered in what the parser expects is a header element. Example 9-21 Error -120 Numeric data error This error, as well as errors -121 through -128, are generated when parsing a data element which appears to be numeric, including the nondecimal numeric types.
Error Messages Numbered HP-IB Error Descriptions Example 9-28 Error -134 Suffix too long The suffix contained more than 12 characters (see IEEE 488.2, 7.7.3.4). Example 9-29 Error -138 Suffix not allowed A suffix was encountered after a numeric element which does not allow suffixes. Example 9-30 Error -140 Character data error This error, as well as errors -141 through -148, are generated when parsing a character data element.
Error Messages Numbered HP-IB Error Descriptions Example 9-36 Error -152 Parity error Parity error Example 9-37 Error -158 String data not allowed A string data element was encountered but was not allowed by the device at this point in parsing. Example 9-38 Error -160 Block data error This error, as well as errors -161 through -168, are generated when parsing a block data element.
Error Messages Numbered HP-IB Error Descriptions Example 9-44 Error -180 Macro error This error, as well as errors -181 through -184, are generated when defining a macro or executing a macro. Example 9-45 Error -181 Invalid outside macro definition Indicates that a macro parameter placeholder was encountered outside of a macro definition.
Error Messages Numbered HP-IB Error Descriptions Example 9-52 Error -211 Trigger ignored Indicates that a GET, *TRG, or triggering signal was received and recognized by the device but was ignored because of device timing considerations. For example, the device was not ready to respond. Example 9-53 Error -212 Arm ignored Indicates that an arming signal was received and recognized by the device but was ignored.
Error Messages Numbered HP-IB Error Descriptions Example 9-59 Error -222 Data out of range Indicates that a legal program data element was parsed but could not be executed because the interpreted value was outside the legal range as defined by the device (see IEEE 488.2, 11.5.1.1.5).
Error Messages Numbered HP-IB Error Descriptions Example 9-67 Error -251 Missing mass storage Indicates that a legal program command or query could not be executed because of missing mass storage. For example, an option that was not installed. Example 9-68 Error -252 Missing media Indicates that a legal program command or query could not be executed because of a missing media. For example, no disk.
Error Messages Numbered HP-IB Error Descriptions Example 9-74 Error -258 Media protected Indicates that a legal program command or query could not be executed because the media was protected. For example, the write-protect switch on a memory card was set. Example 9-75 Error -260 Expression error Indicates that an expression program data element related error occurred.
Error Messages Numbered HP-IB Error Descriptions Example 9-81 Error -274 Macro parameter error Indicates that the macro definition improperly used a macro parameter placeholder (see IEEE 488.2, 10.7.3). Example 9-82 Error -275 Macro definition too long Indicates that a syntactically legal macro program data sequence could not be executed because the string of block contents were too long for the device to handle (see IEEE 488.2, 10.7.6.1).
Error Messages Numbered HP-IB Error Descriptions Example 9-88 Error -282 Illegal program name The name used to reference a program was invalid. For example, redefining an existing program, deleting a nonexistent program, or in general, referencing a nonexistent program. Example 9-89 Error -283 Illegal variable name An attempt was made to reference a nonexistent variable in a program.
Error Messages Numbered HP-IB Error Descriptions Example 9-97 Error -313 Calibration memory lost Indicates that nonvolatile calibration data used by the *CAL? command has been lost. Example 9-98 Error -314 Save/recall memory lost Indicates that the nonvolatile data saved by the *SAV command has been lost. Example 9-99 Error -315 Configuration memory lost Indicates that nonvolatile configuration data saved by the device has been lost.
Error Messages Numbered HP-IB Error Descriptions Example 9-104 Error -420 Query UNTERMINATED Indicates that a condition causing an UNTERMINATED Query error occurred (see IEEE 488.2, 6.3.2.2.). For example, the device was addressed to talk and an incomplete program message was received. This message usually appears when trying to access a measurement that is not active. For example, you cannot query the TX Frequency measurement when the TX Freq Error measurement is displayed.
Error Messages Numbered HP-IB Error Descriptions Example 9-109 Error -608 Initialization of Input Module Relay Count file failed. Indicates that the Test Set was not able to initialize the Input Module Relay Switch Count EEPROM file during installation of a new input module. This error is most probably generated as a result of a hardware error or failure. Refer to the Test Set’s for diagnostic information. Example 9-110 Error -1301 Handoff attempted while not in Connect state.
Error Messages Numbered HP-IB Error Descriptions Example 9-116 Error -1307 Timeout occurred while attempting to register Mobile. Indicates that the simulated Base Station’s internal timer expired before receiving a response from the mobile station during a registration attempt. The internal timer is set to 20 seconds when the Register state is entered. Example 9-117 Error -1308 Timeout occurred while attempting to page Mobile.
Error Messages Numbered HP-IB Error Descriptions Example 9-121 Error -1312 Data from RVC contains invalid bits in word [1,2,3]. Indicates that the decoded data received on the reverse voice channel contains invalid bits in word 1 and/or word 2 and/or word 3. The raw decoded data is displayed in hexadecimal format in the top right-hand portion of the CALL CONTROL screen. Raw decoded data is only displayed when the CALL CONTROL screen Display field is set to Data.
Error Messages Numbered HP-IB Error Descriptions Example 9-125 Error -1316 Incomplete data received on RECC for word [1,2,3]. Indicates that the decoded data received on the reverse control channel did not contain the proper number of bits in word 1 and/or word 2 and/or word 3. The raw decoded data is displayed in hexadecimal format in the top right-hand portion of the CALL CONTROL screen. Raw decoded data is only displayed when the CALL CONTROL screen Display field is set to Data.
Index Symbols *CLS, 99 *ESE, 99 *ESE?, 99 *ESR?, 99 *IDN?, 89 *OPC, 93 *OPC?, 96 *OPT?, 90 *PCB, 100, 188 *RCL, 100 *RST, 91, 182 *SAV, 101 *SRE, 99, 171 *SRE?, 100, 170 *STB, 100 *STB?, 125 *TRG, 100 *TST?, 92 *WAI, 98 .LIB Files, 209, 293 .PGM Files, 209, 293 .PRC Files, 209, 293 .SAV Files, 209 : (colon), 66 ; (semicolon), 67, 117 ;: (semicolon, colon), 67, 118 ? (question mark), 68 ’ ’ (single quotes), 66 A Active Controller, 37, 186, 187 Active Measurement, 35 AdvanceLink (HP 68333F Version B.02.
Index upload IBASIC code from Test Set, 249 upload IBASIC program from Test Set, 274 variables and arrays, 276 wait (*WAI), 98 Extended Addressing, 44 External Automatic Control Mode, 26 External Controller, 22, 26, 38 F File Names conflicts, 210 recommendations, 210 File Naming Conventions, 209 File Types, 211 Files backing up, 218 copying, 219 Flash ROM, 217 Front Panel Functions, non-programmable, 42 G Gate Time affect on measurement speed, 116 GET, 105 Group Execute Trigger (GET), 105 H Hangs, 34, 52 H
Index L .
Index triggering, immediate, 109 triggering, repetitive/single, 109 triggering, settling, 110 upload IBASIC code from Test Set, 249 upload IBASIC program from Test Set, 274 variables and arrays, 276 wait (*WAI), 98 Q Querying Measurement Results, 23, 52 Question Mark, 68 Questionable Data/Signal Register Group, 147 accessing registers contained in, 149 condition register bit assignments, 147 Quotation Marks, 66 R RAM initializing, 222 mass storage device, 200 using, 221 RAM_MANAGER, 221 *RCL, 100 Reading a
Index using semicolon command separator, 117 using semicolon to output multiple commands, 67 using upper/lower case letters, 65 System Controller, 37, 186, 187 T Terminal Configuration, 240 Terminal emulator, 234 TESTS Subsystem, 292 default mass storage locations, 207 file descriptions, 293 file relationships, 294 screens, 294 writing programs for, 292 Timeout MAV (message available), 58 ON TIMEOUT, 54 *TRG, 100 Trigger aborting, 109 commands, 109 Trigger Event, 105 Trigger Modes, 106, 109 affect on measu