background image

2714 & 2715 Programmer Manual

1–1

Introduction to Programming

The Tektronix 2714 or 2715 Spectrum Analyzer allows remote control of its
functions with one of two communication port options. Option 08 provides an
RS-232 data communications interface; Option 03 provides an IEEE Standard
488.1 General Purpose Interface Bus (GPIB) communications interface.

With a desktop computer and an appropriate control program, you can configure
front panel settings (except those intended for local use only, such as INTENSI-
TY) and acquire, transfer, process, and analyze data remotely.

The command set and message structure for the RS-232 and GPIB interfaces are
almost identical. However, a few interface-specific considerations, such as
communications parameters and protocols, are different. The setup for each
interface is described separately in this section.

NOTE

. If your instrument is equipped with the RS-232 interface then continue

with the next subsection, RS-232 Operation (Option 08). Otherwise, turn to the
GPIB Operation (Option 03) subsection and follow the instructions there.

RS-232 Operation (Option 08)

NOTE

. If your spectrum analyzer is equipped with a GPIB instrument bus, you

can skip this subsection.

The 2714 or 2715 Spectrum Analyzer follows EIA Standard RS-232 when
equipped with the RS-232 interface. This standard establishes electrical levels,
connector configuration, and signal protocols for communication between two
devices called the DCE (data circuit-terminating equipment) and the DTE (data
terminal equipment). The 2714 or 2715 implements the DTE end of the
interface.

Note that the RS-232 interface is NOT a bus. Only one device can be connected
to the instrument’s RS-232 interface. Unlike a GPIB interface, RS-232 does not
support device addresses or serial polling.

For example, if a computer is connected to the spectrum analyzer’s RS-232
interface, a printer or plotter could not be connected to the spectrum analyzer
without first disconnecting the computer. To plot screen data directly from the
spectrum analyzer, you would first have to disconnect the computer and then
connect your printer or plotter.

Summary of Contents for 2714

Page 1: ...Programmer Manual 2714 2715 Spectrum Analyzer 070 8533 05 This document supports Firmware Version 10 28 98 ...

Page 2: ...atents issued and pending Information in this publication supercedes that in all previously published material Specifications and price change privileges reserved Printed in the U S A Tektronix Inc P O Box 1000 Wilsonville OR 97070 1000 TEKTRONIX and TEK are registered trademarks of Tektronix Inc ...

Page 3: ...any other locations This warranty shall not apply to any defect failure or damage caused by improper use or improper or inadequate maintenance and care Tektronix shall not be obligated to furnish service under this warranty a to repair damage resulting from attempts by personnel other than Tektronix representatives to install repair or service the product b to repair damage resulting from improper...

Page 4: ......

Page 5: ...2 6 Message Buffering GPIB 2 7 Message Format 2 8 Functional Groups Functional Groups 3 1 The Command Query List 3 2 Command And Query Functional Groups 3 4 Command Query Command and Query Definitions 4 1 Typographical Conventions 4 1 List of Commands and Queries 4 3 Status Reporting Status Reporting 5 1 RS 232 Error Reporting 5 2 The Service Request 5 10 Status Byte 5 11 Event Codes 5 15 Programm...

Page 6: ...Communications A 1 Implementation of the RS 232 Interface A 2 Related Documentation A 7 Appendix B GPIB System Concepts B 1 Mechanical Elements B 1 Electrical Elements B 2 Functional Elements B 3 A Typical GPIB System B 3 Talkers Listeners and Controllers B 5 Interface Control Messages B 5 Device Dependent Messages B 6 GPIB Signal Line Definitions B 10 Interface Functions and Messages B 14 Index ...

Page 7: ... 6 Specifying a Numeric Value 6 42 Figure 6 7 A Remote Submenu 6 43 Figure 6 8 Possible Data Acquisition Scheme 6 54 Figure 6 9 Possible Data Print Plot Scheme 6 55 Figure A 1 RS 232 Representation of a Character A 1 Figure A 2 Rear Panel RS 232 Connector A 3 Figure A 3 9 pin Female to 9 pin Female Null Modem Cable A 4 Figure A 4 9 pin Female to 25 pin Female Null Modem Cable A 5 Figure A 5 9 pin ...

Page 8: ...igure 6 4 A Remote Menu 6 40 Figure 6 5 Prompting for a Numeric Entry 6 41 Figure 6 6 Specifying a Numeric Value 6 42 Figure 6 7 A Remote Submenu 6 43 Figure 6 8 Possible Data Acquisition Scheme 6 54 Figure 6 9 Possible Data Print Plot Scheme 6 55 Figure A 1 RS 232 Representation of a Character A 2 Figure A 2 Rear Panel RS 232 Connector A 2 Figure B 1 IEEE Std 488 1 GPIB Connector B 2 Figure B 2 T...

Page 9: ...3 13 Table 3 10 DSPL Menu Commands 3 14 Table 3 11 CATV APPL Menu Commands CATV Mode Active 3 18 Table 3 12 CATV APPL Menu Commands CATV Mode Inactive 3 23 Table 3 13 UTIL Menu Commands 3 24 Table 3 14 DEMOD Menu Commands 3 26 Table 3 15 Curve and Waveform Commands 3 27 Table 3 16 System Related Commands 3 27 Table 3 17 Miscellaneous Commands 3 28 Table 4 1 CATv Command Arguments 4 10 Table 4 2 CA...

Page 10: ... RS 232 Connections A 3 Table A 2 9 pin Female to 9 pin Female Null Modem Cable A 4 Table A 3 9 pin Female to 25 pin Female Null Modem Cable A 5 Table A 4 9 pin Female to 25 pin Male Extension Cable A 6 Table B 1 Major GPIB Interface Functions B 3 Table B 2 Interface Messages and Functions Remote Messages Received B 7 Table B 3 Interface Messages and Functions Remote Messages Sent B 8 Table B 4 AS...

Page 11: ...Introduction ...

Page 12: ......

Page 13: ...peration Option 08 Otherwise turn to the GPIB Operation Option 03 subsection and follow the instructions there RS 232 Operation Option 08 NOTE If your spectrum analyzer is equipped with a GPIB instrument bus you can skip this subsection The 2714 or 2715 Spectrum Analyzer follows EIA Standard RS 232 when equipped with the RS 232 interface This standard establishes electrical levels connector config...

Page 14: ...ce may be used Data bits are transferred serially one bit at a time over the RS 232 interface Data consists of instrument commands and queries control settings parameter values or display information If a computer is connected to the spectrum analyzer by the RS 232 interface the computer s serial interface called a COM port if the controller is an MS DOS computer must be correctly configured befor...

Page 15: ...sed but are beyond the scope of this manual The techniques and programs discussed in this manual are appropriate to the IBM PC family of computers and their function alike counterparts that support the MS DOS PC DOS or OS 2 environments The device driver is a program that handles input and output to the RS 232 interface on your computer The driver for your system depends on the operating system an...

Page 16: ...ftware is the program or programs that control and acquire data from the spectrum analyzer You can write your own programs using the information in this manual Off the shelf software is also available A printer or plotter not both simultaneously can be connected to the RS 232 interface to provide hard copy output A printer is the preferred instrument for character based data such as parameter valu...

Page 17: ... 232 interface For systems consisting of a controller and the spectrum analyzer simply connect one end of the interconnecting cable to each device Figure 1 1 shows two possible configurations See Appendix A RS 232 Concepts for the cable configuration appropriate for your system Both devices the computer and spectrum analyzer in an RS 232 system must be configured the same way Before setting up the...

Page 18: ...0 on the KEYPAD to toggle item 0 until the STATUS indicates ONLINE The spectrum analyzer is then ready to exchange information over the RS 232 interface Setting the Baud Rate Item 1 of the RS 232 PORT CONFIGURATION Menu BAUD RATE sets the baud rate of the spectrum analyzer Baud rate represents how fast data is transmitted across the interface To select a baud rate repeatedly press 1 on the KEYPAD ...

Page 19: ...control methods SOFT HARD or NONE An explanation of each selection follows SOFT When the spectrum analyzer sends data through the interface and SOFT flow control is enabled CTRL S ASCII 19 same as pressing CTRL and S simultaneously halts the data stream until CTRL Q ASCII 17 is received Any other character received in the interim is ignored This type of flow control can be used with a 3 wire setup...

Page 20: ...For most cases ECHO should be OFF However set ECHO to ON when using a dumb terminal to control the spectrum analyzer When ECHO is ON the spectrum analyzer echoes each character it receives back to the controller This can cause problems for the control program if it is not expecting the characters Additional time is required to process each returned character so it is possible to experience buffer ...

Page 21: ...ormal condition H A response for a successful query FREq H The string OK for a successful non query Refer to Status Reporting for additional information on error handling for instruments with the RS 232 interface If you are using special applications software or a custom RS 232 driver follow the detailed instructions for installing and configuring the device driver included with it However for PC ...

Page 22: ... test measurement or control program determines 2714 or 2715 operations by exchanging spectrum analyzer specific messages with the instrument The spectrum analyzer specific messages are also referred to as device dependent messages They are generally understood by and meaningful to only the instrument or class of instruments for which they are designed The organiza tion of the spectrum analyzer sp...

Page 23: ...ial fashion That is the eight bits of a data byte are placed on the eight data lines simultaneously As soon as they are transferred the next 8 bit data byte is placed on the lines and is transferred Data consists of instrument commands and queries control settings parameter values or display information The eight control lines are divided into three transfer control handshake lines and five interf...

Page 24: ... transferred 7 The controller indicates that the last data byte has been sent Depending on the option selected one of two methods is used 1 Signaling over the end or identify EOI interface management line simultaneously with the last data byte or 2 Appending the ASCII codes for carriage return CR and line feed LF to the end of the message and simultaneously signaling EOI 8 When the message is comp...

Page 25: ...s and their function alike counterparts which support the MS DOS PC DOS or OS 2 environments To function as a controller your computer must be equipped with a GPIB board Tektronix supplies three National Instruments GPIB boards for your conve nience H PC GPIB Package provides a PCII IIA board order S3FG210 H AT GPIB Package provides a 16 bit AT Bus interface board order S3FG220 H MC GPIB Package p...

Page 26: ...m analyzer Cables may be purchased from Tektronix by ordering one of these part numbers H P N 012 0991 01 1 meter H P N 012 0630 01 2 meter Application software is the program or programs that control and acquire data from the spectrum analyzer You can write your own programs with the information in this manual However you will need the applications interface software supplied by the GPIB board ma...

Page 27: ...ion describes each task in detail If your system consists of a controller and spectrum analyzer you can simply connect one end of the interconnecting cable to each instrument A star configu ration daisy chain configuration or combination of these Figure 1 4 should be used when more than two instruments are on the bus Up to 15 instruments can be connected To maintain electrical performance of the b...

Page 28: ... 1 of the GPIB PORT CONFIGURATION Menu GPIB ADDRESS sets the spectrum analyzer s GPIB device address You must assign a primary address to the spectrum analyzer the 2714 or 2715 does not support secondary addresses The address can have a value from 0 through 30 However addresses 0 and 30 are usually reserved for system controllers Setting the GPIB Device Address ...

Page 29: ...creen prompts to enter the desired address using the KEYPAD for data entry If the spectrum analyzer is the only instrument on the bus we suggest using 1 as the address The address you set is read immediately by the spectrum analyzer and is permanently retained in non volatile memory Item 2 of the GPIB PORT CONFIGURATION Menu POWER ON SRQ causes the spectrum analyzer to produce an SRQ at power up T...

Page 30: ...GURATION Menu TALK ONLY MODE selects the spectrum analyzer s TALK ONLY mode TALK ONLY mode must be selected to send the spectrum analyzer s output directly to a plotter without the use of a controller Complete these steps to send the spectrum analyzer s display directly to a plotter 1 Disconnect all instruments except the spectrum analyzer and the plotter from the bus 2 Place the plotter in the LI...

Page 31: ...nix controllers Table 1 1 National Instruments PCII Board Characteristics Primary GPIB address 0 Secondary GPIB address NONE Timeout setting T30s EOS byte 00H Terminate Read on EOS no Set EOI with EOS on Write no Type of compare on EOS 7 bit Set EOI with last byte of Write yes GPIB PC model PC2 Board is system controller yes Local lockout on all devices no Disable auto serial polling yes High spee...

Page 32: ... Set EOI with EOS on Write no Before your computer can transfer information over the GPIB it must know how to access the GPIB board and the spectrum analyzer The device driver tells it how If you are using a National Instruments PCII IIA board the device driver is a program named GPIB COM created and modified by another National Instru ments program named IBCONF EXE If you are using a board from a...

Page 33: ...s provide a useful complement to the four trace capability of the 2714 or 2715 Printer Configuration Configuration of the printer is independent of the GPIB Consult your printer and computer manuals for information on setting up the printer and corresponding computer communications port Plotter Configuration Plotter configuration procedures vary Consult your plotter manual for the configuration ap...

Page 34: ...talker or listener to send or receive messages depending on whether messages are being sent to or received from the system controller The GPIB system software provided with your GPIB card automatically addresses the spectrum analyzer as a talker or listener depending on the callable subroutine used The device dependent messages are then transferred between the controller and the spectrum analyzer ...

Page 35: ... or lowercase entries Alternatively you can use the IBIC program supplied with the National Instruments PCII IIA GPIB board It enables you to communicate with the spectrum analyzer but requires that you learn how to use a few simple subrou tines such as IBWRT and IBRD See your National Instruments documenta tion for details Follow these steps to use the Example Program 1 1 located on the following...

Page 36: ... from a menu may change the status 5 Press the VID FLTR key twice The REMOTE message should disappear from the spectrum analyzer screen 6 Press any key This message should appear ENTER MESSAGE TO SEND Enter the message you want to send which can be either a command or query For example enter this query requesting the spectrum analyzer to identify itself ID 7 REMOTE should reappear on the spectrum ...

Page 37: ... or 2715 SHOULD NOW BE HANDSHAKING PRINT NDAC SHOULD BE DISPLAYED PRINT PRINT PRESS ANY KEY TO CONTINUE DO WHILE INKEY LOOP WRT HDR ON CALL IBWRT BD WRT PRINT 2714 or 2715 SHOULD NOW BE IN REMOTE MODE PRINT PRINT PRESS ANY KEY TO CONTINUE DO WHILE INKEY LOOP SEND RCV CLS PRINT PRINT ENTER MESSAGE TO SEND PRINT INPUT WCALL IBWRT BD WRT QUES INSTR 1 WRT HOLD TIME TIMER DO WHILE TIMER HOLD TIME 1 LOO...

Page 38: ...Introduction to Programming 1 26 2714 2715 Programmer Manual ...

Page 39: ...Message Structure ...

Page 40: ......

Page 41: ... and the 2714 or 2715 in addition to instrument specific messages Generic GPIB messages exercise control over the bus and carry out routine system operations such as instrument addressing handshaking requesting service and terminating messages GPIB messages may be trans mitted over the handshake lines or interface management lines uni line messages or they may be transmitted over the data lines mu...

Page 42: ...raw If John thinks Mary will remember her own question withdraw how much he may simply reply 100 as in the first example However to relate his response to her question he may answer Withdraw 100 as in the second example The latter form is equivalent to receiving a response from the spectrum analyzer when HDR ON is selected see Command and Query Definitions Both messages close with a message termin...

Page 43: ...amming for instructions about configuring the message terminator for RS 232 instruments Messages exchanged over the GPIB interface Option 03 can be terminated in one of two ways H The EOI interface management line is brought low asserted simultaneously with the last byte of the message H ASCII codes for carriage return CR and line feed LF are appended to the end of message and the EOI interface ma...

Page 44: ...e that indicates whether the on screen frequency is Center Frequency or Start Frequency A response is information returned as the result of a query It consists of an optional response mnemonic or header header delimiter argument s and argument delimiter For example CFSF CENTER CFSF START are the possible responses to the CFSF query A header is a short name associated with each command query or res...

Page 45: ... of the units or use a query that responds with the units currently in use for instance the RLUnit query An argument is the value that a command query or response transfers to or from its associated 2714 or 2715 setting s For instance from the command FREq 200 MHZ the value of 200 MHz is transferred to the center frequency setting Arguments may be numbers with or without units characters strings o...

Page 46: ... and a checksum byte Following the sequence is an additional checksum byte that provides an error check of the binary block transfer Refer to the CURve command in Command and Query Definitions for examples A comma must be used to delimit or separate multiple arguments in a message unit It should not be used as the last character in a message Message Buffering RS 232 The 2714 or 2715 Spectrum Analy...

Page 47: ...ves Message processing begins as soon as messages are received by the 2714 or 2715 it does not wait for the message terminator The 2714 or 2715 remains busy until it is done executing the commands in its input buffer unless the process is stopped by the DCL Device Clear or SDC Selected Device Clear GPIB messages If an error is detected while transferring a command or query the remainder of the mes...

Page 48: ...age Unit 2 Message Unit N Message Terminator Message Delimiters optional after last message unit Items enclosed in square brackets denote optional terms such as command headers and arguments Each message unit consists of an individual command query or response with all necessary arguments and delimiters Simple messages may consist of individual commands or queries as in these examples FREq 200MHZ ...

Page 49: ...and 100 floating point numbers 1 0 and 035 or in scientific notation 5 5E 6 H When no units are indicated the appropriate units are inferred from the command header For instance TIMe implies seconds and FREq or RESbw imply Hz Thus 5 5E 6 in the FREq command implies 5 5 106 Hz or 5 5 MHz H A space between an argument and its units is optional For example TIMe 5 US and TIMe 5US are both valid comman...

Page 50: ... arg 1 Question Mark required Header Delimiter space Most queries recognized by the 2714 or 2715 have no arguments but a few have one argument There are no queries with multiple arguments Following are several examples of queries to which the 2714 or 2715 will respond FREq REFlvl VRTdsp RESbw VIEw A TIMe These examples illustrate several characteristics of query formatting H A question mark must f...

Page 51: ...ders cannot be selectively suppressed unless HDR OFF is set before the response and then HDR is set to ON after the response Responses always terminate with a semicolon unless MSGdlm is set to LF which causes responses to terminate in a line feed Following are examples of three queries and their resulting responses The first line after each query is the response with the headers on HDR is ON The s...

Page 52: ...anual the long form for headers will be used The required letters will be capital letters and the optional characters will be lowercase letters These examples show how headers will appear in this manual FREq VRTdsp MAMpl You can also use variations of the short and long header forms VRT VRTd VRTds and VRTdsp are all acceptable header forms for the vertical display command or query The space charac...

Page 53: ...riage return ASCII 13 H By LF only line feed ASCII 10 H By CR LF carriage return followed by line feed The line feed character can be used instead of a semicolon to delimit message units in a single message The 2714 or 2715 will substitute line feeds for semicolons in its responses when MSGdlm is set to LF Line feed can also be used as a message terminator with controllers that do not support the ...

Page 54: ...Instrument Specific Message Structure 2 14 2714 2715 Programmer Manual ...

Page 55: ...Functional Groups ...

Page 56: ......

Page 57: ...her useful information The capital letters in a header indicate the minimum number of letters that must be supplied for the 2714 or 2715 to recognize the header For instance the query ACQ would produce the same response as the query ACQmode The lowercase letters are optional additional letters that may be used to clarify the meaning of the header The spectrum analyzer accepts either upper or lower...

Page 58: ... AVG AVMode AVMode AVNum AVNum BTFreq BTFreq BWMode BWMode BWNum BWNum BWResult CALsig CALsig CATv CATv CENsig CFSF CFSF CLOck CLOck CLRKey CLRMenu CMEas CNBw CNBw CNMode CNMode CNResult CNTtrak CNTtrak CONTinue COUnt CREs CSFreq CSFreq CSDefault CSInt CSInt CSNorm CSNorm CSRFreq CSRFreq CTFreq CTFreq CTDefault CRES CURve CURve DATe DATe DATime DEFMenu DETector DETector DIR DIScor DIScor DLIne DLI...

Page 59: ...tt RLUnit RLUnit ROFset ROFset ROMode ROMode RQS RQS RS232 RS232 RST RTIme RTIme SAVe SAVe SET SGErr SGErr SGSrch SGTrak SGTrak SIGswp SIGswp SPAn SPAn SSBegin SSBegin SSEnd SSEnd SSResult STByte STEp STEp STOre STPinc STPinc STStop SURv SURv TAMpl TEXt TEXt TFReq THRhld THRhld TIMe TIMe TIMMode TIMMode TITLe TITLe TMOde TMOde TOPsig TRIgger TRIgger TTLMode TTLMode TUNe TVLine TVLine TVLMode TVLMo...

Page 60: ... Related commands are placed beside the feature that they control The functional groupings and menus appear in the following order H FREQ MKRS function block H MKR FREQ Menu H FREQUENCY SPAN DIV and REF LEVEL function block H VERT SCALE function block and PLOT and READOUT controls H INPUT Menu H SWP TRIG Menu H SWEEP and RES BW function blocks H DISPLAY STORAGE function block H DISPL Menu H CATV A...

Page 61: ...h markers on and off MARker What is the current marker status MFReq Set the marker frequency MFReq What is the frequency of either or both markers MLFtnxt Move the marker to the next signal peak left MMax Move the marker to the highest data point on screen MRGTnxt Move the marker to the next signal peak right MSTep Equivalent to turning the knob one click to the left PSTep Equivalent to turning th...

Page 62: ...FSF CREs CNTrak FOFfset FOMode MAMpl MKTime TAMpl and TFReq return on screen measurement parame ters MPOs and MVPos have no visible effect when the 2714 or 2715 has an analog display all Display Storage registers disabled Table 3 3 MKR FREQ Menu Commands Header Function ATHrhld Turn the auto threshold on and off ATHrhld Is the auto threshold on or off CENsig Set frequency to the marker frequency C...

Page 63: ...r both markers MTUNE Change marker frequency by a specified amount MPOs What is the horizontal position of either or both markers MVPos What is the vertical position of either or both markers STEp Set the frequency increment step size STEp What is the frequency increment step size STPinc Set the type of frequency increment STPinc What type of frequency increment is being used STStop Set start stop...

Page 64: ...ence level steps FINe Is the reference level step 1 dB or 10 dB FREQ Set the center or start frequency FREQ What is the current center or start frequency MXSpn Turn MAX SPAN mode on and off MXSpn Is MAX SPAN on or off REFlvl Set increment decrement reference level REFlvl What is the reference level SPAn Select the frequency span per division SPAn What is the frequency span ZERosp Turn ZERO SPAN on...

Page 65: ...e on screen readouts on or off REDout Are on screen readouts on or off VRTdsp Select the vertical scale factor VRTdsp What is the vertical scale factor PREamp RLUnit MXRlvl ARFatt RFAtt ROFset ROMode CALsig INPUT MENU 1 PREAMP OFF 3 REF LEVEL UNIT DBUVM 4 1ST MXR INPUT LVL 30DBM 5 RF ATTENUATION AUTO 50DB 6 EXTERNAL ATTEN AMPL NONE 9 CAL SIG 100MHZ 30DBM OFF VERT SCALE Function Block PLOT and READ...

Page 66: ...n to a specific value RFAtt What is the RF attenuation RLUnit Select reference level unit RLUnit What is the reference level unit ROFset Set the reference level offset and turn it on and off ROFset What is the reference level offset ROMode Turn reference level offset mode on and off ROMode Is reference level offset mode on or off VMAnttbl Select an antenna table VMAnttbl What antenna table is sele...

Page 67: ...br Table 3 7 SWP TRIG Menu Commands Header Function Set the sweep rate What is the sweep rate Select auto manual or programmed sweep What is the sweep mode Select the trigger mode What is the trigger mode Select the number of the video raster line to trigger on when TV line triggering is selected What is the number of the TV line to trigger on Select continuous or programmed TV line trigger Is con...

Page 68: ...Front Panel Commands Header Function AREs Turn AUTO resolution bandwidth on and off AREs Is AUTO resolution bandwidth on or off RESbw Select increment decrement the resolution bandwidth RESbw What resolution bandwidth is selected SIGswp Select and arm the single sweep mode SIGswp What is the status of the single sweep mode TIMe Select increment decrement the sweep speed TIMe What is the sweep spee...

Page 69: ...XHld Turn max hold function on and off MXHld Is the max hold function on or off SAVe Turn display storage on or off in any or all registers SAVe Is storage on or off in any or all registers VIEw Turn display on and off in any or all registers Also turns waterfall and B C minus A modes on and off VIEw What is the display status of any or all registers DISPLAY STORAGE Function Block ...

Page 70: ...PLAY SOURCE AM INTERNAL 8 DISPLAY LINE 1 ON OFF OFF 2 VALUE ENTRY 68 8DBMV 3 DISPLAY LINE TO MARKER 4 LIMIT DETECTOR OFF 9 MIN HOLD IN WFM C OFF NOTE The TEXt command and TEXt query located in the following list do not relate directly to a DSPL Menu feature Table 3 10 DSPL Menu Commands Header Function ACQmode Select peak or max min acquisition mode ACQmode What is the acquisition mode AVDest Sele...

Page 71: ... the detection mode GRAt Turn the graticule light on and off GRAt Is the graticule light on or off MNHld Turn min hold function on and off MNHld Is the min hold function on or off MHDest Select the min hold destination waveform MHDest What is the min hold destination waveform POFset Offset B C A mode to center or top of screen POFset Is B C A offset to top or center of screen TEXt Display the indi...

Page 72: ... CATv STOre ADEv CATv ADInt CATv CN AUTo CATv CN INServ 2715 Only CATv CN PAUse CATv STOre CN CATv NBW CATv HUM CATv STOre HUM CATv LINe CATv FRSp REF CATv FRSp NOREF CATv REFRecall CATv CHTbl CATv CHDel CATv MODE OFF CATv SKIp CATv ACHan CATv SITe CATv OPErator CATv REMove CATV MEASUREMENTS PG 1 CH 23 0 RECENTER CHANNEL 23 1 CARRIER LEVELS 1 CARRIER LEVEL AVG POWER 2 CARRIER SURVEY 3 MODULATION D...

Page 73: ...ATv VPIc On or OFF CATv LSTn ON or OFF CTFreq CTDefault CATv CTB AUTo CATv CTB PAUse CATv CTB SINgle CATv STOre CTB CSFreq CSDefault CATv CSO AUTo CATv CSO INServ 2715 Only CATv CSO PAUse CATv CSO SINgle CATv CSO CONt CSRFreq CSInt CSNormal CATv STOre CSO CATv XMOd CATv STOre XMOd CATv XMMode TDomain or FDomain 2715 Only ICFreq ICDefault CATv ICLine int 2715 Only CATv ICR PAUse or CATv ICR CATv IC...

Page 74: ...nd run the test CATv AURal What are the results of the last aural carrier deviation measurement CATv CHAn Set the channel number CATv CHAn What is the current channel number CATv CHDel Delete the specified channel table CATv CHTbl Set the channel table to the one specified CATv CHTbl What is the current channel table CATv CLEvel Specify the carrier levels measurement mode and run the test CATv CLV...

Page 75: ...ustment mode CATv DPView Return the present status FIEld or LINe of the view modulation mode CATv FRSp Perform the frequency response measurement CATv FRSp What are the results of the last frequency response measurement CATv FULLADEv CATv FULLCLVl CATv FULLCN CATv FULLCSO CATV FULLCTB CATv FULLDEPth CATv FULLFRSp CATv FULLHUM CATv FULLICR CATv FULLSURv CATv FULLXMOD What is the complete response i...

Page 76: ... status of all channels mode CATv SRVey Specify the carrier survey measurement mode and run the test CATv STOre Store the results of the last measurement specified CATv SURv Perform the carrier survey measurement in the current mode CATv SURv What are the results of the last carrier survey measurement CATv VFIeld Turn view modulation field mode on or off CATv VFIeld What is the on off status of vi...

Page 77: ...he auto test table CTDefault Default value FCOr What are the frequency correction values FCMode ON returns flatness correction values OFF returns 0 0 FCMode What is the status of FCMode on or off ICFreq Define entries in the AUTO TEST LOCATIONS table used by the In Channel Response test ICFreq Return the auto test table ICDefault Recall the default values for the AUTO TEST LOCATIONS table used by ...

Page 78: ...FREQ 108 000MHZ 2 START TEST 3 DISPLAY RESULTS SIGNALS 4 OCCUPIED BW 99 7 FM DEVIATION MODE 9 SETUP TABLE 0 DB DOWN FOR BW MODE 3DBC 1 NORM BW FOR C N 5 0MHZBW 2 NOISE NORM D BW 1 0HZBW OBWpcnt CATv ON 8 CATV MEASUREMENT MODE 3 PERCENT OCCUPIED BW 99 SSBegin SSEnd SGSrch SSResult BWNum CNBw NNBw NOTE BWResult CNResult and NNResult return results normally displayed on the screen CATV APPL Menu CATV...

Page 79: ...NBw Set the noise bandwidth for normalized noise mode NNBw What is the noise bandwidth in normalized noise mode NNMode Turn normalized noise mode on and off NNMode Is normalized noise mode on or off NNResult What is the normalized noise in the specified bandwidth OBWMode Set occupied bandwidth mode to on off or idle OBWMode Is the occupied bandwidth mode on off or idle OBWpcnt Set percent 1 to 99 ...

Page 80: ...UR 4 SET MINUTE 5 SET SECONDS TO 00 6 DISPLAY DATE TIME ON 5 STORED SETTINGS PROTECT OFF 6 FILE SYSTEM DIRECTORY 9 INSTALLED OPTIONS DISPLAY 5 INSTR DIAGNOSTICS ADJUSTMENTS 6 SERVICE REQUEST 2 COMMUNICATION PORT CONFIG Table 3 13 UTIL Menu Commands Header Function DIR Return a spectrum analyzer file system directory DIScor Turn the frequency corrections on and off DIScor Are the frequency correcti...

Page 81: ...PLLmode Is phase lock on or off PROTset Turn stored settings files protection on and off PROTset Is stored settings files protection on or off PTYpe Specify the plotter type for screen plots PTYpe What is the specified plotter type RECall Recall a stored settings file RTIme Set the real time clock time RTIme What is the real time clock time RS232 Set RS 232 communications parameters RS232 Return a...

Page 82: ...r Turn on select which audio detector is used DETector Which audio detector is being used VDMode Select broadcast or satellite video demodulation VDMode Is broadcast or satellite video demodulation used VMOnitor Turn the video monitor on or off VMOnitor Is the the video monitor on or off VPOlarity Select positive or negative video polarity VPOlarity Is positive or negative video polarity selected ...

Page 83: ...re Request the complete waveform preamble or ask which register and encoding are to be used for waveform transfers These commands and queries are independent of any spectrum analyzer menu or function block They represent functions that affect the interaction of the spectrum analyzer and the GPIB controller or the RS 232 interface Table 3 16 System Related Commands Header Function EOS Enable and di...

Page 84: ...efinition and item selection Refer to Program ming for an example of how these commands are used to create an interactive menu on the 2714 or 2715 s display screen Table 3 17 Miscellaneous Commands Header Function CLRMenu Clear the menu on the 2714 or 2715 s screen CLRKey Clear the last key pressed DEFMenu Write a menu on the 2714 or 2715 s screen FILE Store a binary block under a given file name ...

Page 85: ...Command Query ...

Page 86: ......

Page 87: ...letters may be used for the remaining data if desired Letters other than those shown in this manual will not be accepted by the 2714 or 2715 Following each command is a general discussion of its arguments specific precautions and other important information Actual messages are shown in their correct syntax When the number of possible messages is limited such as commands that turn features on and o...

Page 88: ...yzer response is shown indented on the following line The response is always shown assuming that HDR ON is selected as in the following example QUEry QUERY ON QUERY OFF All responses are shown when the number of possible responses is limited such as queries that report the on off status of features When a large range of responses is possible such as numeric values typical examples are shown as in ...

Page 89: ... 2715 or its features and functions Arguments MAXMin PEAK This single argument command designates the display storage acquisition mode ACQmode PEAK ACQmode MAXMin Arguments None This simple query returns the currently selected acquisition mode ACQmode ACQMODE PEAK ACQMODE MAXMIN Arguments ON OFF This single argument command turns automatic selection of resolution band width on and off AREs ON AREs...

Page 90: ...T ON ARFATT OFF Arguments None integer in range of 1 to 5 This is a query with one or no argument that returns a listing of the specified antenna table The argument is the number of the antenna table to be listed If a number outside the range is indicated the last table in the range is returned for instance an argument of 6 returns table number 5 an argument of 0 returns table number 1 If no argum...

Page 91: ...on ATHrhld ATHrhld ON ATHrhld OFF Arguments A B C This single argument command designates the spectrum analyzer display register used as the destination for ensemble average and minimum hold operations The destination register cannot be changed while a MIN Hold or ensemble average operation is in progress AVDest A AVDest B AVDest C Arguments None This simple query returns the spectrum analyzer dis...

Page 92: ...on if the analog display mode is active or if there is a destination register conflict AVG ON AVG OFF Arguments None This simple query returns the on off status of the currently selected ensemble averaging mode AVG AVG ON AVG OFF Arguments MAX MAXMin MEAN MIN This single argument command designates the ensemble average mode AVMode MAX AVMode MAXMin AVMode MEAN AVMode MIN Arguments None This simple...

Page 93: ...UM 128 for example Arguments ON OFF IDLE This single argument command turns the spectrum analyzer bandwidth measurement mode on and off When bandwidth mode is turned on marker modes are turned off if they were previously enabled Bandwidth mode is not allowed if the spectrum analyzer is in analog display mode or Video Monitor mode Bandwidth mode cannot be enabled for waveforms in the D register if ...

Page 94: ...e spectrum analyzer s bandwidth measurement mode BWNum BWNUM 20 for example Arguments None This simple query returns the result of the most recent bandwidth measurement in hertz using the spectrum analyzer s bandwidth measurement feature The result is updated at the end of the current sweep if bandwidth mode is not idle BWResult BWRESULT 5 238E 3 for example Arguments ON OFF This single argument c...

Page 95: ...cleared before the measurement will continue A pause may be cleared by any of these methods H CONTinue resumes the test H RST stops the test H For RS 232 assert a break condition H For GPIB send a DCL command NOTE The 2714 or 2715 is paused during measurement routines for various reasons such as changing signal connections To ensure accurate test results carry out the operation indicated by the sc...

Page 96: ...aural deviation test in AUTO mode While the test is running CONtinue will cause the test to terminate and compute and save the measurement to that point RST RS 232 BREAK or GPIB DCL commands will cause the measurement to abort with the results discarded AURal PAUse Will run the aural deviation test in INTERACTIVE mode While the test is running CONtinue will cause the test to terminate and compute ...

Page 97: ... tables CLEvel FULl CLEvel AMPl CLEvel FASt Perform the carrier level measurement in the following manner CLEvel FULl set mode to ACCURATE FREQUENCY AND AMPL and run test CLEvel AMPl set mode to ACCURATE AMPLITUDE ONLY and run test CLEVel FAST set mode to FAST AMPLITUDE ONLY and run test If the current channel is identified in the channel table as DIGITAL then the accuracy modes are irrelevant The...

Page 98: ...round each frequency specified in the auto test table CTB AUTo Perform the automatic CTB measurement CTB PAUse Perform the semi automatic CTB measurement In this mode the 2714 or 2715 pauses after measuring the carrier level It then issues event 401 prompts user to turn off carrier or modulation A CONT command is then required to continue the measurement sequence CTB SINgle Perform the single swee...

Page 99: ...evice test 1 ICR PAUse Equivalent to the ICR listed previously perform the in channel response measurement LINe 50 Select 50 Hz power line frequency LINe 60 Select 60 Hz power line frequency LSTn OFF Turn listen mode off LSTn ON Set listen mode to on so you can listen to demodulated audio MODe OFF Turn CATV mode off MODe ON Turn CATV mode on The 2714 or 2715 will tune to the last active channel an...

Page 100: ...ation field mode to ON This mode allows you to view base band video in the time domain as an oscilloscope display Triggering and sweep speed are automatically set to display one complete video field VLIne OFF Set view modulation line mode to OFF VLIne ON Set view modulation line mode to ON This mode allows you to view base band video in the time domain as an oscilloscope display The knob is assign...

Page 101: ...ns the current channel table as CATV CHTBL string where string is the name of the current table CLEvel Returns the results of the last carrier levels measurement as CATV CLEvel nr2 nr3 nr2 nr3 nr2 nr3 The six results listed in order called are visual carrier level in dBmV visual carrier frequency in Hz 1st aural carrier level relative to visual carrier in dBc 1st aural carrier frequency relative t...

Page 102: ...IB RS 232 access and the location within the table channel menu table name is the name displayed in the channel table menu DEPth Returns the results of the last depth of modulation measurement as CATV DEPTH nr2 expressed as a percentage See FULLDEPth DPCycl Return the present cycle delay value for the modulation depth adjustment mode DPLdur Return the present target line duration value for the mod...

Page 103: ...he noise bandwidth is returned in Hz OPErator Returns the current operator string as CATV OPERATOR string SITe Returns the current site string as CATV SITE string SKIp Returns the current skip status as CATV SKIP ON or CATV SKIP OFF SRVey Returns the results of the last carrier survey measurement as CATV SRVey chan1 amp11 freq1 ampl1 freq1 ampl1 freq1 Each channel surveyed has three correspond ing...

Page 104: ...y to the frequency of the primary marker CENsig Arguments CENter STArt This single argument command designates the displayed frequency as the center or start frequency The indicated frequency may be adjusted depending on the current center frequency and frequency span to ensure the resulting condition is permissible CFSF CENter CFSF STArt Arguments None This is a simple query whose response indica...

Page 105: ...clears the RAM space used by the User Defined Menu takes the spectrum analyzer out of menu mode and clears the last key pressed as reported by the KEY query With this command the spectrum analyzer always returns to the spectral display CLRMenu Arguments None This is a command that causes the spectrum analyzer to perform a center measure Use the COUnt query to return the resulting counted value CME...

Page 106: ...de ON Arguments None This simple query returns the status of the carrier to noise mode CNMode CNMODE OFF CNMODE ON CNMODE IDLE The response CNMode IDLE indicates that there is no signal the AM detector is not selected the noise is too close to the spectrum analyzer noise floor or analog mode is selected Arguments None This simple query returns the result in decibels dB of the most recent carrier t...

Page 107: ...TRAK ON Arguments None This is a command that resumes an operation after the 2714 or 2715 pauses to display a prompt Event code 403 CATV PROMPT is generated when the 2714 or 2715 is paused This command clears the prompt in the same way that pressing the W key does CONTinue See the CATv command Arguments None This simple query returns the result in hertz of the last frequency count performed as a r...

Page 108: ...cies must be within the 0 to 1800 MHz range The REL argument defines a test location relative to the carrier frequency of the current channel For example the following command defines for table index 2 a test location that is 1 MHz above the channel carrier frequency BTFreq 2 REL 1 MHz for example The ABS argument defines an absolute test frequency The following command defines a test frequency of...

Page 109: ...inuous CSO test in the format CSINT 10 Arguments Time in hours from 1 to 24 This command sets the CATV continuous CSO normalization interval for example CSNorm 1 Arguments None Returns the normalization interval for the CATV continuous CSO test in the format CSNORM 1 Arguments Carrier frequency for the CATV continuous CSO test Format is arg freq in Hz where arg is REL ABS or DEL See discussion CSF...

Page 110: ...h the data is sent is also determined by the preamble Data transferred to the spectrum analyzer can be previously returned waveforms or artificially generated curves To ensure that the transferred data is not immediately overwritten it should be transferred to a saved register Other methods are also possible such as transferring to an active register in single sweep mode If you were to display the...

Page 111: ...resenting a comma delimiter plus one to three decimal numerals 0 9 checksum Absent for ASCII encoded decimal otherwise H 2 s complement of Sdi bchi bclo MOD 256 Figure 4 1 Format of Curve Data Figure 4 1 shows the format of curve data The checksum definition ensures that the sum modulo 256 of the data points plus point count plus checksum equals zero Here are several more points worth noting about...

Page 112: ...ted by points 5 to 505 Values outside this range extend beyond the graticule area Therefore the sixth data point 5 along the horizontal axis crosses the left graticule line the 505th point crosses the right graticule line Vertically the data are digitized into 256 values from 0 to 255 The resulting graticule is represented by points 5 to 245 Figure 4 2 Values outside this range extend beyond the g...

Page 113: ...or inactive register whether or not it is saved the register always contains data even if it is not displayed Contrast this function with the FILE command which returns a stored curve file whether or not it is currently in a register in binary only and not in curve data format See Programming for GPIB programming examples using CURve Arguments Date in the form DD MON YY This is a command with a st...

Page 114: ...s a command with arguments separated by commas in the form above The Ln is called the link header where n is a number between 1 and 16 that defines a display line number The link argument is a user defined string that appears on the specified display line Only 32 characters of the string are used Excess characters are discarded If fewer than 32 characters are contained in the link argument spaces ...

Page 115: ...ery returns the current status of the audio source This may be the output of the AM detector FM detector neither or both DETector DETECTOR AM DETECTOR AMFM DETECTOR FM DETECTOR OFF Arguments None or string This query may be used with or without an argument When used without an argument DIR returns a formatted system file directory listing that is similar to the one displayed by the key sequence UT...

Page 116: ...be found Event 103 COMMAND ARGUMENT ERROR is returned if the filename is not formatted properly Both conditions return the default response 0 Arguments ON OFF This single argument command enables and disables the spectrum analyzer s frequency corrections When DIScor is ON frequency corrections are disabled the message FREQ COR OFF appears on the spectrum analyzer screen DIScor ON DIScor OFF Argume...

Page 117: ... status of the display line feature DLIne DLINE ON DLINE OFF Arguments OFF OVEr OVUNder UNDer This single argument command controls the status of the display line limit detector When the limit detector is on an SRQ and an event 895 are generated when the limit condition is exceeded The following table shows the four arguments and their resulting condition Argument Condition OVEr Alarm when signal ...

Page 118: ...nt in alternate units The MARKer argument sets the display line to the amplitude of the primary marker DLValue MARker DLValue 30 for example Arguments None This simple query returns the display line value Units are the currently selected ref level units DLValue Arguments AM EXTernal FM This single argument command designates the source of the signal displayed by the spectrum analyzer as the intern...

Page 119: ...e if a 10 sweep ensemble average is compiled an SRQ will not occur following each sweep Rather a single SRQ accompanied by event 882 ENSEMBLE AVERAGE COMPLETE occurs after the averaging process is finished EOS ON EOS OFF Arguments None This simple query returns the status of the end of sweep generator EOS EOS ON EOS OFF Arguments Numerals from 2 to 39 except 9 19 and 29 This single argument comman...

Page 120: ...arker amplitudes will continue to obtain correct amplitude results If the Flatness value is needed for some other purpose FCMode ON will enable the FCOR query This query return the status ON or OFF of FCMode Arguments filename data block This is a complex single or multiple argument command that transfers a previously stored spectrum analyzer file from the controller to the spectrum analyzer When ...

Page 121: ...to the spectrum analyzer Table 4 3 File Types File Type Description Settings Each file saves the control settings for a particular register A B C D in a numbered location 00 39 excluding 09 19 29 The numbers correspond to the stored settings listed under UTIL 1 Curves Each file saves the curve data from a particular register A B C in a numbered location 00 39 excluding 09 19 29 The numbers corresp...

Page 122: ...ame Description 12 88 Version REF0N CATV frequency response reference SEARCH Signal search configuration SETUP Instrument configuration S_CENT Centronics configuration S_GPIB GPIB configuration S_PLOT Plotter configuration S_RTC Real time clock configuration S_CATV CATV mode configuration Other files of a temporary nature may be created by the spectrum analyzer for internal purposes These files sh...

Page 123: ...hich is accessed by pressing the key sequence UTIL 1 0 SET0BU is a backup in case DSET00 becomes corrupted at the next power up The FILE query enables you to store a spectrum analyzer file on disk for later restoration to the same or another spectrum analyzer The file is in binary format and the first bytes of the response are the ASCII character codes for filename If HDR is ON before issuing the ...

Page 124: ...ls 1 dB step and OFF equals 10 dB step FINe FINE ON FINE OFF Arguments Frequency in the range 1000 GHz to 1000 GHz This single argument command turns on frequency offset mode see FOMode and sets the spectrum analyzer frequency offset value A value of 0 turns off frequency offset mode Frequency units may be appended otherwise hertz are assumed When enabled the value of the frequency offset affects ...

Page 125: ... off status of the frequency offset mode FOMode FOMODE OFF FOMODE ON Arguments frequency in the range 10 MHz to 1 8 GHz This single argument command sets the center or start frequency to the indicated value Frequency units may be appended otherwise hertz are assumed Inter pretation as center or start frequency depends upon the setting of CFSF If start frequency is selected the span is checked and ...

Page 126: ...command see Appendix B GPIB System Concepts GTL Arguments ON OFF This single argument command turns the header on and off in a query response When HDR is on a command header describing the nature of the response precedes the response This also makes the response an executable command HDR OFF HDR ON The following table lists several queries and their potential responses with HDR ON and HDR OFF In t...

Page 127: ...st of all instrument specific commands including commands for all options whether present or not HELp HELP ACQMODE AQP WFMPRE ZEROSP Arguments None This is a command with no argument that moves the primary marker from its current position to the peak of the next higher on screen signal If the marker is not enabled the command enables a marker If signal track is enabled HRAmpl turns signal track of...

Page 128: ... a positive or negative value within the range of 0 to 1800 MHz The REL argument defines a test location relative to the carrier frequency of the current channel For example the following command defines for table index 2 a test location that is 1 MHz above the channel carrier frequency ICFreq 2 REL 1 MHz for example The DEL argument deletes the table element defined by the table index argument A ...

Page 129: ...panel The general form of the command resembles this example KEY arg where arg is the mnemonic for the key press to be simulated All permissible mnemonics are listed in Table 4 6 For instance you send the following message to simulate pressing the INPUT Menu key KEY INPutmenu for example To turn on the calibration signal using the KEY command you can send this message KEY INPutmenu KEY M9 for exam...

Page 130: ... Display Menu FIne Fine Ref Lvl steps FREQAsgn Assign Keypad to Frequency or to Channel in CATV Mode FREQDown Frequency Down FREQUp Frequency Up INPutmenu Input menu KNOBRight Turn knob right 1 step KNOBLeft Turn knob left 1 step M0 0 key M1 1 key M2 2 key M3 3 key M4 4 key M5 5 key M6 6 key M7 7 key M8 8 key M9 9 key MAXHold Max Hold MAXSpan Max Span MKREnab Marker On Off Delta MKRLeft Marker Lef...

Page 131: ...to ResBW RESDown ResBW Down RESUp ResBW Up SAve Save SGLswp Single Sweep SPANAsgn Assign keypad to Span SPANDown Span Down SPANUp Span Up SWPAuto Sweep Auto SWPDown Sweep Time Down SWPMenu Swp Trig Menu SWPUp Sweep Time Up TERMW First Terminator TERMX Third Terminator TERMY Second Terminator TERMZ Fourth Terminator USErdef User Def Menu UTilmenu Utility Menu VIDflt Video Filter VRTLIn Lin Mode VRT...

Page 132: ...o argument that moves the primary marker from its current position to the peak of the next lower on screen signal If the marker is not enabled the command turns on a marker If signal track is enabled LRAmpl turns it off enables the marker and assigns the knob function to marker control If there is no lower peak and SGErr is on an SRQ and an event 896 are generated LRAmpl Arguments None PRImary SEC...

Page 133: ...ments None This simple query returns the on off status of the markers MARker MARKER SINGLE MARKER DELTA MARKER OFF Arguments None This query returns two integer numbers separated by a comma The first number represents the total amount of free NVRAM The second number represents the largest contiguous block of free NVRAM The values depend on the options installed and the number of waveforms settings...

Page 134: ...ample Arguments None PRImary SECond DELta This is a simple query with one or no arguments It returns a linked response indicating the frequency of the primary arg none or PRImary or secondary arg SECond marker or their frequency difference arg DELta The units are hertz MFReq MFREQ PRIMARY 193 25E 6 for example MFReq SECond MFREQ SECOND 197 75E 6 for example MFReq DELta MFREQ DELTA 4 5E 6 for examp...

Page 135: ...7EĆ4 for example MKTime SECond MKTIME SECOND 8 98EĆ4 for example MKTime DELta MKTIME DELTA 4 31EĆ4 for example Arguments None This is a command that requires no argument It moves the primary marker from its current position to the next signal peak to the left If signal track is enabled MLFtnxt turns signal track mode off enables the primary marker and assigns the knob function to marker control If...

Page 136: ...averaging is enabled MNHld ON MNHld OFF Arguments None This simple query returns the on off status of the minimum hold feature MNHld MNHLD ON MNHLD OFF Arguments None PRImary SECond DELta This is a query with one or no argument It returns a linked integer response indicating the horizontal position of the primary arg none or PRImary or secondary arg SECond marker or their horizontal difference arg...

Page 137: ... is a simple query whose response indicates the currently selected message delimiter MSGdlm MSGDLM LF MSGDLM SEMICOLON Arguments None This is a command that requires no argument It is equivalent to turning the frequency markers knob one click in the counterclockwise direction The spectrum analyzer s response depends upon the currently selected knob function MSTep Arguments Value in the range 1 8 G...

Page 138: ...ample MVPos DELta MVPOS DELTA 123 for example Arguments OFF ON This single argument command turns the maximum hold feature on or off MXHld ON MXHld OFF Arguments None This simple query returns the current on off status of the maximum hold feature MXHld MXHLD ON MXHLD OFF Arguments NOMinal number in range 50 to 20 This single argument command sets the required level of signal amplitude at the input...

Page 139: ...usly selected span division when MAX Span is turned off MXSpn ON MXSpn OFF Arguments None This simple query returns the current on off status of the maximum span feature MXSpn MXSPN ON MXSPN OFF Arguments Number in the range 1 Hz to 1 8 GHz This single argument command sets the noise bandwidth for normalized noise mode measurements Units may be appended otherwise hertz are assumed NNBw 4 MHz for e...

Page 140: ...tus of the normalized noise measurement mode IDLE indicates when the noise is too close to the spectrum analyzer noise floor the AM detector is not enabled MAX Span is active the waveform is saved or the spectrum analyzer is in analog display mode NNMode NNMODE ON NNMODE OFF NNMODE IDLE Arguments None This simple query returns the result of the most recent normalized noise measurement The result i...

Page 141: ...e following list shows the format of the response Actual values for each category will vary NORM NORM TEK 2714 or 2715 CURRENT NORMALIZATION VALUES MISCELLANEOUS NORM VALUES VCO NORMALIZATIONS CF NORMALIZATIONS REFERENCES VERTICAL SCALE OFFSETS LOG NORMALIZATIONS FILTER SENSITIVITY FILTER AMPLITUDES VR FINE GAIN VR GAIN STEPS RF ATTEN PREAMP DET GAIN NORM ...

Page 142: ...rement mode OBWMode OBWMODE ON OBWMODE OFF OBWMODE IDLE Arguments Numeral in the range of 1 to 99 This single argument command specifies the percentage 1 to 99 of occupied bandwidth for occupied bandwidth measurements OBWPcnt 40 for example Arguments None This simple query returns the occupied bandwidth percentage OBWPcnt OBWPCNT 40 for example Arguments None This simple query returns the result o...

Page 143: ...d SIGNAL PEAK This height must exceed PKHeight in order to recognize SIGNAL PEAK PKHeight 50 for example Arguments None This simple query returns a number that represents the signal height in vertical display increments required for the peak to be recognized by the NEXT LOWER and NEXT HIGHER marker functions PKHeight PKHEIGHT 20 for example Arguments OFF ON This single argument command enables or ...

Page 144: ...printer type must be specified locally or with the PTYpe command PLOT screen data array up to 61 1kbyte long The data array can be up to 61 1 Kbytes for Epson printers and 37 Kbytes for HPGL plotters PLOT never produces a response header even if HDR is ON See Programming for programming examples Arguments CENter TOP This single argument command specifies whether to offset the result of the B C MIN...

Page 145: ...e H Video line TV channel number average count D line TV channel table H Single sweep mode arm H Tracking Generator H CALIBRATOR H UNCAL or FREQ COR OFF H Real time clock H CATV measurement title H CATV measurement result line 1 H CATV measurement result line 2 The readouts are returned as arguments enclosed in quotation marks and separated by commas The response ends in a semicolon If an argument...

Page 146: ...nd turns the built in preamplifier on or off PREamp ON PREamp OFF Arguments None This simple query returns the current on off status of the built in preamplifier PREamp PREAMP ON PREAMP OFF Arguments OFF ON This single argument command turns stored settings protection on or off Stored settings cannot be erased when PROTset is ON PROTset ON PROTset OFF Arguments None This simple query returns the c...

Page 147: ...creen data transferred from the spectrum analyzer to the controller in response to the PLOT query PTYpe EPSON PTYpe HPGL2 PTYpe HPGL4 Arguments None This simple query returns the type of printer or plotter currently selected for use with the PLOT query PTYpe PTYPE EPSON PTYPE HPGL2 PTYPE HPGL4 Arguments Integers from 0 to 39 except 9 19 and 29 This single argument command instructs the spectrum an...

Page 148: ...B setting When a numeric argument is used it must be within the range of 70 dBm to 20 dBm or equivalent in alternate units of dBm dBmV dBV dBmV dBmW or dBmV M If no units are used the current reference level units are assumed If units other than the current units are used the value is converted to current units This command may alter the amount of RF attenuation if automatic RF attenuation is enab...

Page 149: ... example Arguments None This simple query returns the currently selected resolution bandwidth in hertz RESbw RESBW 3 0E 4 for example Arguments Number in the range 0 to 50 This single argument command sets the RF attenuation to a fixed value between 0 and 50 dB in 2 dB steps Values other than even integers are rounded Units are not allowed RFAtt 34 for example Arguments None This simple query retu...

Page 150: ...Unit DBV RLUnit DBUV RLUnit DBUW RLUnit DBUVM In CATV mode only DBMV is allowed Arguments None This simple query returns the selected reference level units RLUnit RLUNIT DBM RLUNIT DBMV RLUNIT DBV RLUNIT DBUV RLUNIT DBUW RLUNIT DBUVM Arguments Value within the range 100 dB This single argument command sets the reference level offset value The offset value must be within the 100 dB to 100 dB range ...

Page 151: ... ROMode ON ROMode OFF Arguments None This simple query returns the current reference level offset mode either on or off ROMode ROMODE ON ROMODE OFF Arguments OFF ON This single argument command enables and disables the generation of service requests SRQ by the spectrum analyzer The user request is affected but the power on SRQ is not RQS ON RQS OFF Arguments None This simple query returns the spec...

Page 152: ...is syntactically correct to send more than one argument per command it is dangerous to do so Execution of these commands reprograms the interface Also note that when PARity NONe is selected the spectrum analyzer does not add a parity bit on the data word nor does it expect a parity bit on input Some terminals transmit an 8 bit word with the 8th bit set to 0 when set to 7 bit no parity This can con...

Page 153: ... MM SS where HH is the hour MM is the minute and SS is the seconds RTIme RTIME 13 30 27 Arguments A ON A OFF B ON B OFF C ON C OFF and combinations of these arguments This is a command with a single argument or multiple linked arguments It saves and deletes waveforms located in NVRAM ON saves the indicated display register to NVRAM OFF deletes a saved display register from NVRAM For instance the c...

Page 154: ...zer The string of commands can be retained for transfer to the same or another 2714 or 2715 spectrum analyzer at a later time when it is desirable to reproduce the same setup The SET response enables you to replicate equipment setups You should not modify the SET response HDR status has no effect on the SET query Individual command headers are always returned and the group header SET is never retu...

Page 155: ...If the SET query is used while a CATV test is running the returned settings string may contain invalid control settings The CATV test may change a 2714 or 2715 control parameter while the SET query is processed Arguments OFF ON This single argument command enables and disables the generation of a service request SRQ when a marker function is unable to find a signal SGErr ON enables SRQ generation ...

Page 156: ...ent command enables and disables the signal track mode The command does not work in zero span mode SGTrak ON SGTrak OFF Arguments None This simple query returns the on off status of the signal track mode SGTrak SGTRAK ON SGTRAK OFF Arguments None This is a command that requires no argument It selects and arms the single sweep mode The sweep does not actually occur until the trigger conditions for ...

Page 157: ...ated If the 0 zero argument is used zero span mode is activated SPAn INC SPAn DEC SPAn 0 SPAn 25 kHz for example Arguments None This simple query returns the current span div in hertz SPAn SPAN 2 5E 4 for example Arguments Value in the range 9 kHz to 1 8 GHz This single argument command specifies the BEGIN frequency for signal search mode The BEGIN frequency must be less than the END frequency Uni...

Page 158: ...to 50 frequency amplitude pairs can be returned The frequency and amplitude values are separated by commas and the pairs of values are also delimited by commas The list begins with the lowest frequency signal detected and proceeds to the highest The amplitude units are those currently selected as reference level units frequency is in hertz Following is a typical example of the response when HDR is...

Page 159: ...rammed tuning mode The CF argument selects the current center frequency as the increment MARker selects the current marker frequency and a numeric argument specifies the increment in hertz Units may be appended STEp CF STEp MARker STEp 30 kHz for example Arguments None This simple query returns the currently specified programmed frequency tuning increment in hertz STEp STEP 3 0E 4 for example Argu...

Page 160: ...er is the argument the start and stop frequencies are set to the current marker frequencies delta marker mode must be active When the argument is a pair of numbers the first number specifies the start frequency and the second specifies the stop frequency Units may be appended otherwise hertz are assumed The second number must exceed the first by at least 10 kHz to satisfy the spectrum analyzer s s...

Page 161: ... signal being tracked The value is updated at the end of each sweep when signal track mode is enabled Otherwise the amplitude of the signal last tracked is returned The units are those currently selected as reference level units TAMpl TAMPL 34 0 for example Arguments string This single argument command displays a message on line 8 of the spectrum analyzer screen line 9 if title mode is active The ...

Page 162: ...mV M can be used but the equivalent value must be within the range 174 dBm to 20 dBm If units are not supplied the current reference level units are assumed This command also turns off the automatic threshold selection mode THRhld 10 DBMV for example Arguments None This simple query returns the current threshold value fixed or automatically selected The units are the currently selected reference l...

Page 163: ...S for example Arguments None This simple query returns the currently selected sweep speed Units are in seconds TIMe TIME 25 E 6 for example Arguments AUTo MANual FIXed This single argument command enables AUTo and disables FIXed automatic sweep speed selection This command also enables manual sweep positioning MANual using the spectrum analyzer s LEVEL control When in the FIXed mode the sweep spee...

Page 164: ... one currently exists If the title was sent in lowercase letters the returned string will be lowercase even though the title is displayed in uppercase letters on the spectrum analyzer screen TITLe TITLE SCREEN 1 for example Arguments FREquency MARker VIDline This single argument command selects the frequency marker knob function Argument Function FREquency Adjust start or center frequency MARker A...

Page 165: ...rigger type TVLine also sets the knob function to VIDLINE if knob selectable TV line mode is enabled TRIgger EXTernal TRIgger FRErun TRIgger INTernal TRIgger LINe TRIgger TVField TRIgger TVLine Arguments None This simple query returns the selected spectrum analyzer trigger type TRIgger TRIGGER FRERUN TRIGGER EXTERNAL TRIGGER INTERNAL TRIGGER LINE TRIGGER TVFIELD TRIGGER TVLINE Arguments OFF ON Thi...

Page 166: ...ctrum analyzer is to trigger when programmed TV line triggering is enabled This command also turns off Video Monitor mode if it is enabled The minimum argument is 1 The maximum value depends on the TV line standard 525 for NTSC 625 for PAL and SECAM and 1024 for OPEN This command also sets TRIgger to TVLine and enables the programmed mode TVLine 17 for example Arguments None This simple query retu...

Page 167: ... TVLMode TVLMODE CONT TVLMODE KNOB TVLMODE PROG Arguments NTSC OPEN PAL SECAM This single argument command designates the TV standard when using the TV line trigger mode This command turns the Video Monitor mode off if enabled and sets the trigger mode to TV Line The maximum value of the TVLIne command s argument is influenced by the TV standard TVLStd NTSC TVLStd OPEN TVLStd PAL TVLStd SECAM Argu...

Page 168: ...cast selects AM detection for use with broadcast television SATellite selects FM detection for use with satellite transponders VDMode BROadcast VDMode SATellite Arguments None This simple query returns the currently selected detection for Video Monitor mode VDMode VDMODE BROADCAST VDMODE SATELLITE Arguments OFF ON This single argument command turns the video filter on and off VFEnab ON VFEnab OFF ...

Page 169: ...VFMODE FIXED Arguments OFF ON floating point number This single argument command turns the video filter on or off or specifies the filter bandwidth The ON and OFF arguments enable and disable the currently selected video filter in the same way as the VFEnab command A numeric argument is used to specify a particular video filter bandwidth and turn on the video filter Units may be appended otherwise...

Page 170: ...OFF C OFF for example VIEw Waterfall ON A OFF for example Multiple arguments must be separated with commas Arguments None A B C D Minusa Waterfall This is a query with one or no argument that returns the on off status of the indicated register or all storage registers If no argument is used the status of the A B C and D registers the waterfall mode and B C minus A display mode are returned Only th...

Page 171: ...e currently selected destination register for dBmV M measurements VMDEst VMDEST B for example Arguments Floating point number This single argument command specifies the source antenna distance at which a dBmV M measurement is actually performed Distance may be entered in feet FT meters M kilometers KM or miles MI but the spectrum analyzer converts all values to meters or kilometers VMDIst 3 M for ...

Page 172: ...in the dBmV M mode VMMkrunit VMMKRUNIT DBUVM VMMKRUNIT VM Arguments OFF ON This single argument command turns the Video Monitor on and off VMOnitor ON VMOnitor OFF Arguments None This simple query returns the current on off status of the Video Monitor mode VMOnitor VMONITOR ON VMONITOR OFF Arguments NEGative POSitive This single argument command specifies the polarity of video signals to be receiv...

Page 173: ... mV div mV div linear FM 10 5 1 kHz div linear EXTernal 17 5 87 5 175 mV div linear Corresponds to reference level range of 70 dBm to 20 dBm If units are not supplied LIN assumes volts for example LIN 1 LIN 100 mV FM assumes hertz and EXTernal assumes volts VRTdsp LOG 5 for example VRTdsp LIN 50 mV for example VRTdsp FM 5 kHz for example VRTdsp EXTernal 175E 3 for example Arguments None LOG LIN FM...

Page 174: ...fies the polarity of the video sync to be received with the Video Monitor mode VSYnc NEGative VSYnc POSitive Arguments None This simple query returns the currently specified video sync polarity VSYnc VSYNC NEGATIVE VSYNC POSITIVE Arguments None This is a command that requires no argument It causes the spectrum analyzer to wait for an end of sweep to occur before processing any more commands WAIt c...

Page 175: ... separated by commas may be used See the CURve command for an explanation of data encoding In its simplest form an argument s always follows the command header These are examples of the general form to be used WFMpre WFID register WFMpre ENCdg type WFMpre WFID register ENCdg type where register A B C or D type Asc Bin or Hex For instance these are all possible WFMpre commands WFMpre WFId A WFMpre ...

Page 176: ...e currently selected CURve data encoding WFMpre ENCdg WFMPRE ENCDG ASC for example When WFMpre is issued without an argument it returns all the information necessary to interpret the response to a CURve query Following is an example of the response with HDR ON WFMPRE WFID register ENCDG type NR PT 512 PT FMT Y PT OFF nr1 XINCR nr3 XZERO nr3 XUNIT xunit YOFF nr1 YMULT nr3 YZERO nr3 YUNIT yunit BN F...

Page 177: ...IT xunit X units Hz hertz or s seconds YOFF nr1 Y offset See following formulas YMULT nr3 Y multiplier See following formulas YZERO nr3 Y zero See following formulas YUNIT yunit Y units dBm dBmV dBV dBmV dBmW dBmV M V or Hz BN FMT RP Binary format A binary positive integer BYT NR 1 Bytes per number Always 1 byte per number BIT NR 8 Bits per number Always 8 significant bits CRVCHK CHKSM0 Curve chec...

Page 178: ... of the point are given by these expressions XN in xunits XZERO XINCR N PT OFF and YN in yunits YZERO YMULT VALN YOFF where N 255 and VALN 125 This data is extracted from the preamble XZERO 0 YZERO 2 0 101 XINCR 3 6 X 106 YMULT 3 333 10 1 PT OFF 5 YOFF 245 XUNIT Hz YUNIT dBm Evaluating the expressions we find these results XN 0 3 6 X 10 6 255 5 900 10 6 Hz YN 20 3333 125 245 20 dBm These results r...

Page 179: ...Status Reporting ...

Page 180: ......

Page 181: ...they alert you to abnormal conditions Decoding of the status byte often provides the most efficient approach to detecting general classes of instrument conditions but event codes provide more detailed information Different types of information are produced by decoding status bytes and event codes For example suppose the signal on the 2714 or 2715 s screen is larger than the current reference level...

Page 182: ... of the status byte is always reported to be on A query is the only means for returning information to the interface when VERBOSE mode is OFF In this mode the user must issue an EVENT or STBYTE query to retrieve error information The REQUEST indicator on the 2714 or 2715 s display screen indicates when an error is pending If RQS is on and an error is pending the REQUEST indicator appears on the sc...

Page 183: ...s of 16 decimal or 10 hexadecimal to the table entry Table 5 1 Event Codes ve Status Byte ve e cri i Event Code Dec Hex Event Description 0 128 80 No Device dependent Status To Report 0 0 00 No System Status To Report 101 97 61 Command Header Error 102 97 61 Header Delimiter Error 103 97 61 Command Argument Error 104 97 61 Argument Delimiter Error 105 97 61 Non numeric Arg Numeric Expected 106 97 ...

Page 184: ... E0 Illegal Command 705 224 E0 Malloc Ran Out Of Memory 706 224 E0 RunTask Cannot Start process 707 224 E0 Interrupt Fault At FF 708 224 E0 Interrupt Fault 709 224 E0 Command Not Implemented 710 224 E0 Markers Are Off 711 224 E0 Signal Cannot Be Set Properly 712 224 E0 No Signal At Counter Input 713 224 E0 Counter Frequency Unstable 714 224 E0 Normalization Suggested 715 224 E0 Timer Interrupt Fau...

Page 185: ... Inner PLL 735 224 E0 FREQ Norm Suggested Set VCO 736 224 E0 Polynomial Has No Solution 737 224 E0 Last Pwr Down Reg Checksum Err 738 224 E0 Storage Register Empty 739 224 E0 Normalized Result Out of Range 740 224 E0 Function Not Avail In LIN mode 741 224 E0 Cannot Store NV Memory Full 742 224 E0 AMPL Norm Suggested VR Pin DAC 743 224 E0 Cannot Calc Vert Sensitivity 744 224 E0 Cannot Count VCO IF ...

Page 186: ...ed Sweep Not Armed 768 224 E0 Selected Program Is Empty 769 224 E0 Program Not Executable 770 224 E0 Not Avail In Waterfall Mode 771 224 E0 Amplitude Out Of Calibration 772 224 E0 Illegal Start Stop Inc Values 773 224 E0 Delete Existing Table First 774 224 E0 Selected Table Is Empty 775 224 E0 Use ANTENNA SETUP Menu First 776 224 E0 Table Is Too Large To Edit 777 224 E0 Default Data Loaded 778 224...

Page 187: ...rigger 808 224 E0 No Signal Found Above Threshold 809 224 E0 Inactive Marker Off Screen 810 224 E0 Signal Over Range 811 224 E0 Function Not Avail In Max Span 812 224 E0 Ref Level At New Range Limit 813 224 E0 Normalization Complete 814 224 E0 No Signal At Center Of Display 815 224 E0 Not Avail W Display Storage On 816 224 E0 500 kHz RBW Used For Counting 817 224 E0 Noise Level Less Than 2 dB 818 ...

Page 188: ...Noise Too Low 838 224 E0 Only Waveforms Saved 839 224 E0 Only Waveforms Deleted 840 224 E0 File System Full 841 224 E0 File System Directory Full 842 224 E0 File Size Error 843 224 E0 Too Many Files Open 844 224 E0 File Not Found 845 224 E0 Protected File 846 224 E0 Cannot Delete File While in Use 847 224 E0 Additional NVRAM Not Installed 848 224 E0 Invalid File Number 849 224 E0 Invalid Device Nu...

Page 189: ...ocess 871 224 E0 Entering CATV Measurement Mode 872 224 E0 Results Storage Complete 873 224 E0 Short YIG Delay Go to UTIL 5 4 874 224 E0 Quiet Line Verification Failed 875 224 E0 1st Mix LVL Raised for Vid Demod 880 194 C2 User Defined Program Complete 881 194 C2 Plot Complete 882 194 C2 Ensemble Average Complete 883 194 C2 Signal Search Complete 884 194 C2 Normalization Process Finished 885 194 C...

Page 190: ...ate SRQs H Pressing the front panel key sequence UTIL 6 This is the user request event The resulting SRQ cannot be independently masked H Completion of certain operations End Of Sweep normalization User De fined routine signal search plot or ensemble average Intermediate operation complete events are blocked The plot complete event is generated after a plot is formatted and sent to the plotter not...

Page 191: ... status byte is placed on the bus The status byte is cleared by a serial poll of the spectrum analyzer by the DCL GPIB command or if the instrument is first addressed the SDC GPIB command Status bytes can be divided into two categories device dependent and system Device dependent status bytes represent conditions unique to the 2714 or 2715 System status bytes have a fixed definition for all Tektro...

Page 192: ...R E B S S S S Where R SRQ pending 1 pending 0 not pending B Instrument busy 1 busy 0 not busy S System status E Normal 0 Abnormal 1 Table 5 3 General Device Dependent Status Bytes Status Byte Bits 8 7 6 5 4 3 2 1 Bit Value 1 R D D D D D D Where R SRQ pending 1 pending 0 not pending D Instrument specific Table 5 4 Specific System Status Bytes Status Byte Bits y e ve 8 7 6 5 4 3 2 1 Byte Value Event...

Page 193: ... Display line limit exceeded 1 1 1 B 0 1 0 1 E5 F5 Firmware error Byte value depends on B 1 or B 0 Where U UDP or CATV measurement executing 1 N Normalization s executing 1 S Signal search executing 1 A Ensemble average executing 1 P Plot executing 1 B Busy 1 Table 5 6 Event Priorities Event Priority Power on 1 Command error 2 Execution error 3 Internal error 4 User request 5 Signal find error MRG...

Page 194: ...e first five lines must be part of the parent program IBFIND and IBRSP are callable subroutines supplied by National Instruments See Programming for explana tions and additional programming instructions REM INCLUDE IBDCL4 BAS COMMON SHARED BDNAME BD SPR BDNAME TEK_SA CALL IBFIND BDNAME BD GOSUB SERIAL POLL SERIAL POLL CALL IBRSP BD SPR PRINT SPR RETURN Example 5 1 Subroutine to Read the Status Byt...

Page 195: ...FF modes Event codes are grouped into categories as shown in Table 5 7 Individual event codes are listed near the front of this section in Table 5 1 Table 5 7 Event Code Categories Numeric Range Event 0 99 Local events not used 100 199 Command errors 200 299 Execution errors 300 399 Internal errors 400 499 System events 500 599 Execution warnings not used 600 699 Internal warnings not used 700 999...

Page 196: ...he EVent or ERRor queries must be issued continuously until event code zero 0 is returned EVEnt or ERRor returns the highest priority event in the table when RQS is off After RQS has been turned on either query returns the code corresponding to the event reported in the status byte not necessarily the highest priority When an event code is read the code is cleared from the pending event table This...

Page 197: ...Programming ...

Page 198: ......

Page 199: ...can also work with earlier versions of QuickBASIC However you must make the changes to function calls as outlined in the READĆQB DOC document file from National Instruments No special libraries device drivers or third party software is required for compiling and running the RS 232 programming examples that follow All functionality of the program is provided by Microsoft QuickBASIC For instructions...

Page 200: ...ose Mode and Error Handling on page 1 9 As a result the 2714 or 2715 sends a response back to the program for each command it receives The program terminates normally if the operator enters ESC from the computer keyboard Otherwise the program analyzes and displays each possible VERBOSE mode response and takes one of the following actions H If a command results in the response OK the program displa...

Page 201: ...lay screen to accept operator input and calls SENDCOMMAND The call to this routine can be replaced by a call to any user written module for example to perform a harmonic distortion analysis All RS 232 communications are already in place SENDCOMMAND This procedure sends commands to the spectrum analyzer and receives responses from the spectrum analyzer after establishing communications over the RS ...

Page 202: ...amming for more information on RS 232 configuration 2 The program accepts a spectrum analyzer command that the operator enters at the computer keyboard and sends the command to the spectrum analyzer 3 The program terminates when the operator presses the ESC key on the computer keyboard This returns control to D0S 4 The program always displays the 2714 or 2715 s VERBOSE response to the command or q...

Page 203: ...shed with a baud rate of 9600 data bits set to 8 parity of NONE EOL CRLF FLOW CONTROL NONE ECHO OFF and VERBOSE ON PROGRAM EXPECTS THE 2714 or 2715 TO BE SET WITH THESE PARAMETERS If the 2714 or 2715 is not configured in this way an error message is displayed directing the operator to configure the 2714 or 2715 properly DECLARE SUB SENDCOMMAND DECLARE SUB ENTERCOMMAND DECLARE SUB RS232 CALLS globa...

Page 204: ... BUFFER Now execute routine which will accept all user input and display all responses Procedure continues until the user presses the ESCape key CALL ENTERCOMMAND end program and return to DOS when ESCape key is pressed END PROGRAM COLOR 7 0 CLS END read routine for RS232 branched from RS232 CALLS subprogram READ BUFFER COM 1 OFF turn automatic branch off rd initialize string to save ...

Page 205: ...ize counter and DO WHILE TIMER i hold i try to read for time alotted make sure controller is just GOSUB READ INPUT not too fast for 2714 or 2715 IF end of read Y THEN i 0 END IF LOOP end of read Y set flag so will avoid possible endless loop in RS232 calls RETURN READ INPUT buffer N initialize flag to indicate that read something DO WHILE NOT EOF 1 a INPUT LOC 1 1 read entire contents of buffer rd...

Page 206: ...to indicate END IF successful read END IF ELSE IF LEN rd 523 THEN insure have read past binary data IF INSTR 524 rd CHR 13 THEN before checking for cr lf IF INSTR 525 rd CHR 10 THEN end of read Y buffer Y set buffer flag on END IF END IF END IF END IF RETURN PROCEDURE to perform a number of tasks 1 format the screen to accept operator input 2 open communication link with 2714 or 2715 func 1 call R...

Page 207: ...E i 6 PRINT STRING 70 NEXT LOCATE 4 15 0 PRINT THIS ROUTINE ACCEPTS SINGLE COMMANDS OR QUERIES ONLY LOCATE 6 23 0 PRINT Press the Enter key to send LOCATE 7 23 0 PRINT Press the Esc key to end define a window for operator input COLOR 12 0 LOCATE 9 8 0 PRINT COMMAND INPUT COLOR 14 9 FOR i 10 TO 17 LOCATE i 6 PRINT STRING 70 NEXT define a window for instrument response COLOR 12 0 LOCATE 18 8 0 PRINT...

Page 208: ...user input which will be sent to 2714 or 2715 LOCATE 11 8 1 INLOOP IN INKEY IF IN THEN GOTO INLOOP ELSEIF LEN IN 1 THEN BEEP GOTO INLOOP ELSEIF IN CHR 27 THEN COLOR 7 0 CLS END ELSEIF IN CHR 13 AND LEN wrt 0 THEN carriage return with no message BEEP is an error GOTO INLOOP ELSEIF IN CHR 13 THEN carriage return is the signal to CALL SENDCOMMAND send user input to 2714 or 2715 wrt reĆinitialize stri...

Page 209: ...0 y CSRLIN one byte at a time LOCATE y x PRINT IN and reposition cursor x x 1 increment position of cursor IF x 74 AND y 16 THEN check cursor position FOR index 11 TO 16 if outside realm of input window LOCATE index 8 clear window PRINT STRING 66 NEXT LOCATE 11 8 1 and relocate cursor GOTO INLOOP ELSEIF x 74 THEN if cursor beyond line CurRow CSRLIN move it down to next line LOCATE CurRow 1 8 1 GOT...

Page 210: ...forms all RS232 calls All information needed has been defined as global variables rd returned info from RS232 call wrt info to send to device func identifies which RS232 function to perform wfm array to hold waveform SUB RS232 CALLS IF func 1 THEN GOTO SELECT DEVICE ELSEIF func 3 THEN GOTO SEND MESSAGE TO DEVICE ELSEIF func 5 THEN GOTO GET BINARY WAVEFORM END IF This routine opens COM PORT 1 for c...

Page 211: ...suppress checking the DATA SET READY line RB 2048 size in bytes of the receive buffer TB 2048 size in bytes of the transmit buffer SELECT DEVICE buffer N initialize these two indicators read error 0 OPEN com1 9600 n 8 1 CS DS rb 2048 tb 2048 FOR RANDOM AS 1 clear the RS232 buffers and reset STATUS reporting to insure no messages pending lc status INP H3FB get line control register COM1 lc status l...

Page 212: ...ICE END IF PRINT 1 RS232 EOL CRLF GOSUB READ FOR VERBOSE IF read error 1 THEN GOTO SELECT DEVICE END IF PRINT 1 RS232 FLOW NONE GOSUB READ FOR VERBOSE IF read error 1 THEN GOTO SELECT DEVICE END IF set up the 2714 or 2715 so REQUEST message will NOT display on analyzer and so the 2714 or 2715 will return header information PRINT 1 RQS Off HDR ON GOSUB READ FOR VERBOSE EXIT SUB This routine will se...

Page 213: ... VERBOSE IF LEN rd 14 THEN rd LEFT rd LEN rd 4 strip off checksum semiĆcolon and cr lf rd RIGHT rd LEN rd 9 strip off header and byte count FOR x 0 TO 511 wfm x ASC MID rd x 1 1 convert each binary value to ascii NEXT END IF EXIT SUB This routine will display the error message if RS232 communication cannot be established ERROR DISPLAY save cursor coordinates hold x POS 0 hold y CSRLIN save screen ...

Page 214: ...BLEM LOCATE 19 25 PRINT Verify RS232 Port Configuration LOCATE 20 31 PRINT UTIL MENU 4 0 2 LOCATE 21 22 PRINT STATUS ONLINE BAUD RATE 9600 LOCATE 22 22 PRINT DATA BITS 8 PARITY NONE LOCATE 23 22 PRINT EOL CRLF FLOW CONTROL NONE LOCATE 24 22 PRINT ECHO OFF VERBOSE ON LOCATE 25 27 0 PRINT Press any key to continue DO WHILE INKEY LOOP redisplay original screen hold min 0 max 41 min 0 FOR index 1 TO 8...

Page 215: ...two flags used in reading response from 2714 or 2715 COM 1 ON enable event trapping for communication activity on com port 1 i TIMER DO WHILE end of read N Give 60 seconds for response from event query IF TIMER i 60 THEN If no response assume communication COM 1 OFF not established so set flag to indicate end of read Y this error query Y END IF LOOP begin checking for error flags after return from...

Page 216: ...nd passed in the global string WRT NOTE only SINGLE commands can be sent by the user SUB SENDCOMMAND wrt UCASE wrt FOR IX 20 TO 24 clear out the response window LOCATE IX 8 PRINT STRING 66 NEXT LOCATE 20 8 reposition cursor POSIT1 INSTR wrt all queries end with IF POSIT1 0 THEN if no question mark GOSUB PROCESS ONE COMMAND then one command entered ELSE GOSUB PROCESS ONE QUERY END IF EXIT SUB sendi...

Page 217: ...ve query is different the program distinguishes this query and processes it separately PROCESS ONE QUERY IF LEFT wrt 4 CUR OR LEFT wrt 6 CURVE OR LEFT wrt 5 CURV THEN GOSUB ACQUIRE WAVE ELSE if length of response func 3 is too large to fit in CALL RS232 CALLS the window defined for the IF LEN rd 66 THEN response then use this routine to display it in DO WHILE LEN rd 3 groups small enough to fit GO...

Page 218: ...RVE OR INSTR wrt CURV THEN IF LEN wrt 8 THEN posit INSTR wrt tem wrt LEFT wrt posit wrt tem wrt D END IF ELSEIF LEN wrt 6 THEN posit INSTR wrt tem wrt LEFT wrt posit wrt tem wrt D END IF send the curve query wrt HDR ON wrt insure that hdr is on PRINT 1 wrt read and format the response func 5 CALL RS232 CALLS go display it GOSUB DISPLAY WAVE RETURN Here is an example of a hex waveform being sent to...

Page 219: ...arbitrary target location A B or C can be specified to receive the waveform SEND WAVE will always send to waveform C first make sure save C is on wrt SAV C ON func 3 CALL RS232 CALLS next set the preamble to point to the target waveform C wrt WFM WFI C func 3 CALL RS232 CALLS next construct the waveform to be sent wrt CURVE H0 curve command with argument indicating hex transfer wrt wrt HEX 513 byt...

Page 220: ...eck sum MOD 256 IF check sum 16 THEN wrt wrt 0 END IF wrt wrt HEX check sum finally the waveform is ready to send func 3 CALL RS232 CALLS RETURN display up to 5 lines of response 66 characters per line FRAGMENT RESPONSE display line 1 DO WHILE display line 6 rd1 MID rd 1 66 posit 1 DO WHILE posit 0 posit INSTR rd1 CHR 10 IF posit 0 THEN MID rd1 posit 1 END IF LOOP posit INSTR rd1 CHR 13 IF posit 0...

Page 221: ...P IF LEN rd 3 THEN GOSUB TEMP STOP END IF RETURN DISPLAY WAVE routine to display the data on screen x 20 y 8 FOR IX 0 TO 511 LOCATE x y PRINT wfm IX y y 5 IF y 70 THEN y 8 x x 1 END IF IF x 24 THEN x 20 GOSUB TEMP STOP END IF NEXT RETURN routine invoked to control display of response TEMP STOP COLOR 0 7 LOCATE 25 9 0 PRINT Press Enter to continue the list DO WHILE INKEY CHR 13 LOOPCOLOR 9 9 ...

Page 222: ...Programming 6 24 2714 2715 Programmer Manual FOR indx 20 TO 25 LOCATE indx 8 PRINT STRING 66 CHR 32 NEXT COLOR 14 9 RETURN END SUB ...

Page 223: ... Flow control NONE If the 2714 is not properly configured the program displays an error message Refer to the RS232 command description in Command and Query Defini tions and the RS 232 installation procedure in Introduction To Programming for more information on RS 232 configuration 2 The program generates the terminal display shown in Figure 6 2 A screen prompt instructs the operator to turn off t...

Page 224: ...ins 2714 or 2715 RSĆ232 DEMO PROGRAM executes CATV XMOD command TABLE STD CHANNEL 8 DATE 13ĆMARĆ92 TIME 15 23 46 SITE PORTLAND OPERATOR TECHNICIAN 1 CROSSĆMOD Ć23 1 Figure 6 3 Terminal Display of CATV XMOD Test Results The program declares the following procedures CROSS MOD This procedure executes the CATV cross modulation command CATV XMOD and then sends an EVEnt query A screen prompt is generate...

Page 225: ... the 2714 or 2715 is displaying a menu when the program is executed it will not run properly This is an example of a program that sends and processes a command that pauses the operation of the 2714 or 2715 The CATV XMOD command is sent which performs the crossĆmodulation function The 2714 or 2715 will pause and wait for you to press the Enter key When Enter is pressed signifying that the source of...

Page 226: ...ication key ON COM 1 GOSUB READ BUFFER select device func 1 CALL RS232 CALLS call crossĆmod routine CALL CROSS MOD RERUN TEST LOCATE 20 10 PRINT Press Enter to rerun program or Esc to end WHILE INKEY WEND DO WHILE INKEY CHR 13 LOOP CALL CROSS MOD GOTO RERUN TEST END PROGRAM COLOR 7 0 CLS END read routine for RS232 branched from RS232 CALLS subprogram ...

Page 227: ...old i 15 ELSE 10 seconds will be enough for others hold i 10 END IF i TIMER initialize counter and DO WHILE TIMER i hold i try to read for time alloted to make sure GOSUB READ INPUT controller is just not too IF end of read Y THEN fast for 2714 or 2715 i 0 END IF LOOP end of read Y set flag to avoid possible endless loop in RS232 calls RETURN READ INPUT buffer N initialize flag to indicate that re...

Page 228: ...er flag ON to END IF indicate successful read END IF ELSE IF LEN RD 523 THEN insure have read past binary data IF INSTR 524 RD CHR 13 THEN before checking for cr lf IF INSTR 525 RD CHR 10 THEN end of read Y buffer Y set buffer flag on END IF END IF END IF END IF RETURN This submodule executes the CATV crossĆmodulation command CATV XMOD and does an EVENT query When event 403 is received a message i...

Page 229: ...tion LOCATE 11 10 PRINT Press Enter to continue WHILE INKEY WEND DO WHILE INKEY CHR 13 LOOP LOCATE 10 10 Clear PRINT STRING 70 the LOCATE 11 10 prompt PRINT STRING 70 message LOCATE 10 10 PRINT Running CrossĆModulation Test wrt CONT CATV FULLXMOD query the results func 3 from the CALL RS232 CALLS crossĆmodulation LOCATE 15 10 GOSUB PRINT RESPONSE ELSE display error message END IF EXIT SUB PRINT RE...

Page 230: ...1 extract date PRINT DATE DAT RD MID RD TERM 1 TERM INSTR RD TIM MID RD 1 TERM 2 extract time PRINT TIME TIM RD MID RD TERM 1 TERM INSTR RD SITE MID RD 2 TERM 3 extract site name PRINT SITE SITE RD MID RD TERM 2 TERM INSTR RD OPER MID RD 1 TERM 2 extract operator name PRINT OPERATOR OPER RD MID RD TERM 1 TERM INSTR RD XMOD MID RD 1 TERM 1 extract crossmod value PRINT CROSS MOD XMOD RETURN END SUB ...

Page 231: ... of stop bits EOL CRLF carriage return line feed as terminator FLOW CONTROL NONE no handshaking ECHO OFF only needed for terminal emulation VERBOSE ON guarantees a response for each communication If the 2714 or 2715 has not been configured to agree with the above parameters the program will display an error message and force the user to change the 2714 or 2715 Program will not execute otherwise CS...

Page 232: ...B get line control register COM1 lc status lc status AND NOT 64 reset the break bit OUT H3FB lc status send the modified register contents back now continue with verification of the comm port set up PRINT 1 RS232 VERBOSE ON GOSUB READ FOR VERBOSE IF read error 1 THEN GOTO SELECT DEVICE END IF PRINT 1 rs232 ECHO OFF GOSUB READ FOR VERBOSE IF read error 1 THEN GOTO SELECT DEVICE END IF PRINT 1 RS232...

Page 233: ...mation PRINT 1 RQS Off HDR ON GOSUB READ FOR VERBOSE EXIT SUB This routine will send the command string and read the response SEND MESSAGE TO DEVICE PRINT 1 wrt begin read loop for response from 2714 or 2715 GOSUB READ FOR VERBOSE EXIT SUB This routine will read the 2714 or 2715 response to get a binary waveform GET BINARY WAVEFORM GOSUB READ FOR VERBOSE IF LEN RD 14 THEN RD LEFT RD LEN RD 4 strip...

Page 234: ...isplay the error message if RS232 communication cannot be established ERROR DISPLAY save cursor coordinates hold x POS 0 hold y CSRLIN save screen image REDIM before 7 41 colr 7 41 FOR p 0 TO 7 FOR q 0 TO 41 colr p q SCREEN p 18 q 20 1 before p q CHR SCREEN p 18 q 20 NEXT q NEXT p next print the window and the error message COLOR 14 6 FOR z 18 TO 25 LOCATE z 20 0 PRINT STRING 42 CHR 32 NEXT LOCATE...

Page 235: ... ECHO OFF VERBOSE ON first clear input key buffer WHILE INKEY WEND LOCATE 25 21 0 now wait for user input PRINT Press enter to continue or esc to end DO WHILE INKEY LOOP redisplay original screen hold min 0 max 41 min 0 FOR index 1 TO 8 FOR p 0 TO 7 FOR q min TO max STEP 7 frgrnd colr p q MOD 16 bckgrnd colr p q frgrnd 16 MOD 128 COLOR frgrnd bckgrnd LOCATE p 18 q 20 PRINT before p q NEXT q NEXT p...

Page 236: ...conds for response from event IF TIMER i 60 THEN query If no response assume communication COM 1 OFF not established so set flag to indicate end of read Y this error query Y END IF LOOP begin checking for error flags after return from read IF error query Y THEN no communication established GOSUB ERROR DISPLAY display error read error 1 set error flag CLOSE 1 close comm port ELSEIF buffer Y THEN GO...

Page 237: ...LRMenu clears the current menu from the display H KEY returns the identity of the last key pressed H CLRKey clears pending key presses The syntax and use of these commands including side effects are described in Command and Query Definitions Figure 6 4 shows a test menu that could be defined by a user This example shows how different types of actions can be implemented by selecting the menu comman...

Page 238: ...of this command Item 0 on the remote menu of Figure 6 4 is the simplest type of entry The desired action is instrument initialization and an exit from the menu when the operator presses the 0 key on the spectrum analyzer s front panel Keypad This is accomplished by the following algorithm executing on either the Tektronix 2402A TekMate or a controller H Do KEY queries until the result is not NULL ...

Page 239: ...sponse to this prompt The terminator key signals the 2402A TekMate or PC when the numeric entry is finished and also specifies the units The 2402A TekMate then programs the value into the instrument or it may use the entry as a parameter for itself as outlined in the following algorithm H Do KEY queries until the result is not NULL H If M1 is returned key 1 has been pressed execute the following c...

Page 240: ...NU L15 ENTER REF LEVEL VAL _ H Loop until the whole number has been entered and a terminator has been detected For example if the keys 1 5 and 7 are pressed the menu display will appear as shown in Figure 6 6 When a terminator key is pressed the program must respond by setting the reference level using the REF command REF 15 7 DBM CLRMENU The CLRMENU command automatically exits the menu If desired...

Page 241: ...CE TESTS DEFMENU L4 1 TEST 1 DEFMENU L5 2 TEST 2 DEFMENU L9 8 TEST 8 DEFMENU L16 PREVIOUS MENU The resulting menu is shown in Figure 6 7 Note that the 2714 or 2715 does not understand a nested menu structure The nesting structure is maintained by the application program running on the controller The application program also implements the Backspace BKSP key to return to a higher menu level as with...

Page 242: ...ry GPIB information See Preparing the Software on page 1 10 for the procedure A BASIC or QuickBASIC program usually begins with a list of declarations This establishes variable types and the names of global variables Several variable names are used by the National Instruments software To prevent any confusion National Instruments supplies a program file that declares these variables for you Place ...

Page 243: ... name is reserved IBSTA Integer variable updated by all GPIB system software functions Refer to Status Byte on page 5 11 NUMBYT Integer argument of DEBLK which indicates the number of bytes converted Any integer variable name can be used MYNUM INTEG etc RD String variable used with the IBDR function to contain the data returned by the 2714 or 2715 Other names can be used such as RET DAT MYDAT S1 e...

Page 244: ...y occur on instruments equipped with either the GPIB or RS 232 interface DOS errors typically happen when trying to access a device that is missing or not ready They are traditionally handled with the BASIC ON ERROR statement Following the declarations at the head of the program you must add this line ON ERROR GOTO ERR TRAP Next you should construct a subroutine to deal with the problem This routi...

Page 245: ...PIB ERR IF IBSTA 32768 THEN RETURN PRINT GPIB ERROR HAS OCCURRED PRINT GPIB ERROR CODE IS IBERR END RETURN A third type of error involves those directly related to the 2714 or 2715 or its interface with the bus Any time the 2714 or 2715 detects an abnormal condition it issues a service request SRQ if RQS is set to ON The SRQ causes the GPIB board to generate a light pen interrupt Abnormal events c...

Page 246: ...ME Open device indicated by BDNAME and return unit descriptor BD IBRD BD RD Read data from BD to string RD IBRDF BD FILENAME Read data from device BD and store to disk in file named FILENAME IBRDI BD CUR CNT Read CNT data bytes from device BD into integer array CUR IBRSP BD SPR Perform serial poll of device BD IBSRE BD V Enable disable remote mode in the device indicated by BD V 0 disables IBWRT B...

Page 247: ... in a 2714 or 2715 waveform see Command and Query Definitions for CURve response formats Before curve data is transferred you must specify which digital display register A B C or D the curve is coming from or going to and the type of data encoding to be used The encoding ASCII encoded decimal ASCII encoded hexadecimal or binary is determined by the waveform preamble see the WFMpre command The dest...

Page 248: ...ODING AND DESTINATION REGISTER SAVE THE REGISTER WRT WFMPRE WFID A ENCDG ASCII SAVE A ON CALL IBWRT BD WRT TRIM CURVE DATA AND SEND IT CURVE COMMAND HEADER IS INCLUDED IN RD WRT MID RD 1 IBCNT CALL IBWRT BD WRT RETURN The curves transferred to the spectrum analyzer in these examples are the previously returned waveforms but you can also send artificially generated curves Such curves can be generat...

Page 249: ... and Query Definitions The files are created within the spectrum analyzer s memory only as required That is a BSET03 file exists only if the B register settings have been previously saved in the third storage location The currently created files can be viewed by pressing the key sequence UTIL MENU 4 6 NOTE The 2714 or 2715 must have a spectral display on its screen when any RS 232 or GPIB program ...

Page 250: ...on can be circumvented by inserting this line at the beginning of PUT FILE MID FILEDAT 1 FILE new filename These subroutines do not store or retrieve the files to and from disk This can be done with the usual BASIC OPEN PRINT and INPUT statements Alternative ly you can use the National Instruments IBWRTF and IBRDF calls to transfer data directly between the spectrum analyzer and disk Example 6 5 i...

Page 251: ...ng screen plot data from the 2714 or 2715 using the PLOT query It does not store the data on disk you can add that capability if desired but holds the data in memory as the string variable PLOT DAT The length of the string required depends on the display acquisition mode the plotter type and the number of registers displayed 12 kbyte of memory is enough for a single sweep in PEAK acquisition mode ...

Page 252: ...t Return Get data from instrument 1 and store Get data from 2714 using Plot query and store Get data from instrument N and store Enough data Data Acquisition Routines Do it Do it No No No No Yes Yes Yes Yes Figure 6 8 Possible Data Acquisition Scheme ...

Page 253: ...se readouts to the computer This query does not return the 2714 or 2715 s general purpose message line the GPIB status line or the user defined DIS PLAY MESSAGE line The PRDouts query does return the PRDOUTS header if HDR is on and up to 14 arguments depending on the spectrum analyzer s mode of operation and its current status The arguments are listed in Command and Query Definitions under PRDouts...

Page 254: ...O NUMBER OF BYTES TRANSFERRED PLOT DAT MID PLOT DAT 1 IBCNT RETURN SEND PLOT DISABLES TIME OUT TO GIVE PLOTTER TIME TO FINISH CALL IBTMO BD 0 CLS SEND SCREEN DATA TO PLOTTER PLOTTER HC100 CALL IBFIND PL PLOTTER CALL IBWRT PL PLOT DAT PRESS A KEY AFTER PLOTTER FINISHES PRINT PRESS ANY KEY TO CONTINUE DO WHILE INKEY LOOP REESTABLISHES 30ĆSECOND TIME OUT CALL IBTMO BD 14 RETURN NOTE The 2714 or 2715 ...

Page 255: ...se the SET header is always suppressed in the response the response can be transmitted as received The SET query is generally used in preference to settings file transfers for several reasons H The same command and format can be used with a variety of Tektronix instruments for the same purpose H The 2714 or 2715 implements the retransmitted settings as soon as received rather than requiring a sepa...

Page 256: ...UTE DISKFILE NAME THAT YOU WANT TO STORE SETTINGS UNDER FOR FILENAME OPEN O 1 FILENAME PRINT 1 SETTINGS CLOSE 1 RETURN PUT SET OPEN THE DISK FILE AND READ IN THE STORED SETTINGS OPEN I 1 FILENAME INPUT 1 SETTINGS CLOSE 1 DISPLAY THE SETTINGS FOR VERIFICATION PURPOSES PRINT SETTINGS SEND THE SETTINGS TO THE 2714 or 2715 WRT SETTINGS CALL IBWRT BD WRT RETURN A number of 2714 or 2715 functions requir...

Page 257: ... execution NOTE The 2714 or 2715 must have a spectral display on its screen when any RS 232 or GPIB program is executed If the 2714 or 2715 is displaying a menu when a program is executed the program will not run properly program segment to demonstrate the use of the WAIT command set up for auto polling PEN OFF ON PEN GOSUB serial poll PEN ON use only waveform A and place instrument in single swee...

Page 258: ...se the waveform saved in A to subtract from what is displayed in C wrt VIEW A ON VIEW B OFF VIEW C ON VIEW D OFF VIEW MINUĆ SA ON CALL IBWRT bd wrt wrt SIGSWP WAIT CALL IBWRT bd wrt wait here until end of sweep before continuing END OF SWEEP N DO WHILE END OF SWEEP N LOOP now reset the analyzer and view the C register which contains the difference between what is saved in A and what is actively di...

Page 259: ...l operations to be performed NOTE The 2714 or 2715 must have a spectral display on its screen when any RS 232 or GPIB program is executed If the 2714 or 2715 is displaying a menu when a program is executed the program will not run properly COMM2714 or 2715 program to communicate with a Tektronix 2714 or 2715 Spectrum Analyzer via the GPIB declare GPIB system software reserved variables REM INCLUDE...

Page 260: ...ERR TRAP generate the menu MENU CLS PRINT F1 SEND COMMAND OR QUERY PRINT PRINT F2 SAVE CURRENT SETTINGS TO FILE PRINT PRINT F3 RESTORE SETTINGS PRINT PRINT F4 SAVE AN INSTRUMENT FILE PRINT PRINT F5 RESTORE AN INSTRUMENT FILE PRINT PRINT F6 ACQUIRE CURVE DATA PRINT PRINT F10 EXIT PRINT PRINT PRESS F1ĆF6 OR F10 TO MAKE SELECTION PRINT chk keyboard for keypress decode and branch to correct subroutine...

Page 261: ...U regenerates the menu subroutine to send a command or query and receive the response SEND RCV CLS PRINT PRINT ENTER MESSAGE TO SEND PRINT INPUT wrt CALL ibwrt bd wrt GOSUB GPIB ERR hold time TIMER slight delay srq check DO WHILE TIMER hold time 1 LOOP QUES INSTR 1 wrt if ques 0 there is no response IF QUES 0 THEN GOTO SEND RCV if message contains get response and print it CALL IBRD bd RD GOSUB GP...

Page 262: ...RETURN store if everything OPEN O 1 FILENAME IBCNT looks OK PRINT 1 SETTINGS CLOSE 1 RETURN subroutine to restore a group of instrument settings from disk to the 2714 or 2715 RES SET CLS PRINT PRINT ENTER NAME OF SETTINGS FILE PRINT INPUT FILENAME OPEN I 1 FILENAME read settings file INPUT 1 SETTINGS CLOSE 1 PRINT PRINT SETTINGS INPUT OK TO RESTORE ENTER Y OR N Y IF Y N THEN RETURN if displayed se...

Page 263: ...contains the name of RETURN the 2714 or 2715 file to be restored subroutine to fetch curve data in packed binary form and convert it to 2Ćbyte integer format INT CUR PRINT PRINT GET CURVE FROM WHICH REGISTER INPUT ENTER A B C OR D REG PRINT ensure response header is on CALL IBWRT BD HDR ON GOSUB GPIB ERR tell 2714 or 2715 which register and encoding to use WRT WFMPRE WFID REG ENCDG BINBLK CALL IBW...

Page 264: ... to obtain status byte see your GPIB documentation for more information SERIAL POLL read and print status byte reset SRQ CALL IBRSP BD SPR PRINT STATUS BYTE SPR RETURN Subroutine to find event code using the EVE query result valid only after serial poll if RQS is ON EVENT FIND PRINT EVENT CODE S IS WRT HDR OFF EVE turn off header and event code SPACE 5 request event code CALL IBWRT BD WRT send com...

Page 265: ...rammer Manual 6 67 PRINT CHECK YOUR SYSTEM AND RESTART END RETURN subroutine to end program gracefully on DOS error ERR TRAP CLS PRINT PRINT DOS ERROR HAS OCCURRED PRINT PRINT PRINT CHECK YOUR SYSTEM AND RESTART END RESUME NEXT ...

Page 266: ...Programming 6 68 2714 2715 Programmer Manual ...

Page 267: ...Appendices ...

Page 268: ......

Page 269: ...troduction To RS 232 Communications RS 232 communications follow a set of electrical mechanical and protocol standards that are similar to the more familiar IEEE 488 1 GPIB standards Many types of devices are designed to communicate according to specifications contained in standard EIA Std RS 232 C The RS 232 interface is NOT a bus GPIB is a bus Therefore only one device can be connected at a time...

Page 270: ...an also add one other optional bit before the stop bit called the parity bit The parity bit if used provides another check for transmis sion errors If ODD parity is used the interface sets this bit to 1 if the 8 bit character consists of an even number of 1 bits Otherwise the parity bit would be set to 0 If parity is EVEN the interface sets the parity bit to 0 if the 8 bit character consists of an...

Page 271: ...end Output 8 CTS Clear to send Input 9 not used Check which type of connector your PC interface card has and refer to the following tables and illustrations to determine which type of cable you need H 9 pin Female to 9 pin Female Null Modem Cable Table A 2 and Figure A 3 show the wiring configuration for this type of cable A cable with this configuration is available as an optional accessory Refer...

Page 272: ...5 To PC Figure A 3 9 pin Female to 9 pin Female Null Modem Cable H 9 pin Female to 25 pin Female Null Modem Cable Table A 3 and Figure A 4 show the wiring configuration for this type of cable A cable with this configuration is available as an optional accessory Refer to the 2714 or 2715 Spectrum Analyzer User Manual for the part number NOTE Pins 1 and 8 are connected together on the 9 pin female c...

Page 273: ...signal Pin signal 1 8 DCD CTS to 4 RTS 2 RXD to 2 TXD 3 TXD to 3 RXD 4 DTR to 6 DSR 5 GND to 7 GND 6 DSR to 20 DTR 7 RTS to 5 8 CTS DCD 8 see pin 1 9 not used 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 9 Pin Female 25 Pin Female 25 To 2714 or 2715 To PC Figure A 4 9 pin Female to 25 pin Female Null Modem Cable ...

Page 274: ...ctrum Analyzer User Manual for the part number Table A 4 9 pin Femaleto25 pin Male Extension Cable 9 pin Female to 25 pin Male Pin signal Pin signal 1 DCD to 8 DCD 2 RXD to 3 RXD 3 TXD to 2 TXD 4 DTR to 20 DTR 5 GND to 7 GND 6 DSR to 6 DSR 7 RTS to 4 RTS 8 CTS to 5 CTS 9 not used 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 9 Pin Female 25 Pin Male 25 To PC or M...

Page 275: ...ion The following documents include the RS 232 standard and Mastering Serial Communications written primarily for programmers EIA Standard RS 232 C August 1969 EIA Standard RS 232 D January 1987 Mastering Serial Communications by Peter W Gofton RS 232 Made Easy by Martin D Seyer ...

Page 276: ...Appendix A RS 232 Concepts A 8 2714 2715 Programmer Manual ...

Page 277: ...vice dependent Operational elements state the way in which each instrument reacts to a signal on the bus Mechanical Elements The IEEE Std 488 1 defines the GPIB connector and cable assembly as the mechanical elements of the instrumentation system Standardizing the connector and cable assembly ensures that GPIB compatible instruments can be physically linked together with complete pin compatibility...

Page 278: ...onnector nodes on the bus are based on TTL technology The power source is not to exceed 5 25 V referenced to logic ground The standard defines the logic levels as follows H Logical 1 is a true state low voltage level 0 8 V signal line is asserted H Logical 0 is a false state high voltage level 2 0 V signal line not asserted Messages can be sent over the GPIB as either active true or passive true s...

Page 279: ...r LE Service Request SR Remote Local RL Parallel Poll PP Device Clear DC Device Trigger DT Controller C Note that while the IEEE Std 488 1 standard defines the ten interface functions the specific protocol and timing relationships not every instrument on the bus will have all ten interface functions incorporated Only those functions important to a particular instrument s purpose need to be impleme...

Page 280: ...least two thirds of the instruments connected directly to the bus must be in the power on state Instrument A able to control talk listen Controller Instrument B talk and listen Digital Voltmeter Instrument C listen only Signal Generator Instrument D talk only Counter Data Bus 8 Signal Lines Transfer Bus Handshake 3 Signal Lines Interface Management Bus 5 Signal Lines DIO1 DIO8 Data Input Output Li...

Page 281: ...l only when it is directed to do so by the system controller The system controller may be but is not necessarily the controller in charge of the bus Interface Control Messages The two types of interface control messages are multi line messages sent over the data bus and uni line messages A message that shares a group of signal lines with other messages in some mutually exclusive set is called a mu...

Page 282: ...sage The standard recommends that the alphanumeric codes associated with the numbers symbols and uppercase characters decimal 32 to decimal 94 in the ASCII Code Chart Table B 4 be used to compose device dependent messages One example of a device dependent message could be the following ASCII character string that controls the signal generator from Figure B 2 MODE V VOLTS 2 5E 3 FREQ 1 0E3 The ASCI...

Page 283: ... Trigger DT GTL Go To Local RL IFC Interface Clear C L LE T TE LLO Local Lockout RL MSA My Secondary Address LE TE MTA My Talk Address T TE PPC Parallel Poll Configure PP PPD Parallel Poll Disable PP PPE Parallel Poll Enable PP PPU Parallel Poll Unconfigure PP REN Remote Enable RL RFD Ready For Data SH SDC Selected Device Clear DC SPD Serial Poll Disable T TE SPE Serial Poll Enable T TE SRQ Servic...

Page 284: ...al via C IFC Interface Clear C LLO Local Lockout via C MSA My Secondary Address via C MTA My Talk Address via C PPC Parallel Poll Configure via C PPD Parallel Poll Disable via C PPE Parallel Poll Enable via C PPU Parallel Poll Unconfigure via C REN Remote Enable C RFD Ready For Data AH SDC Selected Device Clear via C SPD Serial Poll Disable via C SPE Serial Poll Enable via C SRQ Service Request SR...

Page 285: ... 3 19 3 3 C 19 S SDC 4 DCL 4 20 4 20 4 4 D 20 T PPC 1 PPU 5 21 5 21 5 5 E 21 U 39 6 22 6 22 6 6 F 22 V 4 7 23 7 23 7 7 G 23 W GET 3 SPE 8 24 8 24 8 8 H 24 X TCT 4 SPD 9 25 9 25 9 9 I 25 Y 35 10 26 10 26 10 J 26 Z 64 3 11 27 11 27 11 K 27 3 12 28 12 28 12 L 28 2 3 13 29 13 29 13 M 29 3 23 14 30 14 30 14 N 30 3 53 15 UNL 15 UNT 15 O DEL RUBOUT REF ANSI STD X3 4 1977 IEEE STD 488 1 1987 ISO STD 646 2...

Page 286: ...bit parallel fashion Since the handshake sequence is an asynchronous operation no clock signal on the bus the data transfer rate is only as fast as the slowest instrument involved in a data byte transfer A talker cannot place data bytes on the bus faster than the slowest listener can accept them Figure B 3 illustrates the flow of data bytes on the bus when a typical controller sends ASCII data to ...

Page 287: ...ata Byte Traffic To complete the sequence the controller activates the ATN line again and sends the universal Unlisten UNL and Untalk UNT commands to clear the bus Six handshake cycles on the data transfer control bus are required to send the six data bytes Each time a data byte is transferred over the data bus an enabled talker and all enabled listeners execute a handshake sequence via signal lin...

Page 288: ...Data An asserted NRFD signal line indicates one or more of the assigned listeners are not ready to receive the next data byte from the talker When all of the assigned listeners for a particular data byte transfer have released NRFD the NRFD line becomes unasserted high When NRFD goes high the RFD message Ready For Data tells the talker it may place the next data byte on the data bus NDAC Not Data ...

Page 289: ... unasserted only those instruments enabled as a talker and listener can send and receive data over the bus Any instrument connected to the bus can request the controller s attention by asserting the SRQ line The controller responds by asserting ATN and executing a serial poll routine to determine which instrument is requesting service The instrument requesting service responds with a device depend...

Page 290: ...t the Parallel Poll PP function if the instrument can respond to a serial polling sequence from the controller in charge of the GPIB system The interface functions and their relationship to the interface control messages in Table B 4 are discussed below All interface control messages discussed are sent and received over the GPIB when the ATN line is asserted low The RL function provides an instrum...

Page 291: ...d from the controller in charge The instrument will stop talking and listen any time the controller in charge asserts ATN One or more instruments on the bus can be programmed for the L Listener function by using their specific primary listen address called MLA Some of the instruments interfaced to the bus may be programmed for the LE Listener Extended function if implemented The LE function requir...

Page 292: ...ted Device Clear command When the DCL message is received all instruments on the bus must clear or initialize their internal device functions When the controller sends the SDC command only those instruments that have been previously addressed to listen must respond The IEEE 488 1 standard does not specify the settings an instrument must go to as a result of receiving the DCL or SDC command In gene...

Page 293: ...e execution time for parallel polling instruments on the bus cannot be less than 2 ms If the controller is in the controller active wait state and does not receive an internal message to conduct a parallel poll it must wait for at least 1 5 ms before going to the controller active state This delay gives the NRFD NDAC and EOI lines sufficient time to assume their valid states The controller also re...

Page 294: ...tion provides an instrument with the capability to present one and only one bit of status information to the controller without being previously addressed to talk The parallel polling capability requires a commitment by the system program to periodically conduct a parallel poll sequence When an instrument responds to a parallel poll the single data bit presented to the controller may or may not in...

Page 295: ... controller then reads data bus lines while ATN and EOI are asserted to interpret the status of all selected instruments To conclude the parallel poll the controller releases EOI and then ATN The instrument s does not need to be configured for each subsequent parallel poll The PPU Parallel Poll Unconfigure command will clear all device configura tions and prevent them from responding to future pol...

Page 296: ...Appendix B GPIB System Concepts B 20 2714 2715 Programmer Manual ...

Page 297: ...Index ...

Page 298: ......

Page 299: ...command 4 1 argument query 4 2 ATBI 4 4 ATHrhld 4 5 AVDest 4 5 AVDest 4 5 AVG 4 6 AVG 4 6 AVMode 4 6 AVMode 4 6 AVNum 4 7 AVNum 4 7 B BWMode 4 7 BWMode 4 7 BWNum 4 8 BWNum 4 8 BWResult 4 8 C cable television system commands CATv 4 9 CATv 4 15 CONTinue 4 21 CSInt 4 23 CSInt 4 23 CSNorm 4 23 CSNorm 4 23 CSRFreq 4 23 CSRFreq 4 24 4 42 CTDefault 4 24 FCMode 4 34 FCMode 4 34 ICDefault 4 42 ICFreq 4 42 ...

Page 300: ...nds CURve 4 24 CURve 4 27 WAVfrm 4 89 WFMpre 4 89 WFMpre 4 90 curve transfer 6 49 CURve 4 27 D data plotting 6 52 DATe 4 27 DATe 4 28 DATIme 4 28 DEFMenu 4 28 demodulation commands menu DETector 4 29 DETector 4 29 VDMode 4 82 VDMode 4 82 VMOnitor 4 86 VMOnitor 4 86 VPOlarity 4 86 VPOlarity 4 87 VSYnc 4 88 VSYnc 4 88 DETector 4 29 DETector 4 29 DIR 4 29 DIScor 4 30 DIScor 4 30 display commands menu...

Page 301: ... 4 21 FREq 4 39 FREq 4 39 MARker 4 47 MARker 4 47 MFReq 4 48 MFReq 4 48 MLFtnxt 4 49 MMAx 4 49 MRGTnxt 4 51 MSTep 4 51 PSTep 4 60 SGTrak 4 70 SGTrak 4 70 TUNe 4 80 frequency span div and ref level commands front panel CATV CHAn 4 9 4 10 FINe 4 38 FINe 4 38 FREQ 4 39 FREQ 4 39 MXSpn 4 53 MXSpn 4 53 REFlvl 4 62 REFlvl 4 62 SPAn 4 71 SPAn 4 71 ZERosp 4 92 ZERosp 4 92 front panel commands DISPLAY STOR...

Page 302: ...T 4 43 input commands menu ARFatt 4 4 ARFatt 4 4 ATBI 4 4 CALsig 4 8 CALsig 4 8 MXRlvl 4 52 MXRlvl 4 53 PREamp 4 60 PREamp 4 60 RFAtt 4 63 RFAtt 4 63 RLUnit 4 63 RLUnit 4 64 ROFset 4 64 ROFset 4 64 ROMode 4 65 ROMode 4 65 VMAnttbl 4 84 VMAnttbl 4 85 VMDEst 4 85 VMDEst 4 85 VMDIst 4 85 VMDIst 4 85 VMMkrunit 4 86 VMMkrunit 4 86 K KEY 4 43 KEY 4 46 L LRAmpl 4 46 M MAMpl 4 46 MARker 4 47 marker and fr...

Page 303: ... link 2 6 argument number 2 5 argument string 2 6 command 2 3 digit 2 4 header delimiter 2 4 input message 2 2 message terminator GPIB 2 3 message terminator RS 232 2 3 message unit 2 2 message unit delimiter 2 3 mnemonic or header 2 4 output message 2 2 query 2 4 response 2 4 units 2 5 message instrument specific definition 2 1 MEXchg 4 47 MFReq 4 48 MFReq 4 48 MHDest 4 48 MHDest 4 48 miscellaneo...

Page 304: ...4 ROFset 4 64 ROMode 4 65 ROMode 4 65 RQS 4 65 RQS 4 65 RS 232 typical configurations 1 3 RS232 4 66 RS 232 concepts A 1 RS 232 error reporting event codes list of 5 3 parity framing and overrun errors 5 3 reporting and clearing errors 5 2 VERBOSE mode 5 2 RS 232 operation 1 1 baud rate 1 6 configuring the spectrum analyzer 1 5 data bits number of 1 7 data flow control 1 7 ECHO mode selecting 1 8 ...

Page 305: ...de 4 77 VFEnab 4 82 VFEnab 4 82 sweep and trigger commands menu TIMe 4 76 TIMe 4 77 TIMMode 4 77 TIMMode 4 77 TRIgger 4 79 TRIgger 4 79 TVLine 4 80 TVLine 4 80 TVLMode 4 80 TVLMode 4 81 TVLstd 4 81 TVLstd 4 81 VSYnc 4 88 VSYnc 4 88 system software GPIB 6 48 system related commands EOS 4 33 EOS 4 33 ERR 4 34 EVEnt 4 34 GTL 4 40 HDR 4 40 HDR 4 41 HELp 4 41 MSGdlm 4 51 MSGdlm 4 51 RQS 4 65 RQS 4 65 R...

Page 306: ...FMode 4 83 VIDflt 4 83 VIDflt 4 83 V VDMode 4 82 VDMode 4 82 vertical scale plot and readout commands front panel PLOT 4 58 REDout 4 61 REDout 4 62 VRTdsp 4 87 VRTdsp 4 87 VFEnab 4 82 VFEnab 4 82 VFMode 4 83 VFMode 4 83 VIDflt 4 83 VIDflt 4 83 VIEw 4 84 VIEw Minusa 4 84 VIEw 4 84 VIEw Minusa 4 84 VMAnttbl 4 84 VMAnttbl 4 85 VMDEst 4 85 VMDEst 4 85 VMDIst 4 85 VMDIst 4 85 VMMkrunit 4 86 VMMkrunit 4...

Page 307: ......

Page 308: ......

Reviews: