Home

Tektronix Wireless Office Headset 2711 User's Manual

image

Contents

1. Header Function ATHrhid Turn the auto threshold on and off ATHrhid ts the auto threshold on or off FREq CENsig Set frequency to the marker frequency CFSF Select center or start frequency CFSF Is center or start frequency being used CNTtrak Turn counter on and off during signal track 1 SPAn CNTtrak Je counter on or off during signal track 1 CREs Set the counter resolution 1 CREs What is the counter resolution 1 FOFfset Set the frequency offset HEEM E FOFfset What is the frequency offset SE E FOMode Turn frequency offset mode on and off 2 FOMode Is frequency offset mode on or off HRAmp Move the marker to next higher amplitude peak EE LRAmpl Move the marker to the next lower amplitude peak PEROS EMAX oe S MAMpI What is the amplitude of either or both markers Si W ss E 6 MEXchg Exchange markers f gt E f E MKTime Set the marker time in zero span mode GE z E MKTime Whatis the time of either or both markers MTUNE Change marker frequency by a specified amount Ke MPOs What is the hor position of either or both markers coe Nap SES FINe MVPos What is the vert position of either or both markers STEp Set the frequency increment step size STEp What is the frequency increment step size Header Function STPinc Set the type of frequency increment Selects 1 dB or 10 dB reference level steps STPinc What type of frequency increment is being used FINe Is the reference level step 1 dB or 10
2. DMOD TG MENU 3 22 0 OFF 1 AM DEMODULATOR 2 FM DEMODULATOR 3 BROADCAST AM VIDEO VMOnitor 4 TRACKING GENERATOR OFF TGEnab 5 TG FIXED LEVEL TGLevel 6 TG VARIABLE LEVEL OFF TGMan 7 TG TRACKING OFF TGTMode TGTRack 8 TG EXT ATTEN AMP TGOMode TGOOffset 9 VIDEO SETUP MENU l 0 VIDEO DETECT MODE BROADCAST VDMode 1 SYNC POLARITY POSITIVE VSYnc 2 VIDEO POLARITY NEGATIVE VPOlarity DETector 1 Only available with Option 04 Tracking Generator 2 Only avallable with Option 10 Video Monitor SE Se E SE 2711 amp 2712 Programmer Manual ee Function Turn on select which audio detector is used Which audio detector is being used DETector DETector TGEnab Turns the tracking generator on and off TGEnab ls the tracking generator on or off TGLevel Sets the tracking generator output level TGLevel What is the tracking generator output level TGMan Enables and disables manual contro of tracking gen TGMan Is manual tracking gen control enabled or disabled TGOMode Turn tracking generator output level offset on or off TGOMode ls tracking generator output level offset on or off TGOOffset Sets the tracking generator output level offset TGOOffset What is the tracking generator output level offset TGTMode Turns the tracking generator tracking on and ot TGTMode ts the tracking generator tracking on or off TGTRack Sets the trackin
3. tem 2 of the RS 232 PORT CONFIGURATION Menu DATA BITS selects the number of data bits sent per character This is either seven or elght Eight bits must be selected for binary transfers Press 2 on the KEYPAD to choose between seven or eight data bits 1 24 a me Setting Parity item 3 of the RS 232 PORT CONFIGURATION Menu PARITY determines whether odd or even parity is used for data checking or it selects no parity checking Default is NONE To change the PARITY selection repeatedly press 3 on the KEYPAD until ODD EVEN or NONE is displayed Setting the Message Terminator ttem 4 of the RS 232 PORT CONFIGURATION Menu EOL selects the EOL end of line indicator used to terminate messages sent over the spectrum analyzer s RS 232 interface The terminator can be CR carriage return ASCII 13 LF line feed ASCII 10 or CR LF carriage return followed by line feed To change the EOL status selection repeatedly press 4 on the KEYPAD until CR LF or CRLF is displayed When a controller sends data the spectrum analyzer interprets either CR or LF as a terminator independent of the setting Selecting a Data Flow Contro Method tem 5 of the RS 232 PORT CONFIGURATION Menu FLOW CONTROL selects between three flow contro methods SOFT HARD or NONE An explanation of each follows SOFT When the spectrum analyzer sends data through the interface and soft flow contro is enabled CTRL S ASCII 19
4. FOFfset lt arg gt a TS 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 the display and any subsequent FREq MFReq STStop sSBegin and SSEnd commands FoFfset 5 15 Giz for example FOFfset Arguments None This simple query returns the value of the frequency offset in Hertz Zero is returned if the frequency offset is disabled FOF fset FOFfset 0 FOFfset 5 15E 9 for example 4 29 2711 amp 2712 Programmer Manual FOMode lt arg gt Arguments ON OFF This single argument command turns frequency offset on or off When frequency offset is enabled the last offset frequency value is used see Forfset When enabled the value of the frequency offset affects the display and any subsequent FREq MFReq STStop SSBegin and SSEnd commands FOMode ON FOMode OFF FOMode Arguments None This simple query returns the current on off status of the frequency offset mode FOMcde FOMODE OFF FOMODE ON FREq lt arg gt Arguments frequency in the range 10 Hz to 1 8 GHz This single argument command sets the center or start frequency to the indicated value Frequency units may be appended otherwi
5. CUR OR_ LEFTS wrt 5 CURVE THEN GOSUB SEND WAVE 6 47 2711 amp 2712 Programmer Manual ELSE func 3 else send all other CALL RS232 CALLS commands the same way rd LEFT rd LEN rd 2 PRINT rd END IF RETURN UK KKK KK KKK KEK I KKK AIK KE ERE RE KERIKERI KERIKERI since receiving a response from a curve query is different the program distinguishes this query from the rest and processes it separately VK KI AK IKK KK III IKK IRE KK KI AK KEKE KK KK ERE RE RAR ERE REE EKEK PROCESS ONE QUERY IF LEFTS wrt 4 CUR OR LEFTS wrt 6 CURVE OR LEFTS wrt 5 CURV THEN GOSUB ACQUIRE WAVE ELSE if length of response func 3 too large to fit in CALL RS232 CALLS the window defined use IF LEN rd gt 66 THEN tthis routine to display DO WHILE LEN rd gt 3 it in groups small GOSUB FRAGMENT RESPONSE enough to fit LOOP ELSE PRINT rd END IF END IF t RETURN t ACQUIRE WAVE t SoS SSS SSS aak SS SS LS SS SS SS SS hold wrt wrt waveform preamble for binary data transfer iT wrt WFM ENC 3B func 3 CALL RS232 CALLS wrtS hold wrt WE E SE F EE RAIA Sane BES ee eee 2711 amp 2712 Programmer Manuel Re a ERROR TR t yalidate that curve query is properly formatted IF INSTR wrt CURVE OR INSTR wrt CURV THEN IF LEN wrtS lt 8 THEN posit INSTR wrt tem wrtS LEFT w
6. DEMOD DSPL USER DEF INPUT APPLICATION MENU DLLimit What is the limit detector status 0 BANDWIDTH MODE 3DBC BWMode DLValus Set the display line value and turn it on 1 CARRIER TO NOISE 5 0MHZBW CNMode DLValue What is the display line value 2 NOISE NORM D 1 0HZBW NNMode DSRe Select the detection mode 3 SIGNAL SEARCH MENU DSRe What is the detection mode 0 BEGIN FREQ 88 000MHZ SSBegin END FREQ 108 000MHZ SSEnd GRAt Turn the graticule light on and off 2 START TEST SGSrch GRAt Is the graticule light on or off 3 DISPLAY RESULTS SIGNALS SSHesult MNHid Turn min hold function on and off 4 OCCUPIED BW 99 OBWpent MNHId Is the min hold function on or off 5 EMC MODE EMC MHDest Select the min hold destination waveform 6 QUASI PEAK 200HZ FLTR AQP DSAc MHDest What is the min hold destination waveform 7 EM DEVIATION MODE POFset Offset B C A mode to center or top of screen 9 SETUP TABLE POFset Is B C A offset to top or center of screen 0 DB DOWN FOR BW MODE 3DBC BWNum TEXt Display the indicated text on line 8 of display 1 NORM BW FOR C N 5 0MHZBW CNBw TEXt What is the text string being displayed 2 NOISE NORM D BW 1 0HZBW NNBw TITLe Display the indicated text as a title in title mode TITLe What is the title TTLMode Turn title mode on and off TTLMode ts title mode on or off VIEw Minusa Turn B C MINUS A mode on and off ae RCI gegen BWResult CNResult and NNResult re
7. TALKERS LISTENERS AND CONTROLLERS Atalker is an instrument that can send messages and data over the bus A listener is an instrument that can accept messages and data from the bus An instrument can be a talker only listener only or be both a talker and a listener Unless a device is in the talk only or listen only mode it can only communicate with other devices on the bus when it is enabled to do so by the controller in charge of the instrumentation system A controller is an instrument that determines by software routines which instrument will talk and which instruments will listen during any given time interval The controller has the ability to assign itself as a talker or a listener whenever the program routine requires it In addition to designating the current talker and listeners for a particular communication sequence the controller is assigned the task of sending special codes and commands called interface control messages to any or all instruments on the bus A complete operating system may contain more than one controller The IEEE standard has provisions for a system controller that operates with another controller in charge of the bus The controller that is in charge of the bus can take control 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 a eS Instrument A able to control talk amp listen Controll
8. 14 Status Byte Peseta soe eaten Cs Tabie 5 7 Continued Event Description Program Not Executable Not Avail in Waterfall Mode Amplitude out of Calibration llegat Start Stop inc Values Delete Existing Table First Selected Table Is Emp Use ANTENNA SETUP Menu First Table is too large to Edit Default Data Loaded Delete Editing Buffer First Warning Using Empty Ant Table Not Available with DBUV M Idle Mkr Would Overwrite Noise Value Function Not Avail in DBUV M Mode No Listener Select TALK ONLY mode first Tracking Generator Norm Failed OP Filters Not Installed EO EO EO Destination waveform conflict TG normalization suggested EMC mode must be active input buffer empty Firmware error illegal event code firmware error Out Of Range None of the Traces are Active Uncal Off Uncal On Single Sweep Moda Table 5 7 Continued Event Status Byte Event Code pec Hex Description 806 128 80 Single sweep armed 807 128 80 Single sweep trigger gos 224 Eo No signal Found Above Threshold moo 224 Eo Inactive marker off screen a 224 EO SignalOver Range ou 224 Eo _ Function Not Avail in Max Span gi2 224 EO Ref level at new range limit EE Normalization Complete 814 224 __ No signal at center of display _ 815 294 E0 Not Avail w Display Storage On 916 224 EO 500kHz RBW used for Counting pe z
9. D 42 1109 SF 2eistbei y uy pears sft PYA PUI seequeiend sty Huy TTod ome zeupuI Gaagotpurt er SOM Traun uoppo x wesrbord TPY gpq DIMI TIVO 914 n NO WSONIW MAIAfAJO O MAIANO MIIAfAJJO Y MOTIAZ AA SO M 3 D spq LUMAI TIVO EE wLIYM dMSOIS NO GO 234 MALTA dd0 podetdstp ATSAP IOP SF geym pue y UT Dags sp PYM UsSMQoq DUJI FJJFP dooms Jo pus Tun LIVA PUL deems eTbuys V Zebbrti3 Joj eOTpUT deems jo pue uo uang ayy Suezu YOTYA 2a1erbai J ey Mat pue rezATeUe y 4 S I MOU Ge SE E GC E SC w LA SE i F Ge sehen E SS m E f FERGEES iy dauumvss0dd ZILE PLILT Gs 3 eas es ara A ES EE EE EE SE Zi S Ss SC SC CS SAMPLE Senter 2711 amp 2712 Programmer Manual eee GPIB CONTROLLER The following comm2712 program is a simple utility for communicating with the 2711 or 2712 spectrum analyzer over the GPIB It contains some of the subroutines or elements of them discussed earlier in this section in addition to some new material This program is not very sophisticated but it does show how to command and interrogate the spectrum analyzer in a manner that enables you to perform several useful operations Example 6 8 Sample GPIB Controller Program COMM2712 1 program to communicate with a Tektronix 2712 Spectrum Analyzer via the GPIB U declare GPIB system soft
10. Le status AND NOT 64 reset break bit OUT amp H3FB Le status tsend back the modified register contents now continue verification of the com port set up i i ee ee SSS SS E SS SS SS SS SSS SS SS SSeS SS SSS SS SS SS SSS SS SS SSS SS SSS SS SSS SS SES SS eee PRINT 1 RS232 VERBOSE ON GOSUB READ FOR VERBOSE oem goen SE 2 SSRs SRR Sa S A IF read error 1 THEN GOTO SELECT DEVICE END IF l t PRINT 1 R5232 ECHO OFF GOSUB READ FOR VERBOSE D IF read error 1 THEN GOTO SELECT DEVICE END IF PRINT 1 RS232 EOL CRLF GOSUB READ FOR VERBOSE 4 IF read error 1 THEN GOTO SELECT DEVICE END IF PRINT 1 R5232 FLOW NONE GOSUB READ FOR VERBOSE IF read error 1 THEN GOTO SELECT DEVICE END IF t set up the 2712 so REQUEST message does not t appear on analyzer and so the 2712 returns header information D PRINT 1 RQS Off HDR ON GOSUB READ FOR VERBOSE EXIT SUB 1 UK KAI dek kA IRIE MAAK IKE RR KE KER ERIK kk kk kkk k kkk kk This routine sends the command string and reads the response Da KK KK TOK KE IKK I I SACK KKK KK ACK RIE RK kk kkk kikk kkk KERR ERK SEND MESSAGE TO DEVICE PRINT 1 wrt SE EE EE SSS SSS 6 43 GONE KEE See 2711 amp 2712 Programmer Manual E 6 44 2711 amp 2712 Programmer Manual GOSUB READ FOR VERBOSE EXIT SUB D DIK RIK IK IK III KK EK HK ERK KE EEE IKKE KEKE kkk ER KEKE va Th
11. 4 91 2711 amp 2712 Programmer Manual Se Evaluating the expressions we find these resuits XN 0 3 6 X 108 255 5 900 X 108 Hz YN 20 3339 125 245 20 DBM These results represent the center of the screen for the factory default power up settings GER ZERosp lt arg gt Arguments OFF ON This single argument command turns the zero span mode on and off ZERosp ON ZERosp OFF ZERosp Arguments None This simple query returns the current on off status of the zero span mode ZERosp ZEROSP ON ees ZEROSP OFF 4 92 Section 5 Status Reporting Replace this page with the tab divider of the same name A EE GE Se 2711 amp 2712 Programmer Manual Cee ee SECTION 5 STATUS REPORTING Status reporting works much the same way for either interface GPIB or RS 232 available on the 2711 and 2712 spectrum analyzers The following discussion applies primarily to the GPIB RS 232 protocol does not include device serial polling or an SRQ function if your instrument has the RS 232 port we suggest that you review the entire section to understand the function of the status byte and its relationship to SRQ RQS and serial polling An additional subsection entitled AS 232 Error Reporting located at the end of this section provides RS 232 status reporting information The 2711 and 2712 reports their status to the controller by means of the status byte and event codes The status byt
12. FREq GRAt GRAt GTL HDR HDR HELp HRAmp ID IMPCor IMPCor Commands and Queries INIT KEY KEY LRAmpl MAMpl MARker MARker MEMory MEXchg MFReq MFReq MHDest MHDest MKTime MKTime MLFtnxt MMAx MNHid MNHid MPOs MRGTnxt MSGdim MSGdlm MSTep MTUNE MVPos MXHid MXHId MXRivl MXRivi ee PE SS E 2711 amp 2712 Programmer Manual Ce EEGENEN ge EE SE SS 2711 amp 2712 Programmer Manual COMMAND AND QUERY FUNCTIONAL GROUPS RFAtt TABle TVLMode MXSpn RFAtt TAB e TVLMode Anas ae through 3 16 aoe how the commands and queries i i available for programming the spectrum analyzer correspond to NNBw RLUnit TAMp TVLStd the front panel controls and menu selections An illustration of NNBw RLUnit TEXt TVLStd each front pane function block or menu is shown Related NNMode ROFset TEXt VDMode commands are placed beside the feature that it controls NNMode ROFsat TFReq VDMode NNResult ROMode TGEnab VEEnab His functional groupings and menus appear in the following NORM ROMode TGEnab VFEnab SE NORM RQS TGLevel VFMode FREQ MKRS function block pay RQS TGLevel oat MKR FREQ Menu OBWMode RS232 TGMan DI PEN dee Kg Ge Woche FREQUENCY SPAN DIV REF LEVEL function block OBWPent RTime TGOMode VIEw e VERT SCALE function block and PLOT and READOUT OBWResult RTIme TGOMode VIEW controls PKHeight SAVe TGOOffset VMAnttb e INPUT Menu PKHei
13. LOCATE y x 1 locate cursor 1 position back b ff 2711 amp 2712 Programmer Manual END IF PRINT CHRS 29 erase character back up wrt LEFTS wrt LEN wrt 1 remove 1 character from string of saved input RETURN END SUB 1 TKI IK IK IKK KK RIT IK KAKA IKKE REE E RRR IK EKER EER ERK K procedure to wait a given period of time This pause routine only accepts integers since less than a one second delay is not necessary CR RR RIK IR IK I KAI KR RTI III IK k k IK RE KERRI k KK ERE KE KK SUB PAUSE p i TIMER DO WHILE TIMER lt i p LOOP END SUB t DEET EE TOR AK IT IIR ERITH vn This procedure performs all RS232 calls All 1 information needed is defined in global variables va rd returned info from RS232 call wrt info to send to device va func identifies RS232 function to perform x wfm array to hold waveform DRI RR ROK A RI ROI NOR II KI IK IIR IAI gheet SUB RS232 CALLS IF funct 1 THEN GOTO SELECT DEVICE ELSEIF func 3 THEN GOTO SEND MESSAGE TO DEVICE ELSEIF func 5 THEN GOTO GET BINARY WAVEFORM END IF Peteweenrrrrrerrrrrrrrr Troe et Settee eee EE E This routine opens COM PORT 1 for communication vn via RS232 opened for random to handle both rk input and output EE FRR IR TOK BR AHIR KR IIH IRE va SPEED 9600 bits per second or BAUD RATE 14 PARITY NONE parity bit not used tk DATA 8 number of data bi
14. The list begins with the lowest frequency signal detected and proceeds to the highest The amplitude units are those currently selacted as reference level units frequency is in Hertz See Following is a typical example of the response when HDR is ON SSRESULT lt N gt lt freqi gt lt ampl1 gt lt freqN gt lt amp1N gt so E 2711 amp 2712 Programmer Manual ae Se 2711 amp 2712 Programmer Manual where l STEp es lt N gt number of signals detected N lt 50 Arguments None S st pth This simple query returns the currently specified program med sie gt y lt froqN gt frequency of 1 N detected frequency tuning increment in Hertz ampli lt ampiN gt amplitude of el vi detected ia Keier Zar cAMP P re STEP 3 0E 4 for example tf no signals are detected during the search SsResult returns STOre lt arg gt zero with HDR ON the response is SSRESULT 0 Ithe e amplitude of a detected signal is off screen itis listed as Arguments Integers 2 to 39 except 9 19 and 29 1 0E 6 This single argument command stores the spectrum analyzer SsResuit contro settings in the location designated by the argument ES Locations 0 and 1 are reserved for the last Power down and SSRESULT 8 55 250E 6 7 3 299 75E 6 4 0 factory default power up settings respectively Locations 9 for example 19 and 29 are invalid Gite 2 See Section 6 Programming for programming examples Site 24 for examp
15. U 20 Gegen EE E SE 2711 amp 2712 Programmer Manual E RS 232 Spectrum Analyzer Spectrum Analyzer HPGL Compatible Plotter or Epson Compatible Printer Figure 1 7 Two RS 232 System Configurations System Controller The system controller can be any general purpose computer or terminal equipped with an RS 232 interface also called a COM port or serial interface Specially buit controllers can be used but are beyond the scope of this manual The techniques and programs discussed in this manual are appropriate to the IBM PG family of computers and their function alike counterparts which support the MS DOS PC DOS or OS 2 environments 1 21 Software Device Driver 2711 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 and the programming language you are using For example if you are operating a PC the RS 232 driver configuration may be set with the MS DOS MODE command ff your control program is written in the BASIC or QuickBASIC language optional arguments in the OPEN statament can supply RS 232 configuration settings and 2712 Equipped With the RS 232 Option Your 2711 or 2712 must be equipped with the RS 232 port If your instrument is equipped with a GPIB interface refer to GPIB Operation earlier in this section Press UTIL 4 9 to see a list of the installed options a
16. ZS Table 3 6 INPUT Menu Commands iIMENUS Ki PSWP TRIG UTIL MKAVFREQ AL DEMOD op DSPL USERDEF INPUT INPUT MENU 1 PREAMP OFF PREamp 2 50 OHM DBM 75 OHM DBMV 50 IMPCor 3REFLEVELUNIT DBUVM RLUnit 4 1ST MXR INPUT LVL 30DBM MXRMI 5 RF ATTENUATION AUTO 50DB ARFatt RFAtt op 6 EXTERNAL ATTEN AMPL NONE ROFset ROMode 9 CAL SIG 100MHZ 30DBM OFF CALsig eee 3 10 EE SE Se i SASS GE GAEREN Header ARFatt ARFaitt ATBI CALsig CALsig JMPCor IMPCor MXRWI MXRivI PREamp PREamp DEA RFAtt RLUnit RLUnit ROFset ROFset ROMode ROMode VMAntibl VMAnttbi VMDIst VMDIst VMDEst VMDEst VMMkrunit VMMkrunit rachis tM Ze SE 2711 amp 2712 Programmer Manual Function EA eT KEE AESA Turn auto RF attenuation on and off Is auto RF attenuation on or off Provide a listing of an antenna correction table Turn the internal calibration signal on and off Is the internal calibration signal on or off Corrects indicated amplitude for 50 75 ohm source Amplitude corrected for 50 or 75 ohm source Select first mixer level What is first mixer level Turn the preamp on and off Is the preamp on or off Set the RF attenuation to a specific value What is the RF attenuation Select reference level unit What is the reference level unit Set the reference level offset and turn it on and off What is the reference level offset Turn refer
17. and DSR Data Set Ready are ignored SOFT flow control uses the CTRL Q CTRL S method Output lines RTS and DTR are always asserted TRUE and input lines DCD CTS and DSR are ignored This method should moi be specified for binary transfers such as waveforms or files NONE No flow contral may also be specified In this case the user is responsible to ensure that LO buffers do not overflow Note that both SOFT flow control or NONE no flow control allow the use of a 3 wire interface GND TXD and RXD In each case RTS and DTR are asserted TRUE and the CTS DCD and DSR inputs are ignored Refer to Appendix B for mare details on RS 232 connector wiring and the implementation of the interface standard by the 2711 and 2712 men EEN SE Se SE EIERE EAR EE E SE 4 SS 2711 amp 2712 Programmer Manual ees eee SE e MESSAGE FORMAT Messages are formatted along structural lines Each message consists of one or more message units separated by semicolons Line feeds can be selected as message unit delimiters in GPIB responses see the MSGDLM command Message Each input or output message can be represented graphically as shown in this example Message Unit 1 Message Unit 2 Message Unit NI Message Terminator Message Delimiters optional after last message unit items enclosed in square brackets denote optiona quantities Each message unit consists of an individual command query or re
18. average mode mode is turned on marker modes are turned off if they were AVMode MAX previously enabled Bandwidth mode is not allowed if the AMode MAMMin spectrum analyzer is In analog display mode or Video Monitor Option 10 mode Bandwidth mode cannot be enabled for AVMode MEAN waveforms in the D register if waterfall mode is enabled AVMode MIN FilMode ON AVMode Soe BiMode IDLE Arguments None BWMode IDLE has the same effect as BWMode ON This simple query returns the currently selected ensemble averaging mode BWMode ad Arguments Nona DIEDE MS This simpie query returns the status of the bandwidth AVMODE MAWMIN l measurement mode i AVMODE MEAN Dicher AVMODE MIN BAMODE ON BAMODE OFF AVNum lt arg gt RMD IDLE l Arguments integer number in the range of 0 to 1024 de S Ge BWNum lt arg gt This single argument command designates the number of i sweeps to be averaged by the currently selected ensemble Arguments Number in the range 1 to 70 averaging mode If zero e EEN a continuous average IS This single argument command specifies the integer number of performed The default is 16 dacibels dB below the signal peak at which the bandwidth measurement mode measures bandwidth Units are not allowed dBc units are assumed Non intager values are truncated AVNum D n 20 for example Arguments None AVNum 128 for example BWNum This simple query returns the integer number of sweeps the current ensemble averaging
19. embedded cr lf characters must be ignored until we get past the binary data ik x TIC IRI TO IO I IIT TO IO IIIB III AK A TRI IIIS I use first cr lf encounter for eof on of everything but binary files ensure that EOR cr lf read tset buffer flag on to indicate successful read IF funct lt gt 5 THEN IF INSTR rd CHRS 10 THEN IF INSTR rd CHR 13 THEN end of read y buffer y END IF END IF ensure to have read past binary data before checking for cr lf set buffer flag on ELSE IF LEN rd gt 523 THEN IF INSTR 524 rd CHR 13 THEN IF INSTR 525 rd CHR 10 THEW end of read Y buffer y END IF END IF END IF END IF RETURN LIK TOK kk TOK kA k kkk k RR kee IK RIKI k k k ERE IK IR KIRKE k k PROCEDURE to perform a number of tasks 11 format the screen to accept operator input 2 open communication link with 2712 func 1 call RS232 CALLS 3 accept input 4 link SENDCOMMAND which sends input to 2712 4 The ESCape key ends program execution and returns operator to DOS BRK IT KIT I TR RK I RK AKI I IIIA KER EERE KE KEKE KERKE EERE SUB ENTERCOMMAND 6 DNR PRR TR TLL TOTS EE 3 SE SE E 7 6 38 Tepe ee ee SS SE SS SS SS SS SS SS SSS SS SSS SS SS lt a SSS fill in the upper portion of screen with help info SCREEN 0 COLOR 0 0 CLS COLOR 12 0 LOCATE 1 26 9 PRINT 2712 TALK LISTEN DEMO FOR RS232 COLO
20. 1 8 It enables you to configure the spectrum analyzer s RS 232 parameters 1 23 er Lie a RS 232 PORT CONFIGURATION 0 STATUS ONLINE OFFLINE 1 BAUD RATE 110 9600 2 DATA BITS 7 8 3 PARITY NONE ODD EVEN 4 EOL CR LF CR LF 5 FLOW CONTROL HARD SOFT NONE 6 ECHO ON OFF 7 VERBOSE ON OFF Figure 1 8 The RS 232 Port Configuration Menu Placing the 2711 and 2712 Online ltem 0 of the RS 232 PORT CONFIGURATION Menu STATUS controls the RS 232 online offline status When the status is set to OFFLINE the RS 232 interface is ignored data are neither received nor transmitted After all preparations have been completed and RS 232 operations are ready to begin press 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 are transmitted across the interface To select a baud rate repeatedly press 1 on the KEYPAD until the baud rate you desire is displayed Baud rates ranging between 110 and 9600 are available The number of stop bits used is automatically selected by the spectrum analyzer when you change baud rates If the baud rate is 110 then two stop bits are selected One stop bit is selected for all other baud rates Setting the Number of Data Bits
21. CURVE CALL IBRD BD RDS CALL IBWRT BD WRTS TRIM STRING VARIABLE TO NUMBER 1 ANSFERR CAUD EBSD AEDS 8 Sen Se ie e TRIM AND DISPLAY THE DATA ON SCREEN RETURN CS PRINT MID RD 1 IBCNT RETURN PUT FILE SEND THE FILE IN MEMORY BACK TO THE 2712 PUT CURVE WRT FILEDAT ESTABLISH ENCODING AND DESTINATION REGISTER CALL IBWRT BD WRTS SAVE THE REGISTER RETURN WRTS WFMPRE WFID A ENCDG ASCII SAVE A ON E besi WEE E r CALL IBWRT BDS WRTS xample 6 2 lists QuickB subroutines that can be used DE with the National Instruments GPIB board and software to TATH CORNE T O transmit or return data files You must supply the name of the CURVE COMMAND HEADER IS INCLUDED IN RD An deer a PRY ne nate file to be returned or transmitted WRIS MIDS RDS 1 IBCNTS CALL IBWRT BD WRTS The response header is turned on when the file is returned to the RETURN controller This is how the returned data string FILEDATS will appear Transferring Files FILEDAT FILE lt ftlename gt lt data block gt The FILE command query transfers named data files between This is exactly the form required for the FILE command so upon the spectrum analyzer and controller FILE and FILE enables transmission you need only send FILEDATS Alternately you data from one instrument to be returned for disk storage and can set HDR OFF in GET FILE and then set WRT FILE subsequent transmission to another instrument or perhaps to iPTLEDATS in P
22. DBMV DBM etc to avoid confusion You can place as many spaces as desired between the number and its units Note that responses with numerical arguments DO NOT append units to the argument You must keep track of the units yourself or use a query that specifically responds with the units currently in use for instance the RLUnit query Character Argument Acharacter argument consists of one or more letters usually expressing a word or mnemonic For instance ON and OFF are arguments for commands that control spectrum analyzer functions such as ARES auto resolution bandwidth String Argument Link String arguments consist of one or more characters including spaces enclosed in quotation marks They are used with commands such as TITLe to convey messages meant to be Kg displayed or plotted Double quotation marks must be used when the quotation marks are to be part of the message Argument Link arguments provide a method of passing related argument parameters A colon character separates linked arguments For example the vRTdsp Command can set both the vertical display mode and its related scale factor the command VRT LOG 5 selects logarithmic display of 5 dB division Binary Block Argument 2 6 A binary block argument is a sequence of binary numbers The sequence is preceded by the ASCII code for percent a two byte binary integer representing the number of binary numbers and a checksum byte
23. DEW for example THRhid 4 74 Arguments None This simple query returns the current threshold value fixed or automatically selected The units are the currently selacted reference levei units THRh1d THRHED 10 0 for example SE E 2711 amp 2712 Programmer Manual TIMMode TIME lt arg gt M Arguments INC DEC value in the range 1 microsec to 2 sec Arguments None This simple query returns the current time base mode ore ng d to 100 microsect EC The TIME argument s range is limited to 100 microsec to 2 sec when any of the Display Storage registers A B C TIMODE FIXED D are active TIMMODE MANUAL This single argument command increases rE or sets TiTLe lt arg gt the sweep speed This command also turns off the spectrum ae analyzers aama sweep speed selection Units of NS US Arguments String of up to 32 ASCII characters MS or S may be appended otherwise seconds are assumed This single argument command displays a title on line 1 of the te trum analyzer screen The title is the argument of the ff the Inc or DEC argument is used the sweep speed is increased spec ll or decreased in the normal 1 2 5 sequence Sweep times that SE may oa p p ee ae ae i increased to the next valid setting a used Un ar c ara can be pet eee et 3 displayed A nuli string TIETLe is transmitted to erase the Numeric arguments must be within the range of TE title Use the TTLMoge command to turn the title on or off 1 microsecon
24. Integer argument of DEBLK Any integer variable name which indicates the number can be used MYNUMS of bytes converted INTEGS GL RDS String variable used with the Other names can be used rppR function to contain the such as RET DATS data returned by the 2711 or MYDATS S15 efc 2712 W WRT A string variable used with Other names can be used the tBwRT function to such as WRT DATS contain the data to be sent MESSAGES B48 etc to the 2711 or 2712 e Ze N 6 3 2711 amp 2712 Programmer Manual SE if memory size is not a limiting factor in your controller you may wish to set up the maximum size of RDS at the head of the program with a SPACES command as in this example DIM SHARED CUR 512 RDS SPACES lt max anticipated size gt The number of bytes in the response is less than 5000 for all queries except PLOT and FILE See The rror query may require as much as 37 000 bytes for HPGL plots and 61 100 for Epson plots The number of points in a PLOT response depends on the number of waveforms present and the acquisition mode A user defined program UDP can theoretically occupy ail available memory As a result UDPxx files larger than 100 000 bytes are possible However 5000 bytes are usually adequate for all but the largest UDPs ERROR TRAPPING There are three types of errors that may can occur in your program DOS GPIB System and instrument related Different TOF techniques ar
25. LOCATE x 8 PRINT STRING 66 i NEXT LOCATE 11 8 1 reposition cursor GOTO INLOOP return to accept more input ELSEIF INS CHR 8 AND LEN wrt 0 THEN 6 39 6 40 E 2711 amp 2712 Programmer Manual BEEP backspace without a place to go is an error GOTO INLOOP ELSEIF INS CHR 8 THEN SE GOSUB BACKSPACE GOTO INLOOP ELSE accumulate message from user x POS 0 y CSRLIN one byte at a time LOCATE y x PRINT INS 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 window LOCATE index 8 clear input window PRINT STRINGS 66 ni NEXT gi LOCATE 11 8 1 GOTO INLOOP ELSEIF x 74 THEN if cursor beyond line CurRow CSRLIN move it down to next line LOCATE CurRow 1 8 1 GOTO INLOOP wrtS wrtS INS and relocate cursor ELSE GOTO INLOOP if cursor position ok just So END IF return to accept more input END IF 1 VK KA KKK KK KARR KK ERE KEK KAKI KEKE RE REE KER ERREEKE routine to back up cursor and erase character this is a DESTRUCTIVE backspace routine k 1 PKK KIKI HK IKK KIKI KKK EK KKKE ERE EKER IKE ER KKEKREERKKK BACKSPACE fees 5 POS 0 CSRLIN tt ll x Y D IF x 8 AND y 11 THEN BEEP cannot backspace beyond area of window RETURN ELSEIF x 8 THEN y zayri1 hackspace to end of previous line LOCATE y 73 tand locate cursor ELSE i
26. NULL until the user presses a key Any key presses prior to the menu definition are discarded 6 27 es 2711 amp 2712 Programmer Manual pene TEST MENU 0 INIT INSTRUMENT 1 CHANGE REF LEVEL NOW 12 3 DBM 2 PERFORMANCE TESTS lt PREVIOUS MENU Figure 6 3 A Remote Menu Notice the use of paired quotes to represent a single quote mark on the menu display This menu could also have been defined using a single DEFMenu command with arguments separated by commas in place of the four individual DEFMenu commands Refer to Section 4 Command and Query Definition for the syntax of this command Execute and Exit Rem 0 on the remote menu of Figure 6 3 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 2402ATekmate or a controller e Do KEY queries until the result is not NULL e H Mo is returned key 0 has been pressed execute an INIT followed by a CLRMenu command This is a very simple example The 2402A Tekmate or your PC controller is capable of performing a complex test sequence in rasponse to a single keystroke 6 28 e E 2711 amp 2712 Programmer Manual TOES TEST MENU 0 INIT INSTRUMENT 4 CHANGE REF LEVEL NOW 12 3 DBM 2 PERFORMANCE TESTS ENTER REF L
27. SECOND TIME OUT CALL IBTMO BD 14 RETURN Example 6 5 Subroutine for Returning On screen Readouts READOUTS RESERVE SPACE FOR THE READOUTS READOUT DAT SPACES 448 REQUEST THE READOUTS WRIS PRDOUTS CALL IBWRT BD WRTS RETURN THE READOUTS CALL IBRD BD READOUT DATS TRIM DATA TO NUMBER OF BYTES RETURNED READOUT DATS MID READOUT DATS 1 IBCNT DISPLAY THE READOUTS PRINT READOUT DATS RETURN 6 15 Saving and Restoring Equipment Settings The srt query can be used to return the current spectrum analyzer control settings The settings are returned in a message format containing the command headers and arguments necessary to place the spectrum analyzer in its currant configuration Settings can be saved in a controller disk file for later transfer to the same spectrum analyzer or to another spectrum analyzer when restoring the same operating environment Because the set header is always suppressed in the response the response can be retransmitted as received The set query is generally used in preference to settings file transfers for several reasons The same command and format can be used with a variety of Tektronix instruments for the same purpose The 2711 and 2712 implement the retransmitted settings as soon as received rather than requiring a separate RECall command e The returned seitings are in ASCII format and can be easily read if necessary See the set query in Sectio
28. The nesting structure is maintained by the application program running on the controller on The application program also implements the Backspace BKSP key to return to a higher menu level as with the standard 2711 and 2712 menus 6 31 RESRERS SS 2711 amp 2712 Programmer Manual SS SAMPLE RS 232 CONTROLLER 6 32 The program in Example 6 9 illustrates interactive control of the 2711 or 2712 spectrum analyzer via the RS 232 interface The program can be revised for GPIB by modifying the device dependent initialization error handling and WO functions contained in the main module subroutine READ BUFFER and in the RS232 cALLS module Example 6 9 configures the 2712 s RS 232 interface to use the VERBOSE mode see Section 1 Introduction causing the instrument to send 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 if a command results in response OK the program displays the rasponse and waits for the next operator entry e H a command or query results in an error the program retrieves and displays the 2712 s response ERR followed by the associated event code It then awaits the next operator entry e if a query does not result in the response ERR the program displays the spectrum
29. VMMkrunit lt arg gt Arguments DBUVM VM This single argument command specifies the amplitude units for marker readouts in DBUVM mode as DBUVM or volts m WMkrunit DBUVM WMkrunit VM 4 84 3 oft RK fo SE SE EE 2711 amp 2712 Programmer Manual eee ee Ze SE VMMkrunit Arguments None This simple query returns the currently selected units for marker readouts in the DBUVM mode WMkrunit VMMKRUNIT DBOVM VMKRUNIT VM VMOnltor lt arg gt Requires Option 10 Video Monitor Arguments OFF ON This single argument cornmand turns the Video Monitor on and off VWionitor ON Wonitor OFF VMOnlitor Requires Option 10 Video Monitor Arguments None This simple query returns the current on off status of the Video Monitor mode VWioniter VMONITOR ON VWONITOR OFF VPOlarity lt arg gt Requires Option 10 Video Monitor Arguments NEGative POSitive This single argument command specifies the polarity of video signals to be received with the Video Monitor mode VPOlarity NEGative vPOlarity POSitive VPOlarity Requires Option 10 Video Monitor Arguments None This simple query returns the currently specified video signal polarity veOlarity VPOLARITY NEGATIVE VPOLARITY POSITIVE 4 85 2711 amp 2712 Programmer Manual Bee Eo VRTdsp lt arg gt Arguments LOG lt num gt LIN lt num gt FM lt num gt EXTernal lt num gt This is a command with a single linked argumen
30. acquire transfer process and analyze data remotely The command set and message structure are almost identical for the GPIB and RS 232 interfaces 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 if your instrument is equipped with the GPIB interface then continue with the next subsection GPIB Operation Otherwise turn to the RS 232 Operation subsection and follow the instructions there GPIB OPERATION in addition to conformance with the IEEE 488 Standard the 2711 and 2712 adhere to the Tektronix Interface Standard for GPIB Codes Formats Conventions and Features This standard promotes ease of operation and so far as possible makes this spectrum analyzer compatible with other Tektronix instruments and with GPIB instruments from other manufacturers 1 1 1 2 2711 amp 2712 Programmer Manual 5 S296 The IEEE 488 Standard establishes electrical levels connector configuration and signal protocols for communication between two or more electronic instruments using a common multi line bus structure The bus structure which is known as the GPIB consists of eight data fines eight dedicated control signal lines a shield and various grounds Data are transferred via eight data lines in a bit parallel byte serial fashion That is the eight bits of a data byte are placed on th
31. also respond this way Mary Withdraw 100 Bye bye Both messages are structured in a similar manner Each contains a salutation John and Mary Each message consists of one or more message units For instance Mary s message to John has four units one of these is a query and is identified by a question mark Each message unit begins with a header describing what the message is about dinner and cat The header is separated from its object or argument by a dash which is the argument delimiter Message units are separated or delimited by semicolons John s messages to Mary consist of a single response indicating how much money she should withdraw 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 SE WEEN SE Se 2711 amp 2712 Programmer Manual Se All Tektronix instruments assert the EOI line The CR LF see Section 4 Command and Query Definitions is CN SEENEN ded for i e e ption is provided for instruments which do not use oer ed Both messages close with a message terminator bye the EOI fine If you are using such an instrument select the pea CR LF option see Setting the Message Terminator in the i a aim Setting Up for GPIB Op
32. amplitude of the signal last tracked is returned The units are those currently selected as reference tevel units TAMpL TAMPL 34 0 for example TEXt lt arg gt Arguments String of up to 32 ASCII characters This single argument command displays a message on line 8 of the spectrum analyzer screen line 9 if title mode is active The message is the argument of the command up to 32 characters Quotation marks must be used Only upper case characters can be displayed although lower case characters may be sent Transmit a null string rExt to erase the message TEXt MY MESSAGE for example D TEXt Arguments None This simple query returns the current contents of the message buffer in the spectrum analyzer If lower case letters were originally sent lower case letters are returned even though the on screen message is upper case TEXt TEXT MY MESSAGE for example TFReq 4 70 Arguments None This simple query returns the frequency in Hertz of the 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 TrReq eee TFREQ 101 3666 for example EE SS 2711 amp 2712 Programmer Manual SESS AER Ee SS A i E 2711 amp 2712 Programmer Manual E SE TGMan lt arg gt Requires Option 04 Tracking Generator Arguments OFF ON TGEnab lt arg gt Requires Optio
33. analyzer s query response and awaits the next operator entry This interactive program handles all instrument functions and includes extensive error checking and a friendly human interface Program variables and their use as well as subroutine linkage are clearly defined and commented in the cade The program declares the following procedures ENTERCOMMAND This procedure formats the computer s display 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 full harmonic distortion analysis All RS 232 communications are already in place l SENDOCMMAND This procedure sends commands to the spectrum analyzer and receives responses from the spectrum EE COA RASS REINA ASR EE S 2711 amp 2712 Programmer Manual ee aS analyzer after establishing communications over the RS 232 interface It also calls RS232 CALLS to perform actual RS 232 communications PAUSE This procedure causes the controller to pause a specified number of seconds It is used during initialization to prevent interference with the spectrum analyzer s configuration See the RS232 command in Section 4 Command and Query Definitions RS232 CALIS This procedure performs ail input output for RS 232 communications between the controller and the spectrum analyzer It also checks for communication errors and displays error messages The RS 232 s
34. analyzer s display registers The data block represents the 512 horizontal points in a 2711 or 2712 waveform The encoding of the data points ASCH encoded decimal ASCll encoded hexadecimal or binary is 4 13 4 14 2711 amp 2712 Programmer Manual determined by the current waveform preamble see the WrMpre command The register A B C or D to which the data are 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 are not immediately overwritten they should be transferred to a saved register other methods are also possible such as transferring to an active register in single sweep mode 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 if you were to display the message on your controller screen for 3 instance by printing the response to the curve query with HDR on the response would resemble this example binary responses always start with these characters ate Binary CURVE amp CwNc gt V 99 ee hexidecimal responses always start with these characters n ASCll encoded hex CURVE H02015E21BOF E7B ASCII responses have no coding indicator or byte count characters ASCll encoded decimal CURVE 94 233 7 182 51 2 16 Here are sev
35. and 4 6 define the 18 BYTCHK NONE Byte check No per byte error checking 4 89 4 90 DO EL RK eK ah A LN d SJ WEE oes A 2711 amp 2712 Programmer Manual See es Table 4 6 Related Formutas Let lt valN gt value of the Nt data point of the CURVE query Then the X valus of that point is computed as XN XZERO XINCR N PT OFF The Y value is computed as YN YZERO YMULT lt vaiN gt YOFF Below is a WFMpre query and the response obtained for the factory default power up settings WMpre WEMPRE WFID A ENCDG BIN NR PT 512 PY EME Y PL OFF 5 XINCR 3 6e 6 XZERO 0 000 XUNIT HZ YOFF 245 YMULE 3 333E 1 YZERO 20 000640 YUNIT DEM BN FM RP BYT NR 1 BIT NR 8 CRVCHK CHKSMO BYTCHK NONE for example Using the preceding preamble WFMPRE WFID A ENCDG we will compute the value in engineering units of a data point within a cURve response In this example we have chosen the 255 point and have assumed that the cURve response indicates an integer value of 125 curve data always have integer values From the formulas above the X and Y values 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 X 10 XINCR 3 6 X 106 YMULT 3 333 X 107 PT OFF 5 YOFF 245 XUNIT HZ YUNIT DBM
36. arg gt Arguments value in the range 9 kHz to 1 8 GHz This single argument command specifies the BEGIN frequency for the signal search mode The BEGIN frequency must be less than the END frequency Units may be appended otherwise Hertz are assumed The value is assumed to be offset by FOF fset H FOMode is ON ssBegin 54 MHz for example 4 65 2711 amp 2712 Programmer Manual ee E SSBegin Arguments None This simple query returns the currently specified BEGIN fraquency in Hertz for the signal search mode SSBegin SSBHGIN 54 00e 6 for example SSEnd lt arg gt Arguments Value in the range 9 kHz to 1 8 GHz This single argument command specifies the END frequency for the signal search mode The END frequency must be greater than the BEGIN frequency Units may be appended otherwise Hertz are assumed The value is assumed to be offset by FOF fset if FOMode is ON SSEnd 300 MHz for example SSEnd Arguments None Sec This simple query returns the currently specified END frequency in Hertz for the signal search mode SSEnd SSEND 300 006 for example SSResult 4 66 Arguments None This simple query returns the number of signals detected during a signal search operation and lists the frequency and amplitude of each signal Up 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
37. arguments or only one data byte when it sends a response argument and may not require header or argument delimiters if desired you may substitute the line feed character for the Query semicolon in the case of responses see the MSGDLM command in Section 4 Do not confuse the line feed character with the A query consists of a query mnemonic or header a question mark header delimiter and argument However many queries optional message terminator discussed next do not require an argument Message Terminator GPIB DEE Messages exchanged over the GPIB interface can be p i l terminated in one of two ways A rasponse consists of an optional response mnemonic or The EOI Interface management line is brought low header header delimiter argument s and argument delimiter D a 6 asserted simultaneously with the last byte of the Mnemonic or Header ssage ke ee k A header is a short name associated with each command ASCII codes for carriage return CR and line feed LF query or response for example FREQ REF MAR Whenever are appended to the end of message and the EO possible choose headers that are mnemonic in nature so the interlace management line is asserted simultaneously name reminds you of the function with transmission of the LF character 2711 amp 2712 Programmer Manual Header Delimiter A header delimiter is a space Command headers response headers and the question mark following a query he
38. cannot find the SIG o intended signal swp SGErr Arguments None SGERR ON This simple query returns the current status of the single sweep SCERR OFF mode SIGswp SGSreh STGP ON Arguments None SIGSWP OFF This is a command that requires no argument it instructs the SIGSWP ARM spectrum analyzer to perform a signal search between the current BEGIN and END frequencies for all signals greater than the threshold see THRh1d The BEGIN and END frequencies can be set locally or by using the ssBegin and SSEnd commands Results of the search are returned by sSResult Srch ae EH 4 64 4 63 we Mi EE EE GE 2711 amp 2712 Programmer Manual EE SPAn lt arg gt Arguments 0 INC DEC 2711 accepts values in the range 10 kHz to 180 MHz 2712 accepts values in the range 1 kHz to 180 MHz This single argument command increases decreases or sets the span division When used with the inc or pEc argument the command changes the span division in the indicated direction in the normal 1 2 5 sequence The span division Is set to the indicated value for numeric arguments other than zero If the value is out of range the end point is substituted and an SRQ and event code are generated If the zero argument is used zero span mods is activated SPAn INC SPAn DEC SPAn 0 SPAn 25 kHz for example SPAn Arguments None This simple query returns the current span div in Hertz SPAn SPAN 2 5E 4 for exanple SSBegin lt
39. dB STStop Set start stop frequencies to marker frequencies FREQ Set the center or start frequency TABle Select tabular tuning table FREQ What is the current center or start frequency TABle What tabular tuning table is selected Turn MAX SPAN mode on and off TAMp What Is amplitude of tracked signal Is MAX SPAN on or off i TFReq What is frequency of tracked signal eq Get iere ou 8 REFivi Set vd THRhid Replace the auto threshold with the specified value at incremenV decrement reference level THRhid What is the threshold value REFIvi What is the reference level TMOde Select the knob function SPAn Select the frequency span per division TMOde What is the knob function SPAn What is the frequency span TOPsig Change reference level to the marker amplitude ZEResp Turn ZERO SPAN on and off ZERosp __Is ZERO SPAN on or off 1 9711 requires Option 02 Frequency Counter 3 7 ES me EEN EE EE EE ay ene pi 2711 amp 2712 Programmer Man ual OO S Table 3 5 VERT SCALE PLOT READOUT Front Panel Commands vat sp WERT SCALE LIN 10 5 1_ PLOT READOUT an PLOT REDout a TL TD Function Header PLOT Return screen plot data from the spectrum analyzer REDout Turn the on screen readouts on or off REDout Are on screen readouts on or off VRTdsp Select the vertical scale factor What is the vertical scale factor eege VATdsp 3 9 2711 amp 2712 Programmer Manual o
40. increments that must exist for the peak to be recognized by the NEXT LOWER and NEXT HIGHER marker functions PkKHeight PKHEIGHT 20 for example PLimode lt arg gt 2712 Only Arguments OFF ON This single argument command enables or disables the 1st LO phase lock system If the PLimode is on the spectrum analyzer s 1st LO automatically phase locks for spans of 20 kHz div or less PLinode CN PLimode OFF PLLmode 2712 Only Arguments None This simple query returns the current on off status of the tst LO phase lock system PLimcde PLIMODE ON PLIMODE OFF PLOT 4 50 Arguments None This simple query returns a complex response from the spectrum analyzer that provides screen plot information from for printing or plotting The result of this command is similar to pressing the PLOT button on the front panel The printer or plotter must speak the HPGL language or be compatible with Epson FX codes The appropriate printer type must be specified focally or with the PType command PLOT Sg lt screen data array up to 61 1Kbyte long gt AAAA eee EE E The data array can be up to 61 1 kbytes for Epson printers and up to 37 kbytes for HPGL plotters PLOT never produces a response header even f HDR is ON See section 6 Programming for programming examples POFset lt arg gt Arguments CENter TOP This single argument command specifies whether to offset the result of the B C MINUS A register ari
41. line feed ASCII 10 By CR LF carriage return followed by line feed 2 14 ge Section 3 Functional Groups Replace this page with the tab divider of the same name LOS See me SECTION 3 FUNCTIONAL GROUPS The instrument specific commands and queries have been listed several different ways in this manual to make them more convenient to the user The level of detail increases as you progress through the manual Table 3 1 provides a quick reference that contains all instrument specific commands and queries Tables 3 2 to 3 16 relate each GPIB command to a corresponding front panel control or menu Section 4 Command and Query Definitions provides a detailed description of each command and query Section 4 includes all commands and queries available for the 2711 and 2712 listed in alphabetical order with a discussion of each syntax examples data formats and other useful information The capital letters in a header indicate the minimum number of letters that must be supplied for the spectrum analyzer to recognize the header For instance the query Aco would produce the same response as the query ACOmode The lower case letters indicate optional additional letters which may be used to clarify the meaning of the header The spectrum analyzer accepts either upper or lower case letters but it WILL NOT accept headers that contain letters other than those indicated in the following tables For instance i
42. m is enabled and destination register is the same as for min hold Ensemble averaging is enabled MNHid ON mild OFF MNHid Arguments None This simple query returns the on off status of the minimum hold feature MHI MNHILD ON MNHID OFF 4 41 SE ZA 2711 amp 2712 Programmer Manual E MPOs lt arg gt 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 lt arg gt none or PRImary or secondary lt arg gt SECond marker or their horizontal difference lt arg gt DELta See the cuRve command for an explanation of screen coordinates MPOs _ MEOS PRIMARY 356 for example M e SECond oe SHOOND 233 for example MOs DEIta MEOS DELTA 123 for example MAGTnxt Arguments None This is a command requiring no argument It moves the primary marker from its current position to the next signal peak to the right If signal track is enabled MRGTaxt turns signal track mode off enables the primary marker and assigns the knob function to marker control H scErr is on and a peak does not exist an SRQ and event code are generated MRGTnxt MSGdim lt arg gt Arguments Lf line feed Semicolon This single argument command that selects a semicolon or line faad character as a message delimiter Mim Lf bim Semicolon MSGdim Arguments None This is a simple query w
43. of this manual and the material supplied with your board for detailed instructions BEGINNING YOUR GPIB PROGRAM Before you begin programming several steps must be performed to ensure QuickBASIC has the necessary GPIB esa information See Preparing the Software in the Setting Up For GPIB Operation part of Section 1 for the necessary procedure Generally speaking a BASIC or QuickBASIC program begins with a list of declarations This establishes variable types and the names of global variables A number of variable names are used by the National Instruments software To prevent any confusion or misunderstanding regarding these variables National Instruments supplies a program file which declares them for you To properly declare the reserved National Instruments variables place this line at the beginning of your programs REM SINCLUDE QEDECLA BAS QuickBASIC supports the sub program module concept so traditional common statements are replaced with COMMON SHARED statements This means that the variable names so declared may be shared by all modules Further each sub program module must be declared The following lines declare the global cel variables used by our subroutines and demonstration program COMMON SHARED BD EDNAMES RDS WRIS EVENT CODES COMMON SHARED NUMBYT Table 6 1 lists the global variables declared by oBDCL4 BAS and the COMMON SHARED statements and their purpose You may desire to dimension
44. primarily for making automated measurements with the Tektronix 2402A Tekmate an external portable PC based controller without a display or keyboard These features can also be used with a standard PC controller to define a menu remotely This allows the spectrum analyzer user to interact with menu functions locally at the spectrum analyzer s KEYPAD and see results on the spectrum analyzer s display Remotely defined menus are controlled by these four commands DEFMenu defines menu lines to print on the display CLRMenu clears the current menu from the display KEY returns the identity of the last key pressed CLRKey Clears pending key presses The syntax and use of these commands including side effects are described in Section 4 Command and Query Definitions Figure 6 3 shows a test menu that could be defined by auser This example shows how different types of actions can be implemented by selecting the menu commands from a user defined menu The following sequence of instrument specific commands are used to create the menu of Figure 6 3 CLRMENU DEFMENU Li TEST MENU DEFMENU L3 O INIT INSTRUMENT DEEMENU L4 1 CHANGE REF LEVEL NOW 12 3 g DEFMENU L5 2 PERFORMANCE TESTS DEFMENU Lier ag PREVIOUS MENU The initial cLRMenu command clears every line in the menu so only the lines that contain information must be defined This command also clears the last key pressed so that subsequent KEY queries return
45. requires a two byte address code No L or LE function is active during the time that ATN is asserted An instrument may be a talker only a listener only or implement all functions All talker and listener functions must respond ta ATN within 200 ns They must also respond to IFC in less than 100 us In any case its address code has the form X1OTTTIT for a talker and XO1LLLLL for a listener For instruments with both T and L functions the T bit binary values are usually equal to the binary value of the L bits Before applying power to the system the system operator sets these five least significant bits by means of an address switch on each instrument The controller s address code may be implemented in software The system program run from the controller dasignates the primary talker and primary listener status of the desired instruments by coding data bits 6 and 7 These bits are set to 1 and 0 respectively for a talker and 0 and 1 respectively for a listener Secondary talk and listen addresses or commands are represented by the controller sending both data bits 6 and 7 as a logical 1 The controller may listen to bus traffic without actually addressing itself over the bus SH and AH Source and Acceptor Handshake Functions The SH and AH functions are independent of each other although they are discussed under one heading The SH Source Handshake function guarantees proper transmission of data while the AH Acceptor Ha
46. returns an integer event code If Ros is ON a serial poll must be performed following an SRQ and prior to sending EVEnt to obtain the correct event code if RQS is OFF EVEnt may be sent without a serial poll EVEnt EVENT 878 for example 4 24 fos Ge AE EECH ERS E as E SE 2711 amp 2712 Programmer Manual Co 2711 amp 2712 Programmer Manual SS ZS GE G FILE lt arg gt Table 4 1 File Types 4 25 4 26 St Arguments lt ilename gt lt data block gt File Type 8 Description This is a complex single or multiple argument command that Seitings Each file saves the control settings for a particular transfers a previously stored spectrum analyzer file from the register A B C D in a numbered location 00 39 controller to the spectrum analyzer When used with only the excluding 09 19 amp 29 The numbers correspond to lt filename gt argument the command establishes the name of the stored settings listed under UTIL 1 the file to be transferred to the controller by the next FILE e Each fil th datat icul query The lt filename gt must be surrounded by quotation MING ach fila saves the curve oala irom a particular marks Tables 4 1 and 4 2 list the various user alterable file register A B C in a numbered location 00 39 types and allowable filenames excluding 09 19 amp 29 The numbers correspond to The FILE command and FILE query are intended to transfer the curves
47. routine to determine which instrument is requesting service The instrument requesting service responds with a device dependent status byte with bit seven asserted When the instrument requesting service is found program control is transferred to a service routine for that instrument When the service routine is completed program control returns to the main program The controller does not have to see the SRQ line asserted to perform a polling routing it may do so whenever a program requires it Remote Enable The system controller asserts the REN signal line whenever the interface system operates under remote program control The REN signal causes an instrument on the bus to select between two alternate sources of programming data It is used with other interface control messages such as LLO Local Lockout or GTL 2711 amp 2712 Programmer Manual Go To Local A remote local interface function indicates to an instrument that the instrument will use either information input from the interface remote or information input by the operator via the front panel controls local EOI End Or identify A talker can use the EOI signal line to indicate the end of a data transfer sequence The talker asserts EO as the last byte of data is transmitted in this case the EO line is essentially a ninth data bit and must observe the same settling time as the data on the data bus When an instrument controller is listening it ass
48. 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 because additional handshake fines are not needed When SOFT control is selected the spectrum analyzer sends CTRL S when its input data buffer is within 200 characters of being full It sends CTRL Q when the buffer empties to the point at which additional characters can be safely accepted less than 200 characters remain in the buffer If the input buffer is allowed to overflow the spectrum analyzer discards the incoming data and signals an error Event 372 HARD When HARD flow contro is selected the instrument sends data as long as the CTS Clear To Send line is TRUE and halts the data stream if CTS goes FALSE Additional handshake lines more than a 3 wire RS 232 implementation are required to support HARD flow control 1 25 When receiving data and HARD flow control is selected the spectrum analyzer asserts RTS Request To Send TRUE until the input buffer is within 200 characters of being full i then sets RTS FALSE As with SOFT flow control data is received white RTS is FALSE but if the buffer is allowed to overflow the spectrum analyzer signals an error Event 372 and incoming data is discarded NONE No flow contro is used In general you should follow these rules when selecting a flow control met
49. saved with the settings listed under files through the mechanism of up loading and subsequent UTIL DL _D register curves are never saved down loading between different 2711 or 2712 spectrum User Definable Each file saves a keystroke command sequence analyzers For instance you might develop a User Definable Programs representing a user defined program in a numbered Program UDP in one spectrum analyzer transfer it to the location 00 to 08 numbers correspond to th controller using the FILE query and subsequently down load it ee S to a number of other spactrum analyzers using the FILE programs stored under USER DEF command Be aware however that if files are transferred Antenna Each file saves an antenna table representing antenna between spectrum analyzers with different installed options Tables data for a particular antenna in a numbered location 01 SS uncertain results may occur to 05 numbers correspond to the tables stored under INPUT 3 9 dere Sidd eat legt EC eier Normalization Normalization files save data generated by normalizing reference normalizations in preparation for changing the the specirum analyzer including reference NVRAM battery normatizations When files are originally returned from the spectrum analyzer with the FILE query HDR is usually set on so the ASCH strings Table 4 2 Valid Flie Names FILE and lt filename gt precede the actual data and are stored as the first bytes of the disk file it is
50. secondary address 12 as the final destination of the data to follow The data is the two ASCII characters A and B decimal 65 and decimal 66 Note that the ATN line is asserted for the first two data bytes and unasserted for the device dependent character to indicate the last data byte in the message 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 oo oom A 11 Ke ore cs DIO8 RB omr r Om d SZ OCH E SS 2711 amp 2712 Programmer Manual ee Secondary Primary L B A Address Address UNT U 3 NLA AALA SAS ECER E DATA BUS EETA E PCER AGN A SA NAAN en eee ee EE Hawe a 65 108 4 om AS me CHA LOI L ATN Asserted EO Asserted ATN Asserted ae Figure A 4 Example of Data Byte Traffic Transfer Bus Handshake A Each time a data byte is transferred over the data bus an enabled talker and all enabled listeners execute a handshake sequence via signal tines DAV NRFD and NDAC see Figure A 5 the ATN line is shown to illustrate the controller s role in the process DAV Data Valid The DAV signal line is asserted by the talker after the talker places a data byte on the data bus When asserted low DAV tells each assigned listener that a new data byte is on the bus
51. store Enough data g Figure 6 1 Possible Data Acquisition Scheme DEER GE SS S EE SE SE eaan T eee 2711 amp 2712 Programmer Manual Ni Example 6 4 shows a subroutine for obtaining screen plot data from the 2712 using the PLot query It does not store the data on disk you can add that capability if desired but holds them in memory as the string variable PLOT DATS Data Print Plot Routines 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 if an HPGL plotter is used If an Epson FX printer is used as many as 61 1 kbyte may be required for four sweeps in MAX MIN mode Substitute 61100 for 12000 and change HPGL4 to EPSON if using an Epson FX printer Retrieve Instrument N Stored data Specify HPGL2 if you have a 2 pen plotter Data may be sent to a parallel Epson type printer on the controller s parallel port but to send it over the GPIB the printer must be equipped with a GPIB board an unlikely but possible configuration Yes The SEND PLoT subroutine transmits PLOT DaATS to an HPGL 4 pen plotter matching the type specified nert Stot Note that the controller timeout is disabled and execution following the plot is restarted by pressing any key data Returning the On screen Readouts The spectrum analyzer s on screen r
52. ta send mora other answers end the program REM SINCLUDE QBDECL4 BAS RDS SPACES 3000 CLS CALL IBPIND GPIBO BD V 0 CALL IBSRE BD V CALL IBFIND IEK_SA BD PRINT 2711 or 2712 SHOULD NOW BE HANDSHAKING PRINT NDAC SHOULD BE DISPLAYED PRINT PRINT PRESS ANY KEY TO CONTINUE DO WHILE INKEYS LOOP WRIS HDR ON CALL IBWRT BD WRT PRINT 2711 or 2712 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 WRIS QUES INSTR 1 WRT HOLD TIME TIMER DO WHILE TIMER lt HOLD TIME I LOOP IF QUES 0 THEN GOTO MORE CALL IBRD BD RDS 1 17 E ere EE rat Se ee RS 232 OPERATION If your spectrum analyzer is equipped with a GPIB instrument bus you can skip this subsection The 2711 and 2712 when equipped with the RS 232 interface follows the EIA Standard RS 232 D EIA Standard RS 232 D revises RS 232 C so it conforms with international standards CCITT V 24 V 28 and ISO 182110 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 2711 or 2712 implements the DTE end of the interface l Note that the RS 232 interface is NOT a bus Only one device can be connected to the in
53. talker asserts DAV for the next data byte transfer Both NRFD and NDAC high at the same time is an invalid state on the bus LNB Ge SE 2711 amp 2712 Programmer Manual eee ees GE SE Management Bus The management bus is a group of five signal lines that are used to control the operation of the IEEE Std 488 GPIB Digital Interface IFC Interface Clear ATN The system controller is the only instrument on the bus allowed to assert IFC IFC is asserted for greater than 100 us to place all instruments in a predetermined state While IFC is being sent only the DCL Device Clear LLO Local Lockout PPU Parallel Polt Unconfigure and REN Remote Enable interface messages universal commands will be recognized Attention The controler in charge is the only instrument on the bus allowed to assert ATN ATN is asserted when an instrument connected to the bus is being enabled as a talker or listener or when sending other interface contro messages As long as the ATN line is asserted low only instrument address codes and interface control messages are sent over the bus When the ATN line is unasserted only those instruments enabled as a talker and listener can send and receive data over the bus SRQ Service Request REN A 14 A 13 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
54. the bus The Controller function also provides the capability to respond to a service request message SRQ from an instrument or to conduct a parallel poll routine to determine the status of any or all instruments on the bus that have the Parallel Poll PP function implemented H an instrumentation system has more than one controller only the system controller is allowed to assert the IFC Interface Clear and REN Remote Enable lines at any time during system operation whether or not it is the controller in charge at the time If one controller requests system control from another controller and it receives a message from another controller to send REN the system controller must verify that the REN line remains unasserted false for at least 100 ps before asserting REN The time interval that REN is asserted depends on the remote programming sequence and will vary with the program The IFC line must be asserted for at least 100 us The Controller function has specified time intervals for certain operations For example the execution time for parallel polling instruments on the bus cannot be less than 2 ps 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 ps before going to the controller active state in order to give the NRFD NDAC and EOI tines sufficient time to assume their valid states The controller must also have a delay
55. therefore toggle item 3 of the GPIB PORT CONFIGURATION Menu until its staius changes to EOI The LF OR EO setting is included for controllers which do 1 9 not use the EOI signal line The selection you choose is permanently retained in non volatile memory 0 STATUS ON OFFLINE Setting the TALK ONLY Option j Ge ee ONO Rem 4 of the GPIB PORT CONFIGURATION Menu TALK ONLY 3 EOVLF MODE 1 E EO MODE selects the spectrum analyzer s TALK ONLY mode lee OMET TALK ONLY mode must be selected to send the spectrum analyzer s output directly to a plotter without the need of a controller Complete these steps to send the spectrum analyzer s display directly to a plotter e Disconnect all instruments except the spectrum analyzer and the plotter from the bus e Place the plotter in the LISTEN ONLY mode usually done with controls on the plotter e Press UTIL 4 0 and then press 4 until the FALK ONLY status indicates ON e Press the front panel key labelled PLOT TALK ONLY mode must be disabled when the spectrum analyzer is used with a controller because the spectrum analyzer must talk to and listen to the controller To use the spectrum analyzer with a controller press 4 on the KEYPAD until the status indicates OFF The system controller will determine when the spectrum analyzer should be addressed as a talker or listener Configuring the Device Driver Instructions for configuring the device driver should be included wit
56. to Frequenc Frequency Down Frequency Up Input menu Turn knob right 1 step MKREnab Marker On Off Delta _uxrrert _ _ Marker Left Wrptieng JL Marker Frequency Menu MKRPeak _Marker Peak T 4 35 Table 4 4 Continued Mnemonic Key Marker Right Nae PERIOD Period Readout Assign keypad to Ref Ivi REFDown Ref Lvl Down Ref Lvl Up RESAuto Auto ResBW ResBW Down ResBW Up Save Single Sweep SPANAsgn Assign keypad to Span SPANDown _Span Down SPANUp Span Up SWPAuto Sweep Auto SWPDown Sweep Time Down oe SWPMenu Swp Trig Menu pe Sweep Time Up First Terminator Third Terminator Second Terminator Fourth Terminator USErdef User Def Menu UTilmenu Utility Menu VID 1t Video Filter VRTLIn Lin Mode __vrtLog___ _ Log Mode ___Zerospan___ _ Zeta Span Se MAN E Se oh br d SE SE S E SE Z711 amp 2712 Programmer Manual E Cie COON KEY Arguments None This simple query returns the identity of the last key pressed that has not been reported by a previous KEY query The name of the key uses the same syntax as the Key command If the kay name returned is RULL then no keys have been pressed since the fast CLRMenu command or KEY query has been executed This query also clears the last key press ensuring that the same key press is not reported more than one time KEY KEY Ml for example KEY NULL for example NOTE NULL i
57. to interpret A sample response follows that includes all 101 command headers that can be returned Some of the headers depend on the options installed on your instrument and its particular configuration at the tima of the ser query See the following examples a If the Tracking Generator Option 04 or Video Monitor Option 10 are not installed all commands related to them will be absent all commands beginning TG TVL and V except VSYNC f the spectrum analyzer is not in single sweep mode or if display line is not ON the sIcswe and DLVALUE commands will be missing See the following example SET VIEW WATERFALL CFP RECALL 1 EMC OFF DSRC AM VRIDSP LOG 10 DETECTOR CRF NNBW 1 0E 0 NAMODE ON CNEW 1 0E 0 CNMODE CN HNUM 3 EMDE ON OBMPCNT 99 CBRMODE OFF ACOMODE MAXMIN SPAN 180 E 6 MXSPN ON ZEROSP OFF FORFSET 0 000 FODE OFF CFSF CENTER FREQ 000 E4 6 PLIMODE ON DISOOR OFF VMANTTBL 1 V DIST 3 0E 0 VMDEST C VMMKRONIT DBOVM IMPCOR 50 ROSET 0 0 R0MODE CFF RLUNIT DEM WATT PREAMP OFF MKRIVL 30 REFLVL 20 0 RFATT 50 ARFATION FINE OFF THRHLD 20 0 ATHRHLD ON PKHEIGHT 20 DLVALUE 20 0 DLINE GN DLLIMIT OFF RESBW 5 0E 6 ARES ON VIDFLT 5 06 VEMODE ADTO VFENAB OFF MARKER OFF CRES1 E 3 SGIRAK OFF AVDEST C7AVMODE MEAN AVNUM 167AVG OFF MNHLD OFF MXHLD OFF POFSET CENTER VIEW A OFF B OFF C OFF D 0N MINUSA OFF STEP 3 600E 6 STPINC AUTO TABLE 0 TGTRACK 0 000 TGTMODE OFF TGOOFFSET 0 0 TGOMODE OFF IOMAN OFF T
58. 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 over the GPIB as one or more eight bit bytes of information Proficiency in controlling the spectrum analyzer is the key to programming these messages efficiently Preparing the Software 1 14 After completing the set up procedures your equipment is ready for GPIB operation but you must still provide the software needed to control the spectrum analyzer When creating new software this is usually a two step process The first step is to establish the programming environment Next you can create and run the control program If you are using ready made contro software simply follow the supplier s instructions When creating your own QuickBASIC software you must ensure that QuickBASIC has the necessary GPIB information Use the following procedure Refer to your DOS manual if you geed help creating or modifying files e Copy the files QBIB4 OBJ GPIB QLB GPIB LIB BOLB45 LIB and QBIB4728 OBJ from the National Instrument disk to the QuickBASIC directory e Create the Quick library by typing this command from the DOS command line LINK Q QBIB4 OBJ OBIBA728 0BI GPTB OQLB BQLB45 LIB SE SC Se SE D 2711 amp 27
59. when TV fine trigger mode is TV standard BM selected qsttd NISC TVLine d OPEN TVLINE 17 for example IVLStd PAL TVLMode lt arg gt TVLStd SECAM Arguments CONT KNOB PROg TVLStd This single argument command designates the specific TV line Arguments None trigger mode when the Option 10 Video Monitor is installed and Ge enables TVLine trigger mode in all spectrum analyzers This This simple query returns the currently selected TV standard command turns the Video Monitor mode off if it is enabled The TVLStd arguments and their functions are described in the following dee table TVLSID OPEN e TVLSTD PAL cont Trigger on every line wm Trigger tine number selected with the VDMode arg gt Requires Option 10 Video Monitor frequency markers knob Arguments BROadcast SATellite Trigger line number entered locally or with the TVLIne command This single argument command designates the type of detection to be used in the Video Monitor mode BROadcast selects AM detection for use with broadcast television SATe11ite selects FM detection for use with satellite transponders TVIMode KNOB for example fom worm S un Bee 4 80 ege SE e 2711 amp 2712 Programmer Manual EE EEN VDMode BROadcast j l ViMode SATellite VDMode Requires Option 10 Video Monitor Arguments None This simple query returns the currently selected detection for Video Monitor moda l V0Mode MAUS BROADCAST VOMODE SATELLI
60. 1 8 GHz Units may be appended otherwise Hertz are assumed TUNe 10 8 MHz for example 4 78 2711 amp 2712 Programiaer Manual ee SE IESSE E SE 2711 amp 2712 Programmer Manual SE TVLMode Requires Option 10 Video Monitor TVLine lt arg gt Requires Option 10 Video Monitor Arguments None Arguments Integer in the range 1 to 1024 This simple query returns the currently selected TV line trigger This single argument command specifies the number of the TV mode line to which the spectrum analyzer is to trigger when TVIMode programmed TV line triggering is enabled This command also TVIMODE CONT turns off Video Monitor mode if it is enabled The minimum argument is 1 The maximum value depends on the TV line TVLMODE KNOB standard 525 for NTSC 625 for PAL and SECAM and 1024 for VIMODE PROG OPEN This command also sets TRIgger to TVLine and enables the programmed mode TVLStd lt arg gt TvLine 17 for example Arguments NTSC OPEN PAL SECAM i This single argument command designates the FV standard TVLine Requires Option 10 Video Monitor when using the TV line trigger mode This command turns the Arguments None Video Monitor mode Option 10 off if it is enabled and sets the geg Sian trigger mode to TV Ling in all spectrum analyzers The maximum This simple query returns the integer TV line number to which value of the TVLIne command s argument is influenced by the the spectrum analyzer is to trigger
61. 11 91 FIRMWARE 300HZ 1 10 LOOKHZ 1MAZ REW FLIR PHASE LOCK JOOKHZ FILTER VIDEOMONT TOR GPIB OOUNTER NVM 12 88 for example The items in quotes indicate the firmware version and options installed in the spectrum analyzer and may vaty depanding on how your spectrum analyzer is equipped IMPCor lt arg gt Arguments Integer or floating point number This single argument command instructs the spectrum analyzer to scale its measurement results for 50 or 75 ohrn input Only the values 50 and 75 are valid Numbers of 60 or below are rounded to 50 numbers above 60 are rounded to 75 Units are not allowed The spectrum analyzer has a 50 ohm input but it can scale measurements to reflect values that would be measured if a 75 ohm instrument was used under the same conditions See the 2711 Spectrum Analyzer User Manualor 2712 Spectrum Analyzer User Manual for a detailed description of the 50 75 ohm corrections IMecor 75 IMPCor 50 IMPCor Arguments None This simple query returns the input impedance value in ohms for which measurements ara scaled TMPCor IMPOOR 50 IMPCOR 75 4 33 INIT 2711 amp 2712 Programmer Manual Se SE Arguments None This is a command requiring no argument that places the spectrum analyzer in its power up configuration Factory default power up settings are used unless user defined power up settings have been implemented INIT KEY lt arg gt 4 34 A
62. 12 Programmer Manual E e To make your QuickBASIC program a stand alone EXE file you need an additional library file Type this command from the DOS command line LIB GPIB LIB OBIB4 OBJ OB1B4728 OBJ Start QuickBASIG using this command OB L GPIB OLB This procedure ensures that the National Instruments GPIB subroutines needed to control devices on the bus are present in the QuickBASIC environment When using another version of QuickBASIC use the analogous files and procedures indicated in the READ OB Doc document file from National Instruments A GPIB Instrument Control Program You will learn more about controlling the spectrum analyzer in Sections 4 through 6 in this manual However we have provided a simple program here so you can check the operation of your system and observe typical interactions between the controller and spectrum analyzer Be aware that the program is very basic it contains no error checking and may hang up the controller requiring you to reboot if incorrect or unacceptable commands or queries are entered It will however accept upper or lower case entries Alternately you can use the IBIC program supplied with the National Instruments PCIVHA GPIB board It enables you to communicate with the spectrum analyzer but requires that you learn how to use a few simple subroutines such as IBWRT and TBRD See your National Instruments documentation for details Follow these steps to use t
63. 8 x St L END IF IF x gt 24 THEN x 20 GOSUSB TEMP STOP END IF routine invoked to control display of response r p SSS SSS SS SS SS SSS SSS SSS SS SSS SS SS SS SS SSS TEMP STOP COLOR 0 7 LOCATE 25 9 0 PRINT Press Enter to continue DO WHILE INKEY lt gt CHR 13 LOOP COLOR 9 9 FOR indx 20 TO 25 LOCATE indx 8 PRINT STRINGS 66 CHR 32 3 NEXT COLOR 14 9 RETURN END SUB Appendices Replace this page with the tab divider of the same name e o Oe SEA ZS 2711 amp 2712 Programmer Mannal ZS APPENDIX A GPIB SYSTEM CONCEPTS The General Purpose Interface Bus GPIB is a digital control bus that allows efficiant communications between self contained instruments or devices connected in an instrumentation system The GPIB is an interface system independent of the stimulus or measurement functions incorporated in any instrument Instruments or devices designed to operate on the GPIB digital control bus must be developed according to the specifications contained in IEEE Std 488 1978 IEEE Standard Digital interface for Programmable Instrumentation The IEEE 488 digital interface is commonly known as the General Purpose Interface Bus GPIB This section discusses the basic concepts of the GPIB For complete specifications refer to the EEE Std 488 1978 standard published by the Institute of Electrical and Electronics Engineers Inc The GPIB has four elements mechanical electrical functi
64. ASCII encoding is to be used for the data WAVirm Arguments None WFMpre lt arg gt This simple query is functionally equivalent to the combination Arguments None ENCdg WFId of the WeMpre and CURVe queries The wAvfrm header is never returned even if HDR is on This is a query with one or no argument whose response EEN provides information necessary for these CURve operations oo F EN 4 88 oe 4 87 d Sa SE GEES Ee 2211 amp 2712 Programmer Manual Goes E EG y SE S 2711 amp 2712 Programmer Manual e Determine the currently selected source destination Table 4 5 Arguments of the WrMpre Query register for CURve transfers A Argument Name Description Determine the data encoding for curve transfers easels Waveform ID ID may be A B Cor D Interpret the result of a curve query 2 ENCDG lt enc gt Encoding The possibilities are ASC When Wepre is used with the wrid argument the query Ee i BIN or HEX returns the currently selected source destination register 3 NR PT 512 Number of points f There are 512 data points WMpre WFId on every 2712 curve WMPRE WFID B for example 4 PL FMT Y Point format Only Y data is transmitted X data is implicit by the position of the point When wrMpre is used with the ENcd g arguinent the que returns the currently selected curve data encoding ore WiMpre ENCdg 5 P OFF lt nrl gt Point offset See following formulas HEM
65. B OFF C OFF D ON Minusa orr for example VIEW B VIEW B OFF for example VMAnitbl lt arg gt Arguments Integer in the range 1 to 5 This single argument command designates by number the antenna table to be used for DBUVM measurements Units are not allowed Wanttbl 3 for exanple VMAnttb l Arguments None This simple query returns the number of the antenna table currently selected for use when making DBUVM measurements Wanttbl WANITBL 3 for example 4 83 GE GE PIESEI EIEEE E EE 2711 amp 2712 Programmer Manual VMDEst lt arg gt Arguments A B C This single argument command designates the spectrum analyzer display register used as the destination for DBUVM measurements worst B for example VMDEst Arguments None This simple query returns the currently selected destination register for DBUVM measurements VDEst WDEST B for example VMDiIst lt arg gt Arguments Floating point number This single argument command specifies the source antenna distance at which a DBUVM measurement is actually performed Distance may be entered in feet FT meters m kilometers xm or miles MI but the spectrum analyzer converts ail values to meters or kilometers WpIst 3M for example VMDist Arguments None This simple query returns the currently specified source antenna distance for DBUVM measurements Units are meters WDIst gt WDIST 3 0 for example
66. BOSE turns VERBOSE mode ON and OFF This feature is provided as an alternative to GPIB SRQ mechanism It is generally used when controlling the spectrum analyzer with a dumb terminal Press 7 on the KEYPAD to choose between ON or OFF When ON VERBOSE mode forces the spectrum analyzer to respond for each command it receives The response will be one of the following An event code for an abnormal condition A response for a successful query FREQ e The string OK for a successful non query Refer to Section 5 Status Reporting for additional information on error handling for RS 232 equipped instruments 1 27 AT Mr installing and Configuring the Device Driver t 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 type controllers running MS DOS the driver is part of the operating system You can configure a serial communications port with the MODE command by entering a command similar to the following example MODE COM1 9600 n 8 1 l This command configures the COM interface to run at 9600 baud no parity 8 data bits and 1 stop bit You must use the same set up information for the controller and the spectrum analyzer A program statement such as OPEN in the BASIC language is an alternative way to configure the driver This method of driver configuration is recommended bec
67. BV RUWnit DON RUWnit DBOW RUWnit DBUVM HL Unit Arguments None This simple query raturns the selected reference level units RLUnIt RLUNIT DEM RLUNIT DEMV RLUNIT DBV RLUNIT DBUV RLUNIT DN RLUNIT DBUVM 4 57 ROFset lt arg gt Arguments Value within the range 100 dB This single argument command sets the reference level offset value The offset value must range between 100 dB to 100 dB units are not allowed RoFset 7 5 for example ROFset Arguments None This simple query returns the current reference level offset If the offset is disabled the query returns 0 The units are decibels dB ROF set R ST 7 5 for example ROMode lt arg gt Arguments OFF ON This single argument command turns the reference lavel offset on and off Re ON ROMode OFF ROMode Arguments None This simple query returns the current reference level offset mode either ON or OFF ROMode MIKE ON RAUS OFF RQS lt arg gt 4 5 8 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 ROS ON ROS OFF EE SE SE 2711 amp 2712 Programmer Mannal ee SC Ce See RQS eo Arguments None This simple query returns the spectrum analyzer s current on off status of service request generation ROS ROS ON ros ofr for exanple RS232 lt arg gt
68. CALL IBFIND BDNAME BD GOSUB EVENT FIND EVENT FIND WRITS HDR OFF EVE DO CALL IBWRT BD WRTS CALL IBRD BD EVENT CODES PRINT EVENT CODES WHILE VAL EVENT CODE lt gt 0 RETURN Ee RS 232 ERROR REPORTING The RS 232 protocol does not contain a mechanism that duplicates the GPIB SRQ function as described earlier in this section To fill this need the RS 232 configuration supplies a settable VERBOSE mode as an alternative When VERBOSE moda is on every command is guaranteed a response Three response types are possible The string OK returned for a successful command e A query response returned for a successful query ERR n returned when error number n is detected Errors reported while VERBOSE mode is on have no effect on the status reporting structure described earlier for GPIB The RS 232 specific query STByte will return the GPIB serial poll response byte for analysis Because sTByte is a normal a Ve Busy bit bit 5 of the status byte is always reported to ba ON A query is the only means for returning information to the interface when VERBOSE mode is off In this mode the user must explicitly issue an EVENT Or STBYTE query to retrieve error information The REQUEST indicator on the spectrum analyzer s display screen indicates when an error is pending If Ros is on and an error is pending the REQUEST indicator appears on screen The programmer must send a sTByte query simulating t
69. DLE has the same effect as CNMode ON CNMode CMEas Arguments None This is a command with no argument that causes the spectrum _ Arguments None This simple query returns the status of the carrier to noise mode analyzer to perform a center measure When a Frequency CNMode Counter is installed 2711 requires Option 02 Frequency OMIE OFF Counter use the count query to return the resulting counted Se value Use the FREq query to return the new center frequency a when a Frequency Counter is not installed 2711 without Option CNMCDE IDLE 02 Frequency Counter The response CNMode IDLE is an indicator that there is no G signal the AM detector is not selected the noise is too close to the spectrum analyzer noise floor or analog mode is selected CNBw lt arg gt CNResult Arguments frequency in the range 1 Hz to 1 8 GHz Arguments None This single argument command specifies the bandwidth used by This simple query returns the result in decibels dB of the most the carrier to noise C N feature to perform a C N recent carrier to noise C N measurement performed by the measurement Hertz are used if no units are appended spectrum analyzer s C N feature The measurement is updated BER at the end of the current sweep if C N mode is enabled cNMode oew 4 0 Miz for example must be on to obtain valid results CNResult CNBw CNRESULT 4 658 1 for example Arguments None This simple query returns the noise bandwidth in Hertz used b
70. EVEL Y DBM Z DBM Figure 6 4 Prompting for a Numeric Entry Numeric Entry Hem 1 on the remote menu of Figure 6 4 is a numeric entry item This is a more complex entry because it requires additional interaction with the operator When the spectrum analyzer s front panel DI key is pressed a numeric entry line is displayed at the botiom of the screen with some terminator keys Figure 6 4 The user enters a number and terminator from the spectrum analyzer KEYPAD in response 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 Do key queries until the result is not NULL If m1 is returned key 1 has been pressed execute the following commands DEFMENU 14 sl CHANGE REF LEVEL NOW 12 3DEM DEFMENU L15 ENTER REF LEVEL _ DEFMENU Lien Y AM 2 D r 6 29 TEST MENU 0 INIT INSTRUMENT vi CHANGE REF LEVEL NOW 12 3 DBM 2 PERFORMANCE TESTS ENTER REF LEVEL 15 7_ Y DBM Z DBM Figure 6 5 Specifying a Numeric Value Next the programmer should use an algorithm similar to the following one to accept the data entry e Do KEY queries until the result is not NULL ae Use appropriate error checking to ensure only numeric decimal point and terminator key entr
71. Following the sequence is an additional checksum byte which provides an error check of the binary block transfer i SE 8 SE SEET ZE E 2711 amp 2712 Programmer Manual Se MESSAGE BUFFERING RS 232 Argument Delimiter The spectrum analyzer buffers each input message it receives 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 GPIB The spectrum analyzer buffers each input message it receives Message processing begins as soon as messages are received by the spectrum analyzer it does not wait for the message terminator Once processing begins the spectrum analyzer remains busy until it is done executing the commands in its input buffer untess the process is stopped by the DCL Device Clear or SDC Selected Device Clear GPIB messages lf an error is detected while transferring a command or query the remainder of the message up to the message terminator is discarded Output data are ready following execution of each query and are passed to the spectrum analyzer s output buffer prior to transmission over the bus The spectrum analyzer begins to transmit an output message after it is addressed as a talker and the data become available However the response terminator is not sent until the command terminator is detected in case there are more queries in the input message Output continues from the spe
72. G POWER SOURCE eent yi INTERFACE FUNCTIONS AND MESSAGES 2 ccssseeeeseres A 15 DC POWER SOURCE ccccsssssccsssessececccsessssnseesececesescerssseene V RL Remote Local Function sccscccssereesseessteesceeseereAT 6 PRODUCT GROUNDING c c ccscsccesescsssscsecssensessestsneeseessenrene Hl T TE and L LE Talker and Listener Functions A INPUT POWER AND VOLTAGE LIMITATIONS 00s s sesseseeee0 Vii SH and AH Source and Acceptor Handshake Functions A 17 USE THE PROPER EUSE nun Vil DG Device Clear FUNCHON svsvvvvsssssasssereeresserseereeeerren A18 GENERAL PRECAUTIONS ccccccsssesssessescsesseseessesnsessecere Vil DT Device Trigger Function escssersrensresssscassseesses A 18 C SR and PP Controller Service Request Section 1 Introduction Parallel Poll FURCHONS EEN A 19 GPIB OPERATION Na Taking Control Asynchronous or Synchronous 1 4 A 19 OPERATION OVER THE GEIB EES l Performing a Serial Poll ee EEN Ee System Controller eessen EEEennneenenen 174 Performing a Parallel Fo ressec A 200 Software Device Driveor eesssssserrsnsee EE E Appendix B RS 232 Concepts 2711 and 2712 Equipped with the GP 1 5 a Interconnecting Cable cssescccseseseestsesseeeeereeseees eee 1 5 INTRODUCTION TO RS 232 COMMUNIGATIONS BI Application Software sssesssssesecscssseeesseseeseensersneeens 16 RS 232 Signal Component sseessecssresseeeseveereeense B 2 Prin
73. GLEVEL Neer ES EE EE E es Pe RRR r 3 GE SS S See 2711 amp 2712 Programmer Manual oe SGTrak lt arg gt Arguments OFF ON 48 0 TGENAB OFF QOPFILT CD AQP OFF TITLE mit TTLMODE CEF TEXT REDOUT ON GRAT OFF PROTSED OFF PTYPE HPGL2 CALSIG OFF MSGDIM SEMICOLON HDR ON BOS OFF SGERR OFF RS ON TVLSTD NTSC VDMODE BROAD This single argument command enables and disables the signal track mode The command does not work in zero span mode Trak ON CAST VPOLARITY NEGATIVE VSYNC POSITIVE IVLINE 6 SGTrak OFF TVIMODE CONT TIME 50 B 3 TIMMODE AUTO TRIGGER FRERUN SIGSHP TMODE FREQUENCY VMONITOR ON TIME SGTrak 50 E 3 SSBEGIN 10 000E 6 SSEND 1 036E 9 CLOCK ON Arguments None This simple query returns the on off status of the signal track SGErr lt arg gt mode SGTrak Arguments OFF ON SGTRAK ON This single argument command enables and disables the Ge generation of a service request SRQ when a marker function is unable to find a signal scerr on enables SRQ generation for SIGswp event 896 ster ON Arguments None SGErrOrF 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 the currently selected SGErr trigger mode are satisfiad Any TRIGGER command cancels single sweep mode Arguments None 4 SiGswo This simple query returns the on off status of service request SRQ generation when a marker function
74. ICE CHARACTERIS TICS Communicating With the 2711 and 2712 The GPIB enables remote or automated control of instruments on the bus in this case a spectrum analyzer An application program often called a test measurement or control program determines spectrum analyzer operations by exchanging messages with the spectrum analyzer The messages can be of the generic GPIB type or they can be instrument specific Generic messages are usually carried out by GPIB hardware and GPIB device driver without intervention by the operator or programmer They typically implement routine housekeeping chores such as instrument addressing handshaking requesting service or terminating messages 1 13 The instrument 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 organization of the instrument specific messages is explained in the next section of this manual Section 3 Functional Groups provides a summary of the messages Section 4 Command and Query Definitions describes the individual messages in detail and Section 6 Programming provides some programming examples for the National Instruments GP1B 2711 or 2712 combination working in the QuickBASIC environment The spectrum analyzer is addressed as a talker or listener to send or receive messages depending on whether messages are being sent
75. IMER gt i 10 THEN COM 1 OFF set flags end of read y error query y END IF no communication open display error set error flag close com port IF error query In THEN GOSUB ERROR DISPLAY read errors 1 CLOSE 1 ELSEIF bufferS lt gt Y THEN GOSUB ERROR DISPLAY 1do the same as above CN genesis d EE 2711 amp 2712 Programmer Manual a read error 1 sat error flag CLOSE 1 END IF RETURN t END SUB T EEEE KICK dek ke kk kk Ah A A e tee procedure to SENDCOMMAND to the 2712 after input from the ENTERCOMMAND procedure Command passed in the global string WRTS NOTE Only SINGLE commands can be sent by the user DK I RK KK IR KI IO AR KKK RIK IK IK KEKE IKK kk k ERIK KERR SUB SENDCOMMAND wrt UCASES wrt FOR IX 20 TO 24 clear out response window LOCATE IX 8 PRINT STRINGS 66 mit NEXT 4 LOCATE 20 8 reposition cursor 1 POSIT1 INSTR wrt all queries end with 1 IF POSITI D THEN if no question mark GOSUB PROCESS ONE COMMAND one command entered ELSE GOSUB PROCESS ONE QUERY END IF EXIT SUB H err AAA errr rerrri rete kriet A eh tl sending a waveform to the 2712 is a different 1 process from all others so do it separately Beh RK A KK RIKI IK III R II KEI IK EKER ERIK ER HK RK ERE IK t PROCESS ONF COMMAND 14f a curve command then go and send it IF LEFTS wrt 3
76. KIER K KK KIKI KE KEKE KER ERE RRR kkk kk Communications are established with a baud rate of 9600 data bits set to 8 parity of NONE EOL CRLF FLOW CONTROL NONE ECHO OFF and VERBOSE ON U LK KK AIK KR RK KKK KKK KK ICR KKK K RIK KE KIR EK KEE RE EER ERE KEK xe PROGRAM EXPECTS 2712 TO BE SET THIS WAY FREER H If the 2712 is not so configured an error message is displayed directing the operator to configure the 2712 properly t DIO RIOR OI IIR III RIOR IO FOR A IIR III IIR BRR I DECLARE SUB SENDCOMMAND DECLARE SUB ENTERCOMMAND 1 DECLARE SUB PAUSE p DECLARE SUB RS232 CALLS COMMON SHARED rd wrt funct errfig end of read buffer wim e E Se SSS ARRAY to hold waveform acquired from 2712 ee SS SE SS SS SS SS SS SSE SSS ST SS SS SS HSS SSeS Se DIM SHARED wfm 511 begin program execution here nn ma s me eee mr ae ey ee en Se em cS e tere AE A AS EE GE Deeg 2711 amp 2712 Programmer Mannal Bos eee i S SE SS BEGIN PROGRAM KEY 15 OFF KEY 15 CHRS amp HO CHRS amp H1 ON KEY 15 GOSUB END PROGRAM KEY 15 ON t now execute routine which will accept all user input and display all responses t procedure continues until the user presses the ESCape key ee oe ee e ee eee Ee see END PROGRAM 1 COLOR 7 0 CLS END T EAO AA RA A RR KA ke e DORI e k k RIK kok RH KICK K k k k kokk k kk k k kk k E r read ro
77. LENAMES FILENAMES GOSUB GPIB ERR contains the name of RETURN che 2712 file to be restored t t 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 Di REGS PRINT ensure response header is on CALL IBWRT BD HDR ON GOSUB GPIB ERR tell 2712 which register and encoding to use WRTS WFMPRE WFID REGS ENCDG BINBLK CALL IBWRT BD WRITS GOSUB GPIB ERR CALL TBWRT BD CUR CALL IBRDI BN CUR S 9 1fetch curve GOSUB GPIB ERR data in packed binary CALL IBrdi Bd Cur 512 write over header characters lst 9 with data CALL DEBLK CUR CUR 512 8 NUMBYT PRINT OF BYTES CONVERTED NUMBYT RETURN DEBLK unpacks binary data and re stores as 2 byte integers in same array NUMBYT always equals 512 subroutine to find and display event code following an SRQ created by an abnormal event ABNORM EVE CLS PRINT AN ABNORMAL EVENT HAS OCCURRED PRINT GOSUB SERIAL POLL GOSUB EVENT FIND PRINT PRINT R TO RESTART ANY OTHER KEY TO END INPUT KEYS pressing R returns to IF KEYS lt gt R THEN END GOTO MENU RETURN eall subroutines to poll 19712 and find event code menu variables tare not erased 6 25 6 2 6 SC EE ee GE H subroutine to serially poll the 2712 read the status byte and print it u
78. M instead of MHZ in the RESBW 1 0M command Only the first letter of the unit is read The value and the units represented by the letter are dependent on the command it is used with 2 10 2711 amp 2712 Programmer Manual For instance M is interpreted as 10 Hz MHZ when used as above but represents 10 9 seconds MSEC when used with the TIME command Note however that commands such as REFLVL require the entire unit to avoid confusion between the various dB units i 6 Linked arguments vrtDsP are always delimited by colons Multiple linked arguments SAVE are always delimited by commas Querles A query can be represented graphically as shown in this example Header Delimiter space Query Header arg 1 Question Mark required Most queries recognized by the 2711 and 2712 have no arguments but a few have one argument There are no queries with multiple arguments Following are several examples of specific queries FREQ REFLVL VRIDSP RESBA VIEW A TIME These examples illustrate several characteristics of query formatting e A question mark 7 must follow the query header When an argument is used it must be separated from the question mark by a space e A command header can often be but not always turned into a query by adding a question mark 7 2 11 Responses A response can be represented graphically as shown in this example 2 12 Header Delimiter space bu
79. NE ON DIN F DLLimit lt arg gt Arguments OFF OVEr OVUNder UNDer This single argument command controls the status of the display tine limit detector When the limit detector is not off an SRQ and an event 895 are generated whenever the limit condition is exceeded The following table shows the four arguments and their resuking condition over Alarm when si nal gt display line UNDer Alarm when signal lt display line ovUNder Alarm when signal gt display line or 1 when signal lt threshold oF Noalarm DLLImit OFF DLidmit OVEr DLLimit OVUNGer DLLimit UNDer DL Limit Arguments None This simple query returns the current status of the display line limit detector os DLLdmit DLLIMIT OFF DLLIMIT OVER DLLIMIT OVUNDER DLLIMIT UNDER 4 21 DiValue lt arg gt Arguments MARker amplitude in the range 150 to 100 dBm This single argument command turns on the display line and tll sets its amplitude A numeric argument sets the amplitude to the value of the argument The units are the currently selected reference level units However the argument must be within a range of 150 dBm to 100 dBm or an equivalent in alternate units The MARKer argument sets the display line to the amplitude of the primary marker DLValue MARKer DiValue 30 for example DiLValue Arguments None This simple query returns the display line value Units are the currently selected ref levei units DLValue DSRe lt arg gt Nene A
80. OMMANCOG AER KEY ol a FPU GPIB codu NAK _ Asetcharacers hex is 21 decimal Figure A 3 ASCII and GPIB Code Chart REF ANS STD X3 4 1977 IEE STO 488 1078 190 STO 646 1973 A 10 Ce EE GPIB SIGNAL LINE DEFINITIONS Figure A 2 shows how the sixteen active signa lines on the GPIB are functionally divided into three component buses an 8 line data bus a 3 line data byte transfer control handshake bus and a 5 line general interface management bus The data bus contains eight bidirectional signal lines DIO1 through DIO8 Information in the form of data bytes is transferred over this bus A handshake timing sequence between the enabled talker and the enabled listeners on the three line data transfer control bus transfers one data byte sight bits at a time These data bytes are sent and received in a byte serial 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 listaner can accept them Figure A 4 illustrates the flow of data bytes on the bus when a typical controller sends ASCII data to an assigned listener The first data byte decimal 44 enables an instrument at address 12 as a primary listener The second data byte decimal 108 is optional for example enabling a plug in device at
81. ONLINE LOCATE 22 22 PRINT DATA BITS 8 LOCATE 23 22 PRINT FOL eene LOCATE 24 22 PRINT MCHO OFF b LOCATE 25 27 0 PRINT Press any key to continue DO WHILE INKEY LOOP BAUD RATE 9600 PARITY NONE CRLF FLOW CONTROL NONE VERBOSE e ON See ee SS SS SS SS SS SS SSS SS redisplay original screen omnes SS SSS SS SS SE SS SE SS hold min amp 0 max 41 mint 0 FOR indext 1 TO 8 FOR pt 0 TO 7 FOR q min TO max STEP 7 frgrnd colr p q MOD 16 bekgrnd colrt p q frornds 16 MOD 128 COLOR frgrnd bekgrnds LOCATE p 18 q 20 PRINT befores p q NEXT qt NEXT p IF min gt hold mint THEN 6 45 6 46 mins mint 1 hold min min ELSE mins mint 1 hold min 0 END IF NEXT index LOCATE hold y hold x COLOR 14 9 rds un D RETURN VIR IK KKK KERR KKK KKK KKK KEKE KKK AK HEHEHE EERE EKER KEKE KEKERE This routine performs all reading and error x r checking Uses 2712 VERBOSE mode DA I IIR OK RK FORT TOR TOR DOK RR KIKI OK KIRKE RIK IKE KKK RIK IKE U READ FOR VERBOSE tset two flags used in reading response end of read y error query N enable event trapping for communication on communications port 1 COM 1 ON i TIMER allow 10 seconds to respond from event query if no response assume communication not established DO WHILE end of read N IF T
82. P lt 16 THEN wrtS wrt O END IF wrt wrtS HEXS wim x NEXT t next calculate checksum NOTE see explanation of CURVE command for information on checksum calculation DU H check sum amp 3 D FOR x 0 TO 511 check sumt check sum wim x NEXT check sum amp check sum MOD 256 check sum amp 256 check sum amp MOD 256 U IF check sun lt 16 THEN wrtS wrtS o END IF wrtS wrtS HEX check sum amp H oN a i DEE 2711 amp 2712 Programmer Manual P finally the waveform is ready to send iT func 3 CALL RS232 CALLS RETURN display up to 5 lines of response 66 characters per line FRAGMENT RESPONSE display line t 1 DO WHILE display line t lt 6 rdi MIDS rd 1 66 posit 1 DO WHILE posit lt gt 0 posit INSTR rdi CHR 10 IF posit lt gt 0 THEN MID rd1 posit 1 sn END IF LOOP posit INSTR rdig CHR 13 IF posit lt gt 0 THEN rdi LEFT rdi posit 1 END IF LOCATE display line amp t 19 8 O PRINT rdais rd RIGHT rd LEN rd LEN rd15 IF LEN rd gt 3 THEN display linet display linet 1 ELSE display linet 6 END IF LOOP IF LEN rd gt 3 THEN GOSUB TEMP STOP END IF D RETURN routine to display the data on screen DISPLAY WAVE 6 51 6 52 wm x 20 y 8 FOR IX 0 TO 511 LOCATE x Y PRINT wfmt IX y yts IF y gt 70 THEN y
83. PGL4 This single argument command specifies the type of printer or plotter encoding to use for screen data transferred from the spectrum analyzer to the controller in response to the PLOT query PTYpe EPSON PTYpe HPGL2 Pre HPGIA 4 53 PTYpe Arguments None This simple query returns the type of printer or plotter currently selected for use with the PLOT query PTYpe PTYPE EPSON PTYPE HPGI2 PTYPE HPGIA QPFilt lt arg gt Only available for 2712 Option 12 Quasi Peak Detector Arguments A B CD This single argument command selects the Quasi Peak detector band for manual mode OPFilt A Filt B Filt cD QPFIt Only available for 2712 Option 12 Quasi Peak Detector Arguments None This simple query returns the Quasi Peak detector band for manual mode Filt OPFILT A OPFILT B OPFILT CD RECall lt arg gt Arguments Integer 0 to 39 except 9 19 and 29 This single argument command instructs the spectrum analyzer to recall the stored settings in the location indicated by the argument Integers between 0 and 39 inclusive are valid except for 9 19 and 29 RiCall 0 RECall 24 4 54 SR a SETHE SOOO 2711 amp 2712 Programmer Manual ee REDout lt arg gt Arguments OFF ON This single argument command turns the spectrum analyzer s on screen readouts on and off REDout ON REDout OFF REDout Arguments None This simple query returns the on off status of the spectr
84. PRE ENCDG aSC for exanple 6 XINCR lt nr3 gt X increment See following formulas When waive la EE 7 XZERO lt nr3 gt X zero See following formulas an argument it returns all the 9 XUNIT lt xunit gt X units HZ Hertz or S seconds information necessary to interpret the response to a CURve 10 YOPF lt nr1 gt Y offset H r query Following is an example of the response with HDR ON Ss WMPRE WFID lt register gt FNCDG lt type gt 11 yMunt lt nr3 gt Y multiplier 12 YZERO lt nr3 gt Y zero 13 YUNIT lt yunit gt Y units See following formulas See following formulas See following formulas DBM DBMV DBV DBUV DBUW DBUVM V or HZ NR PE 512 PT FMT Y PT OFF lt nr1 gt XINCR lt nr3 gt XZERO lt nr3 gt XUNIT lt xunit gt YFF lt nr1 gt YMULT lt nr3 gt YZERO lt nr3 gt YUNIT lt yunit gt EN FMP RP BYT NR 1 BIT NR 8 CRVCHK CHKSMO BYICHK None Binary format Bytes per number Bits per number Curve checksum 14 BN FMT RP 15 BYT NR 1 16 BIT NR 8 17 CRVCHK CHKSMO Always 8 significant bits Last byte of a binary or hex transfer is 2 s complement of the modulo 256 sum of bytes following header that starts block header is binary block H ascii The response identifies the wavefo ifi rm specifies data encodin and provides the offsets scale factors and units necessary e plot or interpret the curve data Tables 4 6 defi terms in the response 5
85. R 14 9 FOR i 3 TO 8 LOCATE i 6 PRINT STRINGS 70 NEXT LOCATE 4 15 0 PRINT THIS ROUTINE ACCEPTS SINGLE COMMANDS PRINT OR QUERIES ONLY D LOCATE 6 23 0 PRINT Press the Enter key to send LOCATE 7 23 0 PRINT Press the Esc key to end 68s SS SS SS SS LS SSS SL SL SS SS SS SS SS SS SS SS define a window for operator input COLOR 12 90 LOCATE 9 8 0 PRINT COMMAND INPUT COLOR 14 9 FOR i 10 TO 17 LOCATE i 6 PRINT STRINGS 70 D ni NEXT COLOR 12 0 LOCATE 18 8 90 PRINT SPECTRUM ANALYZER RESPONSE COLOR 14 3 FOR 1 19 TO 25 LOCATE i 6 ege H E SE 2711 amp 2712 Programmer Manual EE GE ERI EE E PRINT STRINGS 70 NEXT tset up linkage to 2712 func 1 CALL RS232 CALLS et ee ee a ee EE EE E E EE E wrt we Li t poet eee ES SS SSS HS SSS LSS SSS SSS SVS SS SS SS SS SSIS now accept user input which will be sent to 2712 woe eee ES SRS SS SS SS SSS SS SS SS SS SSS SS SS LOCATE 11 8 1 INS INKEY IF INS un THEN GOTO INLOOP ELSEIF LEN INS lt gt 1 THEN BEEP GOTO INLOOP ELSEIF INS CHR 27 THEN COLOR 7 9 CLS END ELSEIF INS CHRS 13 AND LEN wrt 0 THEN carriage return with no message is an error BEEP GOTO INLOOP ELSEIF INS CHR 13 THEN cr signals to send CALL SENDCOMMAND to user input to 2712 wrt mn reinitialize string holding input FOR x 11 T 16 reinitialize screen input area
86. R OFF Notice that in the case of most linked numerical arguments but not those resulting from VRTdsp WAV rm and WFMpre queries the link is turned off along with the command header but not in the case of linked character arguments see MFREq and VIEw in the table 4 31 TES fs T HDR ON TE PE EL FREQ FREQ 193 25E 6 GRAt GRAT ON MFREQ DELta MFREQ DELTA 4 5E 6 VIEw A VIEW A ON HDR OFF FREq 193 25E 6 MFREq DELta 4 5E 6 VIEW A A ON HDR Arguments None response header HDR HDR OFF HDR CN HELp Arguments None This simple query returns a list of all instrument specific commands including commands for all options whether present or not Hierz HELP AOQMODE AQP WEMPRE ZEROSP HRAmp 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 H the marker is not enabled the command enables a marker If signal track is enabled HRAmp1 turns signal track off enables the marker and assigns the knob function to marker control If there is no higher paak and SGErr is on an SRQ and event 896 are generated HRAmpL 4 32 on E SE SE SE SS 2711 amp 2712 Programmer Manual Eee oe eee Arguments None This simple query returns the instrument identification firmware version and installed options WD ID TEK 2712 V81 1 VERSION 10
87. Requires Option 08 RS 232 Interface Arguments see following table Arguments of RS232 and RS232 Values Dee SEPT TYP CRETE TEE EDI WE ca 110 150 300 600 1200 2400 4800 9600 vERbose __ _ Verbose mode on or OFF This is a command that configures the RS 232 interface The baud rate is set to the closest legal value when baud rates other than those listed are entered One stop bit is selected unless the baud rate is 110 in which case two stop bits are selected RS232 BAUd 9600 RS232 VERbose ON NOTE Although it is syntactically correct to send more than one argument per command it is dangerous to do so Execu tion 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 GE does it expect a parity bit on input Some terminals trans mit an 8 bit word with the 8th bit set to 0 when set to 7 bit no parity This can confuse the effort to ensure com patible settings between the spectrum analyzer and an external device See the RS 232 program example in Section 6 Programming wos Gerten 4 59 RS232 lt arg gt Requires Option 08 RS 232 Interface Arguments see table for Rs232 command This is a query that returns the current RS 232 parameter of the specified argument if no argument is given this command returns all RS 232 settings separated by commas R5232 FLOw RS232 FLOW HARD f
88. S Be bi SS 2711 amp 2712 Programmer Manual FREQ FREQ 200 00E 6 200 00E 6 VIEW VIEW WATERFALL OFF A ON B OFF C OFF D ON MINUSA OFF WATERFALL OFF A ON B OFF COFF D ON MINA OFF MAMPL DELTA Mat DELTA 18 5 18 5 Headers Examples of headers in this manual are written in capital letters but the 2711 and 2712 understand lower case letters or a mixture of upper and lower case as well Furthermore our examples use the long form of command and query headers However most but not all command and query headers can be written using as few as the first three letters That is FRE means the same as FREQ and TTLM means the sarne as TTLMODE As you become more familiar with the commands and queries you will find that the shortened forms are quicker to use However the long forms are easier to read and are always used by the instrument in response headers Throughout the remainder of this manual the long form for headers will be used but we will print the required letters in capitals and the optional characters of the longer form in tower case letters The following examples illustrate how headers will appear in this manual FREQ VRTdsp Mat CALSig You can also use variations of the short and long header forms That is VRT VRTd VRTds and vRTdsp ara all acceptable header forms for the vertical display command or quary 2 13 Ls 2711 amp 2712 Programmer Manual SS Space The
89. Signal find error MFBIG MRGTNX ete 4 0 ro E4 Fa Display line limit exceeded 0 E5 F5 Firmware error Byte value depends on B 1 or B 0 Where U UDP executing 1 N Normalization s executing 1 S Signal search executing 1 A Ensemble average executing 1 P Plot executing 1 B Busy 1 ATN OPT P Power on Command error Execution error Internal error User request Signal find error MFBIG MRGTNX etc Display line limit exceeded_ Device dependent failure or warning Device dependent operation complete EOS Norm etc Firmware error Normal device dependent status No status to report Table 5 5 Event Priorities Event zeck j ech Highest priority 1 Example 5 1 shows a QuickBASIC subroutine that can be used with the National Instruments GPIB board and software to report the current status byte The first five lines must be part of the parent program IBFIND and IBRSP are callable subroutines supplied by National Instruments See Section 6 Programming for explanations and additional programming instructions Example 5 1 Subroutine to Read the Status Byte REM SINCLUDE IBDCL4 BAS COMMON SHARED BDNAME BD SPR BDNAMES IER GA CALL IBFIND BDNAME BD GOSUB SERIAL POLL D D D SERIAL POLL CALL IBRSP BD SPR PRINT SPR RETURN om ee nies E ers gt ASCO Sc 2711 amp 2712 Progra
90. T eliminate extra characters and print PRINT PRINT SETTINGSS PRINT PRINT INPUT OK TO STORE ENTER Y OR N e Y IF Y N THEN RETURN tstore if everything OPEN O 1 FILENAMES IBCNT looks OK PRINT 1 SETTINGSS CLOSE 1 RETURN subroutine to restore a group of instrument settings from disk to the 2712 RES SET CLS PRINT PRINT ENTER NAME OF SETTINGS FILE PRINT INPUT FILENAMES OPEN I 1 FILENAMES read settings file INPUT 1 SETTINGSS CLOSE 1 l PRINT PRINT SETTINGS INPUT OK TO RESTORE ENTER Y OR N Y IF Y N THEN RETURN Tif displayed settings WRITS SETTINGSS OK then restore CALL IBWRT BD WRITS to 2712 GOSUB GPIB ERR RETURN subroutine fetches file from 2712 stores on disk SAVE EILER CLS PRINT PRINT ENTER NAME OF 2712 FILE TO STORE INPUT FILE2712 see FILE command for 2712 file names PRINT PRINT ENTER NAME OF DISK FILE for STORing INPUT FILENAMES FILE2712 UCASES PFILE2712 WRTS HDR ON FILE CHRS 34 FILE2712 CHR 34 CALL IBWRT 8D WRT b request file transfer GOSUB GPIB ERR CALL IBRDF bd FILENAMES read and store GOSUB GPIB ERR 2712 file to disk RETURN tas FILENAMES subroutine restores 2712 file from disk to the 2712 RES FILE ee EE 2711 amp 2712 Programmer Manual EE S SS SE CLS PRINT PRINT ENTER DISK FILE TO RESTORE TO 2712 INPUT FILENAMES note the file named CALL IBWRTF bd FI
91. TE VFEnab lt arg gt Arguments OFF ON This single argument command turns the video filter on and off VEEnab ON VFEnab OFF VFEnab Arguments None This simple query returns the current on off status of the video filter VEEnab VFENAB CN VEENAB OFF VFMode lt arg gt Arguments AUTo Fixed This single argument command enables AUTo and disables P1Xed automatic selection of the video filter bandwidth When fixed mode is first entered the automatically selected video filter bandwidth is made the current fixed filter bandwidth A new fixed filter bandwidth can then be selected locally or by using the vID 1t command VEMode AUTo Vibkxle Vie Lf 4 81 2711 amp 2712 Programmer Manual See E VFMods Arguments None This is a simple query whose response indicates whether the video fitter bandwidth is fixed or automatically selected by the spectrum analyzer ViMode VEMODE AUTO VEMODE FIXED VIDfit lt arg gt Arguments opp oN floating point number This single argument command turns the video filter on or off or specifies the filter bandwidth The on and opp arguments enable and disable the currently selected video filter in the same way as the vrEnab command A numeric argument is used to specify a particular video filter bandwidth and turn on the video filter Units may be appended otherwise Hertz are assumed The video filter bandwidths follow a 1 3 sequence The video filter bandwidth
92. TS IN DISPLAY Super SAVe Turn display storage on or off In any or all registers 2 B C MINUS A OFF View Minusa SAVe Is storage on or off in any or all registers 3 B C OFFSET TO CENTER POFset VIEw Turn display on and off in any or all registers Also turns 4 ACQUISITION MODE PEAK ACQmode 5 TITLE MODE OFF Le TTL Mode 6 GRATICULE ILLUMINATION ON GRAt 7 DISPLAY SOURCE AM INTERNAL DSRe 8 DISPLAY LINE 1 ON OFF OFF DLtne 2 VALUE ENTRY 20 0DBM DLValue 3 DISPLAY LINE TO MARKER DLValue 4 LIMIT DETECTOR OFF DLLimit 9 MIN HOLD IN WFM C OFF MNHid MHDest waterfall and B C minus A modes on and off VIEw What is the display status of any or all registers 3 15 Go sayana Ke S SE S E SS ME ee eo ee E E 2711 amp 2712 Programmer Manual EE eeng Header Function A ERE EEN LE T Y ACQmode Selects peak or max min acquisition mode ACQmode What is the acquisition mode AVDest Select destination register for ensemble averaging AVDest What is the destination register for averaging AVG Turn ensemble averaging on and off AVG is ensemble averaging on or off AVMode Select the ensemble averaging mode AVMode What is the ensemble averaging mode AVNum Select number of sweeps averaged AVNum What is the number of sweeps averaged D ne Turn the display line on and off DLIne Is the display line on or off DLLimit Contro the limit detector SWP TRIG UTIL MKR FREQ
93. The talker is inhibited from asserting DAV as long as any listener holds the NRFD signal line asserted NRFD Not Ready For Data An asserted NRFD signal alee 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 2 ee oe A E Bees RLS e ATN Controller H DAV Talker NRFD Listener DCAG Listener ao Byte H H H DH P t H H D t H H D H Capture Time Data Bus First Data Byte From Talker Device Depandent MSG Last Interface MSG Byte From Controller Figure A 5 Handshake Timing Sequence tdealized 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 Accepted Each assigned listener holds the NDAC signal line asserted until the listener accepts the data byte currently on the bus When all assigned listeners have accepted the current data byte the NDAC signal line becomes unasserted high telling the talker to remove the data byte from the bus The DAC message Data Accepted tells the talker that all assigned listeners have accepted the current data byte Note that one handshake cycle transfers one data byte The listeners then must reset the NRFD line high and the NDAC iine tow before the
94. UT FILE the same instrument in the event of NVRAM failure They are not intended or well suited for viewing curves or editing settings Similar files may be sent to different locations but you cannot CC transfer one type of file to another type That is you can return Permissible file names are established by the spectrum BSETO4 and send it to csETOS but you cannot return ACF2 and analyzer and are listed under the FILE command discussion rename it UDPO7 in Section 4 Command and Query Definitions The files are created within the spectrum analyzer s memory only as 3 The file name is embedded in the response so this subroutine transmits the file to the same location that it came from This limitation can be circumvented by inserting this line at the beginning of PUT FILE MIDS FILEDAT 1 FILE lt new filenames 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 Alternately you can use the National Instruments I1BWRTF and IBRDF Calls to transfer data directly between the spectrum analyzer and disk See Example 6 3 for an example of this approach Plotting Spectrum Analyzer Screen Data The PLOT query enables the transfer of data representing an image of the 2711 and 2712 display screen from the spectrum analyzer to a plotter or printer it performs a function similar to the front panel PLOT key The printer or plotter must spea
95. a local mode as opposed to remote mode and L LE Talker and Listener Functions The T TE and L LE functions are independent of each other although they are discussed under one heading The T Talker and TE Talker Extended functions provide an instrument and its secondary devices if any with the capability to send device dependent data over the GPIB or in case of a controller the capability to send device dependent program data over the GPIB The Talker T function is a normal function for a talker and uses only a one byte primary address code called MTA My Talk Address The Talker Extended TE S function requires a two byte address code an MTA code followed by the second byte called MSA My Secondary Address SS ZILI amp 2712 Programmer Manual oes SE Only one instrument in the GPIB system can be in the active talker state at any given time A non controller commences talking when ATN is released and continues its talker status until an Interface Clear IFC message occurs or an Untalk UNT command Is received 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
96. ader are delimited or separated from any following arguments by a space The space is optional if there are no arguments Argument An argument is the value s that a command query or response transfers to or from its associated spectrum analyzer setting s For instance in 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 or linked with a colon A block of binary data may comprise the argument of some waveform commands and responses Digit A digit is any of these numbers 0 1 2 3 4 5 6 7 8 or d Number Argument Number refers to a decimal number consisting of one or more digits Three number formats are possible Ooni Integer no decimal point om Floating point number decimal point required Integer or floating point number in scientific notation 2 0E 3 or 2 000E 3 for example instead of 2000 Units Engineering units can be appended to certain number arguments Except in the case of decibels dBs only the first letter of the units is usec the remainder is determined by context For instance the command FREQ 10 M is the same as FREQ 10 MBZ The M is interpreted as MHz because frequency corresponds to the FREQ command In a similar manner the letter M would indicate milliseconds when used with the TIME 10 M command Commands such as REF1lv1 require the entire dB unit
97. ak Detector ARFatt OFF Arguments ON OFF ARFatt This single argument command turns automatic Quasi Peak Arguments None mode on and off S SEH This simple query returns the status of automatic RF attenuation selection POP OFF ARFatt AQP Only available for 2712 Option 12 Quasi Peak Detector ARFATT ON Arguments None Bore This simple query returns the status of automatic Quasi Peak ATBI lt arg gt dee Arguments None integer in range of 1 to 5 sae Os This is a query with one or no argument that returns a listing of Gen the specified antenna table The argument is the number of the oe en 4 4 SC DEER EE SE 2711 amp 2712 Programmer Manual Bee GO SE antenna table to be listed H a number outside the range is AVDest lt arg gt indicated the fast table in the range is returned for instance an Arguments A B C argument of 6 returns table number 5 an argument of O returns i table number 1 If no argument is specified the currently This single argument command designates the spectrum selected table is returned analyzer display register used as the destination for ensemble S average and minimum hold operations The destination register BESS cannot be changed while a MIN Hold or ensemble average ATBL ANTENNA 3 operation is in progress l Cal Distance 3 0 Meters AVDest A Frequency Factor dB AVDest B Gate ZWNUest C 100 OMHz 1 0 AVDest 200 OMiliz a Arguments None 3 0 CA EE This simple query retu
98. al SE GPIB PORT CONFIGURATION Figure 1 3 The Spectrum Analyzer s GPIB PORT CONFIGURATION Menu The Power on SRQ team 2 of the GPIB PORT CONFIGURATION Menu POWER ON SRO causes the spectrum analyzer to produce an SRQ at power up To generate a POWER ON SRQ press 2 on the KEYPAD until the status changes to ON Normally there is no need to have the spectrum analyzer generate an SRQ when it powers up Therefore the default setting of Hem 2 POWER ON SRQ is OFF However some test sequences require that the power to the spectrum analyzer is removed power down Under these conditions you may desire the program to sense the return of power Setting the Message Terminator itam 3 of the GPIB PORT CONFIGURATION Menu FOE MODE selects the message terminator Whenever a message is transmitted over the bus the instrument sending the message must signify to other instruments on the bus including the system controller that the message has been completed This is done in one of two ways The interface management line named End Or identify EOI is brought to its low state simultaneously with the fast data byte that is transmitted The ASCII codes for carriage return CR and line feed LF are appended to the message string EOI is still asserted brought to its low state sirnultaneously with the transmission of LF All Tektronix instruments and controllers are equipped to use the EO selection You should
99. al approaches to GPIB and RS 232 programming on IBM compatible MS DOS PC DOS computers and their function alike counterparts The intent is not to teach you programming but to provide a few useful subroutines and demonstration programs Experienced programmers may not need to read this section There are no uniform standards for all GPIB boards and all programming languages The use of RS 232 is more standardized across the IBM PC family however the examples in this section will be both device and language specific You can benefit by reading the sections on GPIB programming even if you are programming for the RS 232 interface We recommend that you first read GP B related information then proceed to the RS 232 programming section for more specific information The programming language used for either interface is Microsoft s QuickBASIC version 4 5 INTRODUCTION TO GPIB PROGRAMMING The routines in the GPIB Sample Routines section can also work with earlier versions of QuickBASIC However you must use the appropriate GPIB system software and make the changes to function calls as outlined in the READ OB DOC document file from National Instruments The GPIB system software is that supplied by Nationa Instruments along with their boards The devices considered are the National instruments POH PCIIA and PCIVIIA GPIB boards supplied by Tektronix or directly available from National Instruments dealers Consutt Section 1 Introduction
100. ample program performs the following functions 1 Opens comi and establishes RS 232 communications with the spectrum analyzer using this configuration Baud rate 9600 Data bits 8 Stop bits 1 Parity None Verbose ON Echo mode _OFF Terminator CRLF Flow control NONE if the spectrum analyzer is not properly configured the program displays an error message Refer to the description of the Rs232 command in Section 4 Command and Query Definitions and the RS 232 installation procedure in Section 1 Installation for more information on RS 232 configuration 2 It accepts a spectrum analyzer command that the operator enters at the computer keyboard and sends the command to the spectrum analyzer The program terminates when the operator presses the ESC key on the computer keyboard 3 In all cases the program displays the spectrum analyzer s VERBOSE response to the command or query and awaits further operator input 6 33 Example 6 9 Sample RS 232 Controller Program DKK RK KKK IIR KKK KIER K KKK kkkkkhkkkkkkkkkkk ktkkkkkkkk This is an example of an interactive program allowing an operator to communicate with the 2712 al spectrum analyzer Commands can be sent to the 2712 and responses are read back l All communication is via R5232 and is contained in the procedure RS232 CALLS and in the subroutine READ BUFFER Communications are assumed to be passed through COM PORT 1 LK KK KKK IKK KEK A
101. an RS 232 interface Press _ Installation of the device UTIL 4 9 to see a list of the installed options and Configuring the optional printer and or plotter capabilities This section describes each task in detail Interconnecting Cable An appropriate interconnect cable is required to connect the controller to the spectrum analyzer The cable is supplied as part of the Tektronix GURU II package or it may be purchased separately from Tektronix by ordering P N 012 0991 01 1 meter or 012 0630 01 2 meter eme GE Le Ca 2711 amp 2712 Programmer Manual Ce fe el et td Daisy Chain Connecting Multiple Instruments on Figure 1 2 the GPIB Connecting the Equipment stem consists of a controller and spectrum ana yzer So en Ely connect one end of the interconnecting cable to each instrument A star configuration daisy chain configuration or combination of these Figure 1 2 should b used when more than two instruments are on the bus Upto 15 instruments can be connected To maintain electrical oo DEE EE performance of the bus use only one 2 meter cable per instrument and ensure that at least 2 3 of the connected instruments are powered up Configuring the 2711 or 2712 Turn on the power to the spectrum analyzer Then press UTUA A GPIB PORT CONFIGURATION Menu appears Ht should resemble the one shown in Figure 1 3 You will use this menu to configure the GPIB parameters Pla
102. arrays or variables at the beginning of your program even though they are to be used later For instance cur is the integer array used for curve data in our demonstration program RD is a string variable that we use as the destination for a variety of data transfers EE RT GE E GE A EE z See AIII amp 2712 Programmer Manual ESSERE Ke Ze Table 6 1 Variable Names Description Remarks Other names can be used such as MYDEV FRST DEV A1 Otc Any string variable name can be used such as MYNAMES DEVNAMS DNS etc os Name Integer value associated with a particular device name by IBFIND BDNAMES BD String variable set to a device name such as TEK SA The name is the one used when you set up the device with IBCONF A string variable argument of IBRD containing the 2711 or 2712 event code _ integer variable updated by GPIB system software after a read write or command the number of bytes transferred i EECH IBERR amp Integer variable returned by See your GPIB manual for GPIB system software when meanings of IBERR error bit of status word is values The name is set Range Oto 7 or10to reserved BDNAMES Any string variable name can be used MYNAMES DEVNAM DNS etc This name is reserved EVENT CODE IBCNT 16 IBSTA Integer variable updated by Refer to Status Byte in all GPIB system software Section 5 Status functions Reporting NUMBYT
103. ata block gt The response is in exactly the format needed to send a file to the spectrum analyzer The generat approach to file transfer is to read the response including header and filename into a string variable and write the variable to a disk file The presence of FILE lt filename gt within the disk file makes it possible to rastore the file to a 2711 or 2712 without having to explicitly send the FILE command or specify the spectrum analyzer file name Follow this sequence to store a 2711 or 712 file Send HDR ON to the 2711 or 2712 Send FILE lt filename gt query to 2711 or 2712 Read response into string variable FILEDATS Write FILEDATS to disk file MYPROG Use this sequence to restore the file Read file MYPROG to string variable FILEDAT Send FILEDATS to the 2711 or 2712 Be aware that all files except UDPs and even most UDPs occupy less than 5 kbytes of memory but a UDP file can theoretically occupy up to 64 kbytes Binary blocks are limited to 64 kbytes because of the 16 bit byte count See Section 8 Programming tor programming examples joy E 4 28 on FINE lt arg gt Arguments ON OFF This single argument command selects 1 dB reference level steps when on and 10 dB steps when opp FINe ON FiNe OFF FINe Arguments None This simple query returns the current on off status of the reference level steps on equals 1 dB step and orf equals 10 dB step FINe FINE ON FINE OFF
104. ate Heador DIR DATe What is the real time clock date DATIme What is the time of day CLOck Turn the date and time display on or off CLOck Is the date and time display on or off ERAse Erase the stored settings in a particular register ID List the spectrum analyzer firmware version and installed options INIT Reset to user defined or factory power up settings NORM Carry out the indicated normalizations NORM Return a list of current normalization parameters PKHeight Set the minimum signal height for marker functions PKHeight What is min signal height for marker functions PLLmode Turn phase lock on and off PLLmode Is phase lock on or off PROTset Turn stored settings files protection on and off PROTset 1s 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 RT me What is the real time clock time STOre Store the current settings in a stored settings file VFMode Selects auto or fixed video fitter made VFMode ls auto or fixed video filter mode selected ViDilt Sets and turns the video filter on and off VIDE What video filter is selected 1 Only avallable with 2712 3 21 D EFS E E 2711 amp 2712 Programmer Manual SWP TRIG UTIL MKRFREQ APPL 5 ansa DEMOD TG DSPL USER DEF INPUT SKS SAAR
105. ause it sets the driver to a known and presumably correct operating state from within the application program and just prior to actual operation H the MODE command is used the last settings applied to the interface must be ramsmbered If these data are not remembered your program will not work properly Configuring the Optional Printer or Plotter A variety of printers and plotters are available for use with your system The serial or parallel printer of your choice may be connected to the appropriate computer port For example the Centronics or GPIB compatible 4 pen Tektronix HC100 plotter is recommended Its four pens provide a useful complement to the four trace capability of the 2711 and 2712 A serial printor or plotter such as the Tektronix HC100 Option 3 can be attached to the spectrum analyzer s RS 232 interface instead of a computer controller This arrangement enables data transfer directly from the spectrum analyzer to the printer or plotter with a ramote PLOT command when the system controller is unavailable Of course the spectrum analyzer must be correctly configured using the SCREEN PLOT CONFIGURATION Menu UTIL 4 DI 1 28 os EE GE SE SE 2711 amp 2712 Programmer Manual Figure 1 7 located earlier in this section shaws two alternative configurations using a plotter A printer could be substituted for the plotter in either configuration Communicating with the Spectrum Analyzer Th
106. cing the 2711 or 2712 Online tem 0 of the GPIB PORT CONFIGURATION Manu STATUS controls the GPIB ONLINE OFFLINE status After ail preparations have been completed and GPIB operations are ready to begin press 0 on the KEYPAD to toggle item 0 until the STATUS indicates ONLINE The spectrum analyzer is then ready to exchange information over the GPIB Setting the GPIB Device Address Item 1 of the GPIB PORT CONFIGURATION Menu GPIB Sicht ADDRESS sets the spectrum analyzer s GPIB device address You must assign a prirnary address to the spectrum analyzer the 2711 and 2712 do not support secondary addresses The address can have a value from 0 through 20 However addresses 0 and 30 are usually reserved for system controllers The address you assign is not critical but it must not be the same address used for any other instrument on the bus NOTE You must assign the same GPIB address to the spectrum analyzer that was used when configuring the device driver for the spectrum analyzer To assign the address select item 1 GPIB ADDRESS from the GPIB PORT CONFIGURATION Menu Follow the on screen 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 sr set is read immediately by the spectrum analyzer and is permanently retained in non volatile memory e e E E SE 27 II amp 2712 Programmer Manu
107. ckout R SH AH DC PT Weeer See GTL IFC LLOA MSAA MTAA PPG PPD PPE PPU C L LE T TE E SDC Serial Poll Disable Serial Poll Enable e em erte Take Control Unlisten_ ICT UR a Multi line messages A 8 a ee E E 2711 amp 2712 Programmer Manual Table A 2 Interface Messages and Functions ra Remote Messages Sent Continued d Message Functlon Attention _ LG DAC Data Accepted AH DCL Device Clear GET Group Execute Trigger GTL Go To Local E O interface Clear Lon Local Lockout Main My Secondary Address C MTA O My Talk Address PPC Parallel Poll Config PPD Parallel Poll Disable EPPES _ Parallel Poll Enable DAC DAV__ Data Valid EC MTA es PPU O Parallel Poll Unconfigure via C REN Remote Enable We C RED Ready For Data AH DC4 _ Selected Device Clear Wat PD2 _ Serial Poll Disable via C SPE Serial Poll Enable via C SRQ Sarvice Request SR Ir O Take Control via C _UNL __ Unlisten __ via UNTA Untalk via C a Multi line messages VEER SE EE BITS NUMBERS SYMBOLS de COHTOOL 54 B3 B2 Bt i 6 2 D NUL 0 40 DLE Hi QTL 21 uopi 9000 112 Bopi wie 0910 0011 0100 0101 0110 0111 1000 1001 1040 1011 1106 1101 1410 1111 ADORESSED UNIVERSAL COMMAND C
108. closest to the specified filter width is selected VIDflt ON VIDFlt OFF VIDELt 30 kHz for exanple VIDFIt Arguments None This simple query returns the currently selected video filter bandwidth in Hertz whether or not the filter is enabled VIDflt VIDFLT 3 0E 4 for exanple VIEW lt arg gt Arguments A ON A OFF B ON B OFF C 0N C OFF D ON D OFF Minusa ON Minusa OFF Waterfall ON Waterfall1 oFrr combinations of the above This is a command with single or muttiple linked arguments that enables and disables digital display mode in the indicated 4 82 P EE 2711 amp 2712 Programmer Mannal EE register For instance VIEw A OH turns on the digital display in the A register VIEw A OFF turns off the A register Single or multiple arguments can be used in a single command as in this example h VIEw B ON for example VIEw A 0N B F for exanple VIEw A O0N B F C F for example VIEw Waterfall 0n A OFF for example Multiple arguments must be separated with commas VIEw 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 the state of the indicated register is returned when an argument is used VIEw VIEW Waterfall F A ON
109. co ho gt Dec Ge 27211 amp 2712 Programmer Manual Age GE Table 3 16 Miscellaneous Commands Function Header TEE ORES A SRE EOS Enable and disable SRQ on end of sweep EOS Is SRQ enabled or disabled at end of sweep ERr What is the error code EVEnt What is the event code GTL Go to local operation Header Function CLRMenu Clear the menu on the spectrum analyzer screen CLRKey Clear the tast key pressed DEFMenu Write a menu on the spectrum analyzer sereen FILE Store a binary block under a given file name FILE Return the named fite as a binary block KEY Simulate pressing a key HDR Turns the response header on and off RS HDR Is the response header on or off oe Return the identity of the last key pressed HELp Spectrum analyzer sends a list of valid GPIB command ory How much NVRAM is free headers PRDouts Return the spectrum analyzer on screen readouts MSGdim Selects semicolon or line feed as response delimiter MSGdlm What is the response delimiter RQS Enables or disables SROs except power on SRQ RQS Are SRQ s enabled or disabled RS232 Set RS 232 communications parametors RS232 Return all RS 232 communications parameters The remaining commands include a set of miscellaneous commands and those which support on screen menu definition and item selection Refer to Section 6 Programming tor an example of how these commands are
110. ctrum analyzer until the end of the information in the output buffer is reached or until it is interrupted by a DCL Device Clear UNT Untalk or IFC Interface Clear GPIB message if the spectrum analyzer is interrupted before the buffer is cleared output will resume if the spectrum analyzer is readdressed as a talker The buffer is cleared by the DCL or SDC messages The spectrum analyzer terminates the output according to the selected message terminator EO or CR LF EO unless it is interrupted Message processing begins as soon as messages are received by the spectrum analyzer it does not wait for the message terminator Once processing begins the spectrum analyzer remains busy until it is done executing the commands in its input buffer untess the process is stopped by a BREAK BREAK is sensed by the interface as a null character together with a framing error If an error is detected while transferring a command or query the rest of the message up to the message terminator is discarded l Under RS 232 operation buffering is handled by specifying a flow control method Refer to Setting Up the RS 232 in Saction 1 for instructions for details describing flow control configuration and use HARD flow control the default method uses the RTS Request To Send and CTS Clear To Send handshake wires In this mode the remaining output line DTR Data Terminal Ready is always asserted TRUE and input lines DCD Data Carrier Detect
111. d decode the status byte When an instrument supporting the GPIB service request function all Tektronix GPIB instruments do detects an abnormal condition it asserts pulls to its low state the dedicated service request SRQ line of the GPIB interface management bus indicating that it requires attention Therefore to classify abnormal conditions you can construct a subroutine which monitors the SRQ line Either of the foregoing techniques can then be used to determine the nature of the event causing the SRQ THE SERVICE REQUEST The 2711 and 2712 spectrum analyzers have complete support for the IEEE 488 service request function see Appendix A SRQs may be created by an instrument on the GPIB in response to certain equipment states including all abnormal conditions However SRQ generation may also be disabled with the Ros command In addition to this general capability for inhibiting SRQs certain SRQs may be independently masked The following events can generate SRQs Press the front panel key sequence UTIL 6 This is the user request event The resulting SRQ cannot be independently masked e Completion of certain operations including End Of Sweep normalization User Defined routine signal search plot or ensemble average Intermediate operation complete events are blocked The plot complete event is generated after the plot is formatted and sent to the plotter not necessarily when the plotter is finished The
112. d to 2 seconds Sweep times fess than SE 100 microseconds are not permitted in display storage mode TITle SCREEN 1 for example age Wee TITLe TMe DEC A ts N TiMe 25 us for example rgumenis None This simple query returns the spectrum analyzer screen title if TIMe one currently exists If the title was sent in lower case letters the returned string will be lower case even though the title is Arguments None displayed in upper case letters on the spectrum analyzer screen This simple query returns the currently selected sweep speed e Units are in seconds EEN TMe TIME 25 E 6 for example TMOde lt arg gt TIMMode lt arg gt Arguments FREquency MARker TG VIDline Arguments AUTo MANual Fixed This single argument command selects the frequency marker knob function This single argument command enables AUTO and disables FIXed automatic sweep speed selection This command also enables manual sweep positioning MANua1 using the spectrum Argument Function oom analyzer s LEVEL control When in the rIxed mode the sweep Adjust start or center frequenc l speed is controlled locally or with the TIME command l TIMMode AUTO TIMMode FIXed Select video line number if knob TIMMode MANual selectable TV line triggering is enabled A EO 8 ees a SE GC SE NS E 2711 amp 2712 Programmer Manual SS ee eae a d E g TMk FREquency Tie MARKer Mei TG M VID line TMOda Arguments None This simple query r
113. e RS 232 interface enables remote or automated control of the 2711 and 2712 spectrum analyzers An application program often called a test measurement or control program i determines 2711 or 2712 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 organization of the spectrum analyzer spacific messages is explained in the next section of this manual Section 3 Functional Groups provides a summary of the messages Section 4 Command and Query Definitions describes the individual messages in detail and Section 6 Programming provides some programming examples Programmed commands and data are transmitted over the interface to the instrument as soon as they are delivered to the driver If the command is a query FREQ for example the spectrum analyzer formats a response immediately and sends it back to the computer The control program is responsible for handling incoming data in a timely fashion Preparing the Software After completing the set up procedures your equipment is ready for RS 232 operation but you must still provide the software needed to control the spectrum analyzer When creating new software this is usually a two step process The first step is to establish the programmin
114. e destination register for the CURve SS command query and the data encoding to be used during a VRIDSP EXTERNAL 175 E 3 for example curve transfer Multiple arguments separated by commas may be used See the cuRve command for an explanation of VSYne lt arg gt Requires Option 10 Video Monitor data encoding Arguments NEGative POSitive in its simplest form an argument s always follows the command EEN eebe header These are examples of the general form to be used f E specifies the polarity of the video syne to be receivad with the Video Ai e de WeMpre WPID lt register gt VSYne NiGat ive WiMpre ENCdg lt type gt VSYne POSitive WeMpre WFID lt register gt ENCdg lt type gt VSYnc where Arguments None lt register gt A B C or D lt type gt Asc Bin or Hex This simple query returns the currently specified video sync For instance these are all possible wrMpre commands polarity me WiMpre WFId A VSYNC POSITIVE WeMore WFId C WAIt WeMpre WFId D WiMore ENCdg Asc Arguments None W e ENCdg Bin ad a comand that requires no argument It causes the WMpre ENOdg Hex um analyzer to wait for an end of swesp to occur before parE any more commands WAIt can be cancelled by the EE Gen SV SE GPIB commands or the RS 232 BREAK command The last command string is a typical message In this example it Eos command indicates that register D Is the source destination for future WATE curve transfers and that
115. e eight data lines simultaneously As soon as they are transferred the next 8 bit data byte is placed on the lines and transferred Data consist 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 interface management lines Handshaking and interface management are necessary because the bus operates asynchronously meaning that signals can be generated by one instrument without regard for what another may be doing or the rate at which the instrument can carry out an operation For instance two instruments may try to send information simultaneously or a high speed instrument may try to send data to a low speed instrument Instruments connected to the bus are designated as talker listener or both talker and listener A listener can only receive information over the bus and a talker can only send information A talker and listener can do both but not simultaneously One instrument is usually designated as the system controller This is generally a computer which determines through software when specific instruments are activated as talkers or listeners Each instrument is assigned a unique address between 0 and 30 but only 15 instruments can be connected to the bus simultaneously The following example illustrates how data transfer typically takes place except in the case of abnormal events see Status R
116. e is a reporting feature provided in the IEEE 488 standard When the spectrum analyzer is serially polled by the controller it places a byte representing its general condition on the data bus This status byte is then read by the controller Event codes are generated by the spectrum analyzer for transmission to the controller over the data bus in response to an instrument specific EvEnt Or ERr query NOTE The 2711 and 2712 supports serial polling only they do not support parallel polling The status byte and event codes can indicate normal or abnormal conditions although they typically alert the system user 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 For instance suppose the signal on the spectrum analyzer screen is larger than the current reference level and you attempt to use the MMAx command to place the marker on the signal peak The status byte following the command 1110 0000 only indicates that a device dependent failure or warning conclition exists while the event code 810 indicates signal out of range oor BEE 2711 amp 2712 Programmer Manual Two techniques are available for monitoring the status of the spectrum analyzer at any time e issue an EVEnt Or ERr query and interpret the numerical response e Serially poll the instrument an
117. e ordering information Connectors may be rigidly stacked using standard counter bored captive screws ELECTRICAL ELEMENTS The voltage and current values required at the connector 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 e Logical 1 is a true state low voltage level lt 0 8 V signal line is asserted Logical 0 is a false state high voltage level 2 2 0 V signal line not asserted Messages can be sent over the GPIB as either active true or passive trua signals Passive true signals occur at a high voltage level and must be carried on a signal line using open SC devices Active true signals occur at a low voltage evel DER WEEN AE dee SE EE SN SS CR e SS 2711 amp 2712 Programmer Manual es PE SRP interface Function Controller FUNCTIONAL ELEMENTS The functional elements of the GPIB cover three areas The ten major interface functions of the GPIB are listed in Table A 1 Each interface function is a system element that provides the basic operational facility through which an instrument can receive process and send messages over the GPIB The second functional element is the specific protocol by which the interface functions send and receive their limited set of messages The logical and timing relationships between allowable states for all interface functions is t
118. e spectrum analyzer prompts for further input by returning the string gt to the controller 1 26 EE SE SE e DEE ee SRN SRC S Ze X E SE 2711 amp 2712 Programmer Manual For example if ECHO mode is ON gt appears on the terminal or computer display screen If the command VPO is entered the spectrum analyzer returns VPO followed by a normal response to the query such as VPOLARITY POSITIVE ft then appends the gt indicating it is ready to receive additional commands Because ECHO mode lets you see each character received by the spectrum analyzer it is sometimes useful for interactive testing Following are some important ECHO mode characteristics to keep in mind If SOFT flow control is enabled CTRL S or CTRL Q are not echoed but they perform their normal functions If either CR or LF is received by the spectrum analyzer it is echoed as the currently selected output terminator Any other control character echoes as an up arrow D followed by a capital letter for example X represents pressing CTRL and X at the same time ECHO should not be ON with binary transfers if ECHO is ON the prompt character appears on the display under other conditions 1 when the instrument is powered up or placed on line with ECHO mode ON 2 when ECHO is turned on and 3 afier a device clear break is received Verbose Mode and Error Handling item 7 of the RS 232 PORT CONFIGURATION Menu VER
119. e used to deal with each type Errors are typically trapped so corrective action can be taken or the program is caused to end in a non destructive manner gracefully DOS Errors DOS errors may 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 CN ERROR GOTO ERR TRAP Next you should construct a subroutine to deal with the problem This routine may be used to end the program in a non destructive manner gracefully ERR TRAP PRINI DOS ERROR HAS OCCURRED PRINT CHECK YOUR SYSTEM SETUP END RESUME NEXT 6 4 With this routine the program stops if a DOS error is encountered You simply check your system and restart Consult a BASIC programming manual for selective error trapping techniques and other approaches GPIB System Errors Instruments with a GPIB interface may encounter GPIB system errors See Sample AS 232 Controller later in this sec tion describes error handling for RS 232 These errors are da tected by examining 1BsTA following each GPIB function call A GPIB error has occurred whenever the value of IBSTA is equal to or greater than 32768 To determine what type of error has occurred you can check the value of IBERR Once you have verified the
120. e used to represent a device dependent message l The standard recommends that the alphanumeric codes associated with the numbers symbols and upper case characters decimal 32 to decimal 94 in the ASCII Code Chart Figure A 3 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 A 2 MODE V VOLTES 2 58 3 FREQ 1 053 The ASCII character string from this example sent when the ATN line is unasserted talls the signal generator to set its front panel controls to the voltage mode MODE V VOLTS and produce a 2 5 mV signal 2 5E 3 at a frequency of 1000 Hz FREQ 1 053 When 8 bit binary codes other than the ISO 7 bit are used for device dependent messages the most significant bit shouid be on data line DIO8 for bit 8 To summarize the difference between interface control messages and device dependent messages on the data bus remember that any message sent or received when the ATN line is asserted low is an interface control message Any message data bytes sent or received when the ATN fine is unasserted high is a device dependent message Tabie A 2 Interface Messages and Functions Remote Messages Sent Mnemonic Mossage ATN Attention AH CL LE PP SH T TE DAG ___ Data Accepted DAV Data Valid DCL Device Clear Group Execute Trigger Go To Local interface Clear Local Lo
121. eadouts provide a Print Yes summary of the important operational instrument parameters data The PRDouts query enables returns most of these readouts to the computer This query does not return the spectrum analyzer s general purpose message line the GPIB status line or the user defined DISPLAY MESSAGE line The PRDout s 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 Yes arguments are listed in Section 4 Command and Query Done Return Definitions under PRDouts The response is ASCII encoded and can be read and displayed on the controller screen using the subroutine in Example 6 5 Figure 6 2 Possible Data Print Plot Scheme co pg os EI FA EE Example 6 4 Subroutines to Return or Send Screen Plot Data GET PLOT RESERVE SPACE FOR SCREEN DATA PLOT DAT SPACES 12000 SET PLOTTER TYPE AND REQUEST SCREEN DATA WRIS PTYPE HPGL4 PLOT CALL IBWRT BD WRTS GET SCREEN DATA CALL IBRD BD PLOT DATS TRIM DATA TO NUMBER OF BYTES TRANSFERRED PLOT DATS MID PLOT DATS 1 BCNT RETURN SEND PLOT DISABLES TIME OUT TO GIVE PLOTTER TIME TO FINISH CALL IBTMO BD 0 CLS SEND SCREEN DATA TO PLOTTER PLOTTERS HC100 CALL IBFIND PL PLOTTERS CALL IBWRT PL PLOT DATS PRESS A KEY AFTER PLOTTER FINISHES PRINT PRESS ANY KEY TO CONTINUE DO WHILE INKEYS LOOP REESPABLISHES 30
122. ectrurn analyzer A second RS 232 port a GPIB port or a Centronics port on the computer is then used to produce output on a printer or plotter SETTING UP FOR RS 232 OPERATION Your equipment must be correctly configured before performing RS 232 operations The following tasks must be completed Installation of cables between the system components e Configuration of the spectrum analyzer and device driver Installation of the device driver into controller memory e Configuring the optional printer or plotter This section describes each task in detail Connecting the Equipment Only one device computer plotter or printer can be attached AT to the spectrum analyzer s RS 232 interface For systems consisting of a controller and the spectrum analyzer you can simply connect one end of the interconnecting cable to each device Figure 1 7 shows two possible configurations See Appendix B for the cable configuration appropriate for your setting Configuring the Spectrum Analyzer Both devices the computer and spectrum analyzer in an RS 232 system must be configured the same way Before setting up the spectrum analyzer be sure to check the configuration settings for the device with which you expect to communicate To set the spectrum analyzer configuration settings turn on the power to the 2711 or 2712 and press UNA onthe KEYPAD An RS 232 PORT CONFIGURATION Menu a appears that is similar to the one shown in Figure
123. ed If fewer than 32 characters are contained in the tink argument the string is padded with spaces to a length of 32 f the spectrum analyzer screen is displaying a spectral display or a built in menu at any level this command places a new menu on the screen If the instrument is already in a User Defined menu only the lines referenced in this command are replacad Use CLRMenu to clear a User Defined menu The DEFMenu command also clears the last key press but only if the User Defined menu space is clear See Section 6 Programming for an example DEFMenu LO TEST MENU DEFMenu LO TEST MENU L2 TEST 1 L3 TEST 2 4 18 ge 2711 amp 2712 Programmer Manual DETector lt arg gt Arguments AM AMFm FM OFF This single argument command determines the type of signal detector used for the audio output Depending on the argument the AM FM or both detector outputs are presented at the spectrum analyzer audio output The audio output cannot be used in Video Monitor mode Option 10 DETector AM DiTector AME DETector FM DETector OFF DETector DIR Arguments None This simple query returns the current status of the audio source whether the output of the AM detector FM detactor neither or both are being presented at the spectrum analyzer audio output DETector DETECTOR MM DETECTOR AMEM DETECTOR FM DETECTOR OFF Arguments None This simple query returns a formatted system file directo
124. ence level offset mode on and off Is reference level offset mode on or off Select an antenna table What antenna table is selected Select measurement distance in dBuV m mode What is the measurement distance Select destination register in dBuV m mode What is the destination register Select marker units of dBpV m or Volts m in dBuV m mode What is the marker unit in dB V m mode oe SA A EE S EE SWP TRIG UTIL MKR FREQ APPL CC DEMOD DSPL USER DEF Sdt ed TRIGGER MENU 0 FREE RUN 1 INTERNAL 2 EXTERNAL 3 LINE 4 TV LINE 5 TV FIELD SWEEP MENU TRigger 50MS DIV TiMe 6 SWEEP RATE 7 MANUAL SCAN OFF TiMMode 8 SYNC POLARITY POSITIVE VSYnc 9 SETUP TABLE HORIZONTAL LINE TRIGGERING 0 CONTINUOUS 1 KNOB SELECTABLE TVLMade 2 KEYPAD ENTERED TVLine 3 KEYPAD ENTRY 4 TV LINE STANDARD TVLStd ZE EE Sec K E Se 2711 amp 2712 Programmer Manual E Function TiMe Set the sweep rate TIMe What is the sweep rate TiMMode Select auto manual or programmed sweep TIMMode What is the sweep mode TRigger Select the trigger mode What is the trigger mode p TVLine Select the number of the video raster line to trigger on when TV line triggering is selected 1 TVLine What is the number of the TV line to trigger on 1 TVLMode Selects continuous or programmed TV line trigger TVLMode Is continuous or programmed TV line trigger used TVLStd Selects TV standards used in va
125. eporting in Section 5 1 The instrument on the bus that is designated as system controller determines through operator intervention or program control that it needs to send a message to one of the other instruments 2 Using the data and interface management lines the controller first addresses the desired instrument as a listener This is called LISTENING an instrument S CS Si e e Se 2711 amp 2712 Programmer Manual 3 Normally the instruments on the bus are idle and signal via the handshake lines when they are ready to receive data The controller then places the first byte of the message on the bus indicating the type of information it wants for instance the current signal amplitude 4 The controller then signals also via the handshake lines that the data byte is ready 5 As the listener accepts the data byte it signals over the handshake lines that it has done so The controller then removes the data from the data lines 6 The process from steps 3 4 and 5 repeats until the entire message has been transferred 7 The controlier indicates that the last data byte has been sent Depending on the option selected this is done by signaling over the EOI interface management fine simultaneously with the fast data byte or by 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 complete the controller normal
126. er Instrument B talk and listen Digital Voltmeter Instrument C listen only Signal Generator Instrument D talk only Counter Figure A 2 Typical GPIB oo 2711 amp 2712 Programmer Manual KE D See E 2711 amp 2712 Programmer Manual Re ESOS X 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 Data Bus messages in some mutually exclusive set is called a multi line 8 Signal Lines message only one multi line message message byte can be sent at one time A message sent over a single line is called a uni line massage two or more of these messages can be sent concurrently Only multi line messages are discussed here uni line messages are discussed later in this section see GPIB Signal Line Definitions The interface control messages Figure A 3 are sent and raceived over the data bus only when the ATN attention line is Transfer Bus asserted true Interface message coding can be related to the Handshake ISO International Standards Organization 7 bit code by 3 Signal Lines relating data bus lines DIO1 through DIO7 to bits B1 through B7 respectively in the Bits column in Figure A 3 Interface control messages Table A 2 include the primary talk and listen addresses for instruments on the bus addres
127. er achieved in practice The query does not return the spectrum analyzer s general purpose message line GPIB status line or user defined DISPLAY MESSAGE line The following response example is returned after initializing the spectrum analyzer to the factory defaults See section 6 Programming for programming examples PRDouts PROOUTS SOOMHZ 20 0DBM 1 80MHZ MAX 5MHZ RE MATIN S50DB WE WIDE 10DB un M mi ele H nne PREamp lt arg gt Arguments OFF ON This single argument command turns the built in preamplifier on and off PREamp ON PREamp OFF PREamp Arguments None This simple query returns the current on off status of the built in preamplifier PREamp PREAMP ON PREAMP OFF SEN REN EE PROTset lt arg gt Arguments OFF ON This single argument command turns stored settings protection on and off Stored settings cannot be erased when PROTset is ON PROTset ON PROFset OFF PROTset Arguments None This simple query returns the current on off status of the stored settings protection Protected settings cannot be erased PROTset PROISET ON PROTSET OFF PSTep Arguments None This is a command that requires no argument It is equivalent to turning the frequency markers knob one click in the clockwise direction The spectrum analyzer s response depends upon the currently selected knob function PSTep PTYpe lt arg gt Arguments EPSOW HPGL2 H
128. eral more points worth noting about the various ER encodings Binary encoding uses one byte per data point making it more compact and faster than the other techniques Gaas DESEN EEN EE PILLILE EEEE EEIT ED 2711 amp 2712 Programmer Manual Hexadecimal always uses two bytes per data point thus it requires no delimiter to separate the points Decimal uses a variable number of bytes 1 to 3 to encode each data point and therefore requires a data point delimiter the comma The use of delimiters in decimal encoding makes this form compatible with many spread sheets and word processors This enables you to create custom waveforms for later transmission to the spectrum analyzer or to edit waveforms previously raturned from the spectrum analyzer CURVE lt space gt lt ind gt lt bo gt lt be gt lt dy gt lt dp gt lt dg 4o gt lt checksum gt where CURVE _ Gage Be w dd deis ZS checksum Command header Header delimiter SE Absent when ASCtl encoded decimal is used equals H when ASCll encoded hexadecimal is used equals the sign when binary is used High order byte of the number of data points always 512 plus one in the data block absent in decimal 00000010 in binary 02 in hexadecimal Low order byte of the number of data points always 512 plus one in the data block absent in decimal 00000001 in binary 01 in hexadecimal 15 data point 2 data point 512 da
129. eration part of Section 1 The instrument specific messages are constructed in a similar d ves _ way The following definitions clarify the structure kierch SR automatically by the GPIB Input Message l aai Message Terminator RS 232 An input message is one or more message UNIS a ng with any message unit delimiters and a message terminator transmitted We dee dee from the controller to the spectrum analyzer terminator Messages sent by the spectrum analyzer over the RS 232 interface can be terminated in the following ways Output Message An output message is one or more message units along with By CR only carriage return ASCII 13 any message unit delimiters and a message terminator lt By LF only line feed ASCII 10 transmitted from the spectrum analyzer to the controller y By CR LF carriage return followed by line feed ni e Uni lt ina TEE See Setting the Message Terminator in the Setting Up message unit is a single command query i ed for RS 232 Operation part of Section 1 for instructions on Message Unit Delimiter configuring the message terminator for RS 232 instruments ess A semicolon must be used to delimit or separate message Command units in a message Following the last message unit the use of A command generally consists of a command a S eelere opena e 4 E ER ef aras a last header header delimiter argument s and argument delimiter analyzer a ays appen s a messag However some commands have no
130. eries contro settings parameter values or display information If a computer is connected to the spectrum analyzer via the RS 232 interface the computer s serial interface called a COM port if the controller is an MS DOS must be correctly contigured beforehand Programmed commands and data can then be transmitted over the interface to the instrument if a query such as FREQ Is transmitted the spectrum analyzer formats its rasponse immediately and sends it back to the computer The contro program must be ready to receive the incoming data In the following subsections you will learn how to set up your 2711 or 2712 for RS 232 operation Appendix B provides additional information concerning RS 232 Implementation for the 2711 and 2712 including wiring for connectors and null modem adapters OPERATION OVER THE RS 232 INTERFACE The following items are needed to operate the 2711 and 2712 Spectrum Analyzers over the RS 232 interface e System controller or terminal Software device driver 2711 or 2712 aquipped with an RS 232 interface Interconnecting cable Application software Printer or Plotter Optional Figure 1 7 shows two RS 232 system configurations The top illustration shows a computer PC controlling the spectrum analyzer via the RS 232 interface with a plotter connected to the computer over a Centronics interface The lower illustration shows the spectrum analyzer connected directly to a plotter via the RS 232 interface
131. ermissible CESF CENter CFSE STArt CFSF Arguments None This is a simple query whose response indicates whether the spectrum analyzer s on screen frequency is the center or start frequency CYSF CESF CENTER CESF START CLOck lt arg gt Arguments ON OFF This single argument command turns the date and time display on and off CLOck OH CLOck CEF Nae CLOck Arguments None This simple query returns the status of the date and time display CLOck CLOCK ON CLOCK OFF CLRKey 4 10 Arguments None This is a command with no argument that clears the last key pressed so that only new key presses are reported by the KEY query After using the CLRKey command KEY returns NULL until a new key is pressed CLRKey 2711 amp 2712 Programmer Manual Pe o EE SE EE SE SEH D OC SC Sc SS CNMode lt arg gt Arguments ON OFF IDLE CLAMenu Arguments None Pee This single argument command turns the carrier to noise C N This is a command with no argument that clears the menu mode s on off status All marker modes are turned off when C N defined with a DEFMenu command This command clears the mode is enabled RAM space used by the User Defined menu takes the spectrum Ss analyzer out of menu mode and clears the last key pressed as reported by the KEY query With this command the spectrum CNMode OFF analyzer always returns to the spectral display CNMode IDLE CLRMenu a CNMode I
132. eturns the currently selected function of the frequency markers knob TMx TMODE FREQUENCY TODE MARKER TOE T TMODE VIDLINE TOPsig Arguments None This is a command that requires no argument It instructs the spectrum analyzer to change the reference level to the amplitude of the primary marker A marker must be enabled TOPsig TRigger lt arg gt Arguments EXternal FRErun INTernal LINe TVField TVLine This single argument command selects the trigger type TVLine also sets the knob function to VIDLINE if knob selectable TV line mode is enabied TRigger ExTernal TRIgger FRErun TRigger INTernal Tier Le Rigger TV ield TRIgger TVLine 4 77 TRigger Arguments None This simple query returns the selected spectrum analyzer trigger type TRIgger TRIGGER FRERUN TRIGGER EXTERNAL TRIGGER INTERNAL TRIGGER LINE TRIGGER TVFIELD TRIGSER TVLINE TYLMode lt arg gt Arguments OFF ON This single argument command turns the spectrum analyzer screen title on and off TELM ON TILIM OFF TTLMode Arguments None This simple query indicates whether the spectrum analyzer s screen title is being displayed on or is not displayed OFF TTiMode TTIMODE ON TTIMODE OFF TUNe lt arg gt Arguments Frequency in the range 1 8 GHz to 1 8 GHz This single argument command changes the start or center frequency by the amount of the argument The resultant frequency must remain within the range of 10 MHz to
133. ex r 22 D m 0 2 PO TD PPO PDO Tho Ia RO EN N pit PIP ip ip i 2 224 224 RO jh NO PN ip EO RO EDD TRO TRO PRD TRS TRO ERD IRD TPO RO TRO TR TRO TRO TRO FRO alo 2 NIR Aje 224 RO RO FR RO 7 RO IN SLP gt m ID ojo 2 7h YN JP MIN NS Baa 80 224 EO H LL EENS Of G d EE sd BEE 712 Programmer Manual SE emamna Event Description 1 FREQ Norm Suggested Set VCO Polynomial Has No Solution Last Pwr Down Reg Checksum Err Storage Register Empty Normalized Result Out of Range Function not avail in LIN mode Cannot Store NV Memory Full AMPL Norm Suggested VR Pin DAC Cannot Calc Vert Sensitivit Cannot Count VCO IF Cannot Normalize PLL VCO Cannot Count Beat Frequen FREQ Norm Suggested Set Beat FREQ Norm Suggested 1St LO Setting Corrupted NVM Fragmentation Err NVM Segmentation Error Comm Port Not Installed Real Time Clock Hardware Failure Real Time Clock Not Installed FREQ Norm Suggested Find Side FREQ Norm Suggested Span DAC Insufficient Memory Available Not Avail in Short Holdoff Mode Short Holdoff Mode Not Installed Cannot Overwrite Stored Setting Cannot Overwrite Stored Waveform Delete Existing Program First Editing Buffer Is Empt Remove Protection First Wait Aborted Sweep Not Armed Selected Program s Emp EE GE 2711 amp 2712 Programmer Manual ORES Event Code zl oO ai J J F o
134. examples using CURve and CURVe oo perae 2711 amp 2712 Programmer Mannal EE SINT CURve or CURve lt arg gt DATe Arguments None A B C D This is a query with either one or no arguments that returns a complex response representing the contents of a spectrum analyzer waveform display register CURVe CURVe CURVe CURVe CD Oo WwW H CURVE CURVE 94 233 7 151 2 16 for example The format of the response is determinad by the previous WFMpre command H no argument is specified the source register of the curve data is also determined by the previous WFMpre command See the curve command discussion for data formats and other details The cuRve response with HDR ON will resemble one of the forms shown in the CURve command discussion Data may be returned from an active 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 Section 6 Programming for programming examples using CURVe lt arg gt Arguments Date in the form pb MoN yy This is a command with a string argument in the above format pp is a two digit day of the month yy is the last two digits of the year and mon represents the first three letters of the month This command sets the real time cl
135. f the tables show a command in this form Fas you can enter the command in any combination of upper and lower case letters as in these examples CME CEA Cas However attempts to enter tha command using a different combination of letters as in these examples will ba ignored An SRQ and an error message will be generated See Section 5 Status Reporting for additional information CMEASURE cma THE COMMAND QUERY LIST 2711 amp 2712 Programmer Manual E NG Table 3 1 lists al the commands available for controlling the 2711 and 2712 Spectrum Analyzers This table shows the experienced user the correct form of each command and query header Table 3 1 is a convenient reference for the mnemonics of each command or query for users who are already familiar with instrument functions ACQmode ACQmode AQP AQP AREs AREs ARFatt ARFatt ATBI ATHrhlid ATHrhld AVDest AVDest AVG AVG AVMode AVMode AVNum AVNum BWMode BWMode BWNum BWNum BWResuit CAL Gg CALSig CENsig CFSF CFSF CLOck Table 3 1 CLOck CLRKey CLRMenu CMEas CNBw CNBw CNMode CNMode CNResult CNitrak CNTtrak COUnt CREs CREs CURve CURve DATe DATe DATIme DEE Menu DETector DETector DIR DiScor DiScor DLine DLIne DLLimit DLLimit DLValue rot DLValue DSRe DSRc EMC EMC EOS EOS ERAse ERr EVEnt FILE FILE FINe FiNe FOFset FOFset FOMode FOMods FREgq
136. frequency offset of the optional tracking generator on and off TMe ON Tide OFF TGTMode Requires Option 04 Tracking Generator Arguments None This simple query returns the current on off status of the optional tracking generator s tracking mode TMe TGIMODE ON TGIMODE OFF 4 73 2711 amp 2712 Programmer Manual bee TGTRack lt arg gt Requires Option 04 Tracking Generator Arguments Value within the range 5 01 kHz to 60 kHz This single argument command specifies the tracking adjustment of the optional tracking generator Units may be appended otherwise Hertz are assumed A non zero value turns on the tracking generator s tracking mode a zero value turns the tracking mode off TeTRack 9 7 ks for exanple TGTRack Requires Option 04 Tracking Generator Arguments None This simple query returns the currently specified tracking value of the optional tracking generator in Hertz TGTRack TGTRACK 9 7643 for example THRhId lt arg gt Arguments Number within the range 174 to 20 dBm This single argument command specifies the value of the threshold above which the spectrum analyzer automatically detects signals Units of DBM DBMV DBV DBpV DBUW and DBUV 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
137. g D Instrument specific Because of the status coding scheme only one condition can be reported in a single status byte More than one condition may exist in the spectrum analyzer at any given time Therefore the following rules are used to determine which condition is reported by any status byte e Each condition is assigned a priority according to Table 5 5 Only one occurrence of each condition is retained in memory When ros is on the status byte following an SRQ represents the condition that caused the SRQ not necessarily the highest priority When ros is opp the normal device dependent status shown in Table 5 3 is reported e After a status byte is read by the controller the status byte is updated with the highest priority condition which has not yet been reported e All status conditions that have occurred but have not been reported except power on can be cleared by a device clear DCL command e Bit 5 is the current status of the message processor p ae eel Event Description _No status to report Poweron Command error Execution error Internal error Byte value depends on B 1 or B 0 Table 5 4 Specific Device dependent Status Bytes Status Byte Bits Byte Event fe 7 ssa ls j2 1 Value Description 1 UIB gt A E e Normat device dependent E TT i 1 ee Device dependent operation complete EOS Norm etc d 0 FO Device dapendent l failure warning 1 1 Goa
138. g environment Next you can create and run the control program If you are using ready made contro software simply follow the supplier s instructions The programming requirements for RS 232 control are more complex than those for GPIB operation Section 6 Programming contains a complete example of an interactive RS 232 control program This program is functionally similar to the GPIB program example located earlier in this section see A GPIB Instrument Control Program 1 29 Section 2 Message Structure Replace this page with the tab divider of the same name 2711 amp 2712 Programmer Manual Ga gt OOo E EE 2711 amp 2712 Programmer Manual WHAT IS A MESSAGE SECTION 2 INSTRUMENT SPECIFIC MESSAGE STRUCTURE Generic GPIB messages and instrument specific messages are exchanged between the system controller and the spectrum analyzer over the GPIB When the RS 232 interface is installed communications between the system controller and spectrum analyzer are limited to instrument specific messages Generic GPIB messages GPIB interface required 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 transmitted over the handshake lines or interface management lines uni line messages or they may be transmitted over the data lines multi line messages The GPIB hardware and softwa
139. g generator tracking enerator tracking TGTRack What is the trackin VDMode Selects broadcast or satellite video demodulation VDMode Is broadcast or satellite video demodulation used VMOnitor Turns the video monitor on or off VMOnitor Is the the video monitor on or off VPOlarity Selects positive or negative video polarity VPOlarity Is positive or negative video polarity selected VSYnc Selects positive or negative video sync polarity VSYnc i larity being used 1 Only avallable with Option 04 Tracking Generator 2 Only available with Option 10 Video Monitor SI 3 2 Sr ZS ROE 3 Transfer waveform data to the register specified by WFMpre using the encoding set by WFMpre Transfer waveform data from the specified register or from the register set with WFMpre using the encoding specified by the WFMpre command WAVirm Same as WFMPRE followed by CURVE WFMpre Specifies source or destination register used for transferring waveform data with the CURve command or query Also specifies the encoding to be used on the waveform data Request the complete waveform preamble or ask which register and encoding are to be used for waveform transfers CURve CURve WFMpre Waveform transfers are not reflected on any menu or function block They transfer data representing on screen specira and their formatting between the spectrum analyzer and the controlling computer
140. geg gemeng Part No 070 8132 01 EK Sm ae EO IER gas 5 KE Ss SPECTRUM ANALYZERS Programmer 7 et DN ae Manual bare ge ee See ENER Please check for CHANGE INFORMATION SCT at the rear of this manual ka eege First Printing DEC 1991 Wen Revised Feb 1992 Tektronix s COMMITTED TO EXCELLENCE JET Copyright 1991 by Tektronix inc Beaverton Oregon Printed in the United States of America AN rights reserved Contents of this publication may not be reproduced in any form without permission of Tektronix Inc U S and foreign Tektronix products covered by U S and foreign patents and or patents pending TEKTRONIX is a registered trademark of Tektronix Inc Specification and price change privileges reserved 2711 amp 2712 Programmer Manual Se See 2711 amp 2712 Programmer Manual Ra GE eee LINE DEFINITIONS seen ll e ransfer Bus Handshake scccssecssessecessrscscseeneeeee n A12 eas TABLE OF CONTENTS Management Bus see ee n A 144 IFC Interface Cleat E A14 Table of CONtents seeeeseseoiorseeesrsterrsseerrresssseeneenssesnei ATN Attention scsssscctsssssssssseesesescsssseesses EE hale Operators Safety Summary ccccccreeseeeeeteeteeeeneeeteeeenae V SRQ Service NEEN dese A 14 REN Remote Enable Ce BEE at TERMS IN THIS MANUALE eegener V TERMS MARKED ON EQUIPMENT enn me l EOI End Or Idantify 000 00 See DN Daf A
141. ght SAVe TGOOffset VMAnttbl SWP TRIG Menu PLLmode SET TGTMode VMDEst PLLmode SGErr TGTMode VMDEst e SWEEP and RES BW function blocks PLOT SGErr TGTRack VMDIst e DISPLAY STORAGE function block POFset SGSrch TGTRack VMDIst DISPL Menu POFset SGTrak THRhid VMMkrunit PRDouts SGTrak THRhid VMMkrunit APPL Menu PREamp SlGswp Me VMOnitor e UTIL Menu PREamp S IGswp TiMe VMOnitor lt DEMOD TG Menu PROTset SPAn TIMMode VPOlarity l PROTset SPAn TIMMode VPOlarity Cuive and Waveform commands PSTep SSBegin ie VRTdsp System related commands PTYpe SSBegin TITLe VRTdsp Miecallanacus commands PTYpe SSEnd TMOde VSYne OPER SSEnd TMOde VSYnc QPFilt SSResult TOPsig WAIt RECall STByte TRigger WAVfrm REDout STEp TRigger WFMpre REDout STEp TTLMode WFMpre DEEM STOre TFLMode ZERosp REFIvl STPinc TUNe ZERosp RESbw STPinc TVLine RESbw STSto TVLine a RATE 3 4 fe KR Table 3 2 FREQ MKRS Front Panel Commands CMEas TUNe Count MFReq SGTrak FREq MSTep eme PSTep MARker MLFTnxt Header Function CMEas COUnt Perform a canter measure What is the counter reading 2711 requires Option 02 Frequency Counter FREq Set the start or conter frequency FREq What is the start or center frequency MARke Turn one or both markers on and off MARker What is the current marker status MFReq Set the marker frequency What is the frequency of either or both marker
142. h 952 224 EO Fatal Error in File Say 853 224 EO Directory Error in File 854 224 Eo _ Data Errorin File _856 80 Clear Event 857 EO Calibrator Doesn t Match Readout 858 80 Return to Local Request 859 Eo Display Line Off Screen 860 E0 DBUV M Measurement Mode Idle 861 EO Search Terminated Max Signals 862 80 Lock Event 863 80 Unlock Event 864 __80 DCL End 865 80 User Defined Program in Process e _866 80 Plotin Process 867 80 Average in Process 968 80 Signal Search In Process eee 869 80 Normalizing 880 C2__ User Defined Program Compiete 5 16 Event Code 881 882 881 882 883 8 885 lo A 896 194 194 194 194 228 227 Byte Hex C2 C2 C2 2711 amp 2712 Programmer Manual Table 5 7 Continued Event Description DEELER Plot Complete Ensemble Average Complete Signal Search Compiete Normalization Process Finished End of Sweep Detected Display Line Limit Exceeded Signal Find Error a 5 17 Se Section G Programming Replace this page with the tab divider oi the same name EEN SE EE SE zat E SE SE 2711 amp 2712 Programmer Manual Sees PEROT ea a SECTION 6 PROGRAMMING Program examples in this section are written for the 2712 spectrum analyzer To modify these programs for the 2711 spectrum analyzer simply replace 2712 with 2711 This section discusses gener
143. h your GPIB board For example complete the following steps when using a National Instruments PCIIAIA board e Run the IBcoNr EXE program to configure the driver e Follow the on screen prompts and ensure that the BOARD CHARACTERISTICS screen resembles one of those shown in Figures 1 4 and 1 5 e Create or edit the DEVICE CHARACTERISTICS screen for a device named TEK_SA see Figure 1 6 CG You must assign the same GPIB address to the spectrum analyzer that was used when configuring the device driver is for the spectrum analyzer Use the EOI message terminator for all Tektronix controllers EE f E 2711 amp 2712 Programmer Manual Primary GPIB Address Secondary GPIB Address 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 wilast 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 speed timing no Interrupt jumper setting 7 Base HO Address 2B8H DMA channel 1 internal Clock Frag in MHz Figure 1 4 Natlonal Instruments PCIl 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 wilast byte of Write yes GPIB PC Model PC2A Board is System Controller yes Local Lockout on all devices no Di
144. he return of the GPIB serial poll response followed by either EVEnt Or ERR to report and clear the error condition If RQS is opt and an error is pending the REQUEST indicator does not appear on the spectrum analyzer screen Under these conditions an EVEnt of ERR query is required to report and clear the error condition Otherwise the error remains pending To use the VERBOSE feature a routine must be set up that reads each possible response and sends each response type for parsing and possible processing See the RS 232 sample program in Section 6 Programming This routine uses VERBOSE mode in place of GPIB SRQ Se 5 10 senate ee 2711 amp 2712 Programmer Manual Three types of errors can occur that are related to problems with RS 232 communications parity framing and overrun Parity and framing errors may occur because of mismatch between configuration settings baud rate parity etc or bacause of noise Overrun is more likely due to a design problem For example the inability to handle interrupts at the required rate results in overrun When an error occurs the appropriate event is declared and all unparsed data are discarded until a terminator is received Table 5 7 lists the complete set of 2711 and 2712 event codes and status bytes including three RS 232 specific event codes numbers 410 411 and 412 The status bytes listed in Table 5 7 assumes that the Busy bit is off When the Busy bit is on add values
145. he techniques and programs discussed in this manual are appropriate to the IBM family of personal computers PCs and their function alike counterparts which support the MS DOS PC DOS or OS 2 environments i To function as a controller your computer must be equipped with a GPIB board Tektronix supplies three National Instruments GPIB boards for your convenience PC GPIB Package provides a PCIVIIA board order S3FG210 AT GPIB Package provides a 16 bit AT Bus interface board order SSFG220 MC GPIB Package provides a 16 bit Micro Channel interface board order S3FG230 Software Device Driver Tha device driver is a program usually supplied with the GPIB board that tells your computer how to access the board For the National Instruments PCI PCIIA or PCIIIA GPIB boards the device driver is a file named GPIB comM An additional program is usually supplied that enables you to correctly configure the driver by providing information such as the instrument address and the type of message terminator The National Instruments program is named IBCONF EXE 1 4 OON SE SS EE ZE SS ZILI amp 2712 Programmer Manual Re Application Software Application software is the program or programs which contro and acquire data from the spectrum analyzer You can construct your own programs with the information in this manual However you will need the applications interface software supplied by the GPIB board manufacturer F
146. he ending signal search frequency SSEnd What is the ending signat search frequency SGSrch Search for signals greater than threshold THRhId between beginning and ending search frequencies What is the result of the signal search ed SSResult 1 Only available with 2712 Option 12 Quasl Peak Detector sf 2711 amp 2712 Programmer Manual E SE Table 3 12 UTIL Menu Commands JSPL USER DEF INPUT S IC i TTT ET DEEN EE EE UTILITY MENU 0 INITIALIZE INSTR SETTINGS INIT RECall 1 STORED SETTINGS DISPLAYS STOre 2 KEYPAD ENTERED SETTINGS ERAse 5 VIDEO FILTER WIDE VFMode VIDfit 3 NORMALIZATIONS NORM 4 SYSTEM CONFIGURATION 1 SCREEN PLOT CONFIGURATION PTYpe 3 INSTRUMENT CONFIGURATION 1 MINIMUM SIGNAL SIZE 20 PKHeight 4 PHASELOCK ON PLLmode 5 FREQUENCY CORRECTIONS ON ACQmode 4 REAL TIME CLOCK SETU DiScor 0 SET DAY 1 SET MONTH 2 SET YEAR 3 SET HOUR Grieg 4 SET MINUTE 5 SET SECONDS TO 00 6 DISPLAY DATE TIME ON CLOck e STORED SETTINGS PROTECT OFF PROTset 6 FILE SYSTEM DIRECTORY DIR 9 INSTALLED OPTIONS DISPLAY iD 5 INSTR DIAGNOSTICS ADJUSTMENTS 7 SERVICE REQUEST ROS 1 Oniy available with 2712 3 20 pen 2711 amp 2712 Programmer Manual Function TIONI hg NPAT gegen Return a spectrum analyzer file system directory DiScor Turn the frequency corrections on and off DiScor Are the frequency corrections on or off DATe Set the real time clock d
147. he example program located on the following pages REM INCLUDE QBDECL4 BAS di 4 Start QuickBASIC according to the instructions in the preceding subsection Enter the program Be sure to enter the program exactly as it is written The spectrum analyzer must be named TEK_SA by the IBCONF program 2 Place the spectrum analyzer ONLINE by selecting item 0 from the GPIB PORT CONFIGURATION Menu press UTIL 4 0 0 The instrument is nominally ONLINE but is not yet handshaking with the controller 1 15 4 16 2711 amp 2712 Programmer Manual 3 Start the program The computer display shows 2711 or 2712 SHOULD NOW BE HANDSHAKING NDAC SHOULD BE DISPLAYED PRESS ANY KEY TO CONTINUE When the spectrum analyzer is handshaking with the controller NDAC Not Data ACcepted is displayed at the lower right of the spectrum analyzer s screen NDAC is asserted most of the time It is unasserted only briefly following receipt of a message to indicate that the message has been accepted see Appendix A 4 Press any key The word REMOTE should appear at the lower left of the spectrum analyzer s screen and the controller should display these messages 2711 or 2712 SHOULD NOW BE IN REMOTE MODE PRESS ANY KEY TO CONTINUE The National Instruments software places the spectrum analyzer in remote mode whenever a message is sent the message HDR ON was transmitted Unless the GPIB local tockout command is issued any spectrum analy
148. he third area covered l Note that while the IE E Std 488 standard defines the ten interface functions the specific protocol and timing relation ships 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 implemented Leet esrb eee 2711 amp 2712 Programmer Manual CLITA A TYPICAL GPIB SYSTEM Atypical GPIB instrumentation system is shown in Figure A 2 and it includes the nomenclature for the sixteen active signal lines Only four instruments are shown in this example but the GPIB can support up to fifteen instruments connected directly to the bus However more than fifteen devices can be interfaced to a single bus if they do not connect directly to the bus but are interfaced through a primary device Such a scheme can be used for programmable plug ins housed in a mainframe where the mainframe is addressed with a primary address code and the plug ins are addressed with a secondary address code To maintain the electrical characteristics of the bus a device toad should be connected for each two meters of cable length Although instruments are usually spaced no more than two meters apart they can be separated farther apart if the required number of device loads are jumped at any given point For proper operation at least two thirds of the instruments connacted directly to the bus must be in the power on state
149. hod e Do not use SOFT flow control when transmitting file or waveform data binary transfers because you cannot guarantee that the ASCll decimal values corresponding to CTRL S and CTRL Q do not appear in the input stream a filas and waveform data specify HARD flow control or ONE If NONE is specified you must ensure that buffers do not overflow This can be done by allocating enough buffer space to handle most contingencies A buffer size of 1200 is sufficient for most purposes The 2711 and 2712 use a 1200 byie internal input buffer Selecting the Echo Feature tam 6 of the RS 232 PORT CONFIGURATION Menu ECHO chooses ECHO modes of ON or OFF Echo mode is intended primarily as a means of interacting with the 2711 and 2712 from a dumb terminal or for testing purposes Press 6 on the KEYPAD to choose between ON or OFF When ECHO is OFF the spectrum analyzer does not return the characters it receives to the controller For most cases ECHO should be OFF However set ECHO to ON when using a dumb terminal to contro 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 overrun at 9600 baud if the character rate is too high After each command or query is completed th
150. hose response indicates the currently selected message delimiter MSGdlm MSGDIM LF MSGDEM SEMICOLON 4 42 2711 amp 2712 Programmer Manual SE Se OO 2711 amp 2712 Programmer Manual BO MX Hid Arguments OFF ON MSTep me Arguments None CR This single argument command turns the maximum hold feature This is a command that requires no argument It is equivalent to on and oii turning the frequency markers knob one click in the counterclockwise direction The spectrum analyzer s response Wald ON depends upon the currently selected knob function _ MXHId OFF Gw MXHId MTUNE lt arg gt Arguments None Arguments Value in the range 1 8 GHz This simple query returns the current on off status of the maximum hold feature This single argument command changes the frequency of the TEEN primary marker by the indicated amount Negative values indicate a decrease in frequency Although the range is Rn ON 1 8 GHz the value specified must position the new marker MXHID CFF frequency within the spectrum analyzer s on screen fraquency span or an SRQ and event code are generated MXRIvI lt arg gt MUNE 546 kHz for example Arguments NOMinal number in range 50 to 20 men This single argument command sets the required level of signal MVPos lt arg gt amplitude at the input to the spectrum analyzer s first mixer to produce full screen top graticule tine deflection in 2 dB steps Arguments None PRImary SEC
151. ice request indication the controller should perform a serial poll in order to obtain a EES GES Soe complete status byte with more information if the device has the SR function implemented Before an instrument can respond to a parallel poll the GPIB system must first be configured In a typical sequence the controller first sends an UNL command to clear the bus of listeners then the listen address of the device to be configured Following this the controller sends the PPC Parallel Poll Configure command followed by a PPE Parallel Poli Enable message The PPE message contains coded information that tells the selected instrument which data line will carry the PP status bit for that device This entire sequence is repeated for each instrument to be configured The PPE message s sent by the controller has the form of X110SPPP Bit 4 S is called the sense bit and the three least significant bits PPP represent an octal number 0 through 7 that corresponds to a specific line on the data bus that an instrument must assert if its internal status has the same value as the sense bit S may equal 1 or 0 The actual parallel poll takes place after each instrument has been completely configured The concept is to have the controller receive one data byte that contains status information on all of the addressed instruments To receive this status byte the controller asserts EOI and the ATN line The assertion of EOI may be c
152. ies are accepted e Begin building an ASCII string by appending successive keypresses to a string variable say VALS Change line 15 of the menu with this command DEFMENU 115 ENTER REF LEVEL VALS _ e Loop until the whole number has beenrentered and a terminator has been detected For example if the keys 1 5 and 7 are pressed the menu display will change as shown in Figure 6 5 When a terminator key is pressed the program must respond by setting the reference level using the REF command REF 15 7 DEM CLRMENU The CLRMENU command automatically exits the menu if e desired you may remain in the remote menu by issuing the necessary DEFMENU commands to rewrite the screen ch SE E SS 2711 amp 2712 Programmer Manual Base E Ki PERFORMANCE TESTS 1 TEST 1 2 TEST 2 8 TEST 8 lt PREVIOUS MENU Figure 6 6 A Remote Submenu Defining a Submenu item 2 on the remote menu of Figure 6 5 shows how submenus ome might be created Use the 2402A Tekmate to execute the following algorithm for an example of building a submenu Do KEY queries until the result is not NULL If the key is 42 send the following commands CLRMENU DEFMENU Li PERFORMANCE TESTS DEFMENU I4 1 TEST 1 DEFMENU L5 2 TEST 2 DEFMENU L9 8 TEST 8 DEFMENU L16 mmm PREVIOUS MENU The resulting menu is shown in Figure 6 6 Note that the spectrum analyzer does not understand a nested menu structure
153. ies are set to the current marker frequencies delta marker mode must be enabled if the argument is a pair of numbers the first number specifies the START frequency and the second specifies the STOP fre quency Units may be appended otherwise Hertz are assumed The second number must be at least 10 kHz greater than the first to satisfy the spectrum analyzer s span requirements If the second number is greater than the first but by less than 10 ts tha STOP frequency is set to the START frequency plus 10 kHz The STOP frequency may be set lower than the START frequency Under these conditions the spectrum analyzer is tuned to the lower frequency and zero span mode is activated STStop MARKer STStop 192 MHz 198 Miz for example TABIe lt arg gt Arguments Integer number in the range 0 to 9 This single argument command selects the tuning table to be used when tabular tuning increment mode is active This command does not turn on tabular tuning it only selects the table Only tables 0 to 7 are filled The number of an empty table can be entered but an SRQ and event code will be generated TABle 0 TABle 7 TABIe Arguments None This simple query returns the selected tabular tuning table TABle TABLE 3 for example 4 69 TAMpI Arguments None This simple query returns the amplitude of the signal being tracked The value is updated at the end of each sweep when signal track mode is enabled Otherwise the
154. il the computer is turned off or until a warm boot is performed Configuring the Optional Printer or Plotter 1 12 A variety of printers and plotters are available that can be used with your system We recommend a serial or parallel printer connected to the appropriate computer port and or an HPGL compatible plotter connected to the GPIB This arrangement enables you to send data directly from the spectrum analyzer to the plotter when the system controller is unavailable The SS ie SE 2711 amp 2712 Programmer Manual Tektronix HC100 plotter is recommended Its four pens provide a useful complement to the four trace capability of the 2711 and 2712 Printer Configuration The configuration of the printer is independent of the GPIB Consult your printer and computer manuals for information about setting up the printer and corresponding computer communications port Plotter Configuration Plotter configuration procedures vary Consult your plotter manual for the configuration appropriate to your plotter When using a Tektronix HC100 plotter set its rear pansl DIP switches as follows GPIB Down All bits should be set when the Tektronix HC100 plotter is in LISTEN ONLY mode and its power must be cycled to load the settings into memory You must also correctly configure the plotter DEVICE CHARACTERISTICS using the T8conF file Be sure to use the same GPIB address for the HC100 DIP switches and the DEV
155. ile stored in the spectrum analyzer to the controller When used without an argument FILE returns the file specified by the previous FILE command When used with a lt filename gt argument FILE returns the named file The filename when specified must be in quotes in either case the filenarne must match including case one of those listed in Table 4 2 The file names in the 2711 and 2712 are established by their firmware A directory of currently created files can be viewed by pressing UTIL 4 6 or UTIL 5 4 1 0 Files are created within the spectrum analyzer s memory only as required That is a BSETO3 settings file is only present when B register settings have been stored previously in the third storage location WEE DSET0O and SETOBU are two special files created automati cally by the spectrum analyzer They contain the D register settings used when the spectrum analyzer was last turned off They are listed as LAST POWER DOWN under UTIL t 0 SETOBU is a backup in case DSETOO becomes corrupted at the next power up The FILE query enables you to store a 2711 or 2712 file on disk for later restoration to the same or another 2711 or 2712 The file is in binary format and the first bytes of the response are the ASCII character codes for lt filename gt If HDR is on before issuing the FILE message then the query and response have this format FILE lt filename gt FILE lt filename gt lt d
156. imary lt arg gt none or PRImary or secondary lt arg gt SECond marker or their time difference lt arg gt DELta The units are seconds MKTime MKTIME PRIMARY 4 67E 4 for example MKTime Sond MKTIME SECOND 8 98E 4 for example MKTime DEL a l MKTIME DELIA 4 318 4 for example MLFtnxt Arguments None This is a command requiring no argument It moves the primary marker from its current position to the next signal peak to the left H signal track is enabled MLFtnxt turns signal track mode off enables the primary marker and assigns the knob function 4 40 BH e EE gt Ses BE EE 2711 amp 2712 Programmer Manual SE io marker control If scerr is on and a peak does not exist an SRQ and event code are generated MLFtnxt MMAx Arguments None This is a command requiring no argument it moves the primary marker from its current position to the highest signal peak on screen If signal track is enabled mMAx turns signal track mode off enables the primary marker and assigns the knob function to marker control If scerr is on and a higher peak does not exist an SRQ and event code are generated MMAX MNHid lt arg gt Arguments OFF ON This single argument command turns the minimum hold feature on and off This command is not allowed under the following conditions e Analog mode is being used e Waterfall mode is enabled The destination register is A and display line is on dBuV
157. ing RDS IBRDF 8D FILENAMES Read data from device BD and store to disk l in file named lt FILENAMES gt IBRDI BD CUR CNT Read curs data bytes from device BD into integer array CUR IBRSP BD SPR Perform serial poli of device ps IBSRE BD V Enabie disable remote mode in the device indicated by BD v3 0 disables TBWRT BD WRTS Sond contents of string variable WRT to device indicated by BD IBWRIF BD FILENAMES Send disk file named lt FILENAME gt to device indicated by BDS SERIAL POLL and EVENT FIND are sample subroutines discussed in Section 5 Status Reporting GPIB SYSTEM SOFTWARE Ali of the programming examples in this manual make use of the subroutines supplied by National Instruments as part of the GPIB or Tektronix GURU II software If you are using a board from another manufacturer equivalent software should have accompanied your board This software supplies the interface between the programming language and the installed GPIB board Table 6 2 lists the National Instruments system subroutines used in this manual Consult your GPIB documentation for detaited information about these and many other subroutines that are commonly available 6 6 E 3 EE SE SE 2711 amp 2712 Programmer Manual E Se E EE SE B C or D the curve is coming from or going to and the type of data encoding to be used The encoding ASCil encoded GPIB SAMPLE SUBROUTINES ors This subsec
158. is routine reads the 2712 response to get 3x a binary waveform TKK KI IK KH KIKI HOR IK KEK IK AKI IIT IKK k k k kok k k IR KEE REE k kk k D GET BINARY WAVEFORM i GOSUB READ FOR VERBOSE IF LEN rd gt 14 THEN strip off checksum semi colon and cr 1f strip off header and byte count convert each binary value to ascii rd LEFTS rd LEN rd 4 ra RIGHTS rd LEN rd 9 FOR x 0 TO 511 wim x ASC MIDS rd x 1 1 NEXT END IF EXIT SUB l EEN LIK KK RIK KKK KAKI IIH III KEI AIA KK KEK IKEA REE KER ERE This routine displays a message if RS 232 r communications cannot be established DKK IKK IK KICK EK KEKE KK KE KK KEKE HEE RRR EEE KEKE KEKE E ERROR DISPLAY 1 save cursor coordinates hold x POS Q hold y CSRLIN Izeg E Ed GEES EES save screen image REDIM before 7 41 colr 7 41 FOR pt 0 TO 7 FOR q 0 TO 41 colr pt q SCREEN p 18 q 20 1 befores pt q CHR SCREEN p 18 q Se 201 e NEXT q NEXT p EE See 2711 amp 2712 Programmer Manual SE DEE EE SE SE Ss EE EE EES E E next print the window and the error message terre eet eee eee RES SESS SSE SSS SSS SS COLOR 14 6 FOR z 18 TO 25 LOCATE 2 20 0 PRINT STRINGS 42 CHR 32 3 NEXT LOCATE 18 30 0 PRINT COM 1 PORT PROBLEM LOCATE 19 25 PRINT Verify R5232 Port Configuration LOCATE 20 31 PRINT UTIL 4 0 2 7 LOCATE 21 22 PRINT STATUS
159. k the HPGL language or be compatible with Epson FX codes and the appropriate printer typa must be specified either locally or using the pType command it is possible for the spectrum analyzer to send data directly to a plotter To do this the GPIB ATN fine must be held high while the spectrum analyzer is addressed as a talker and the plotter as a listener and then ATN is set low EOS ON and wat for an end of sweep SRQ must also be set This approach requires no computer memory An alternate approach to plotting the spectrum analyzer screen data enables you to create independent input and output subroutines for use with specific devices and to share those devices with other instruments on the GPIB This approach involves returning the screen plot data to the controller then sending it to the designated output device The program does not proceed until the plot data are received so it is not necessary to wart for an end of sweep SRQ Further this approach enables you to do the printing or plotting at a more convenient time or use an entirely different controller and output device Figures 6 1 and 6 2 show how you might return and print or plot instrument data Each Do it in the diagrams can represent a separate subroutine for a specific device 6 11 6 12 Data Acquisition Routines Get data from instrument 4 and store Yes Get data from 2712 using Plot query and store Nee Get data from instrument N and
160. le STByte STPine lt arg gt Arguments None Arguments AUTo TABular PROg This simple query returns the GPIB serial poll response byte This single argument command selects the tuning increment This command is only useful for instruments equipped with the mode as automatic tabular or programmed Refer to the STEp RS 232 interface If the query is received by an instrument command to set the programmed increment equipped with the GPIB interface the value 0 is always returned STPine AUTo i ald STPinc TABular SIBYTE 61 for exanple STPinc PROJ SE salu STPinc Arguments cF MARker number in the range 1 Hz to 1 8 GHz Arguments None This single argument command specifies the programmed This simple query returns the currently selected tuning frequency tuning increment Specifying the increment also ZER moda turns on the spectrum analyzer s programmed tuning mode The l Sa cF argument selects the current center frequency as the ge increment MARker selects the current marker frequency anda STPINC AUTO numeric argument specifies the increment in Hartz Units may SIPING TABULAR oo be appended STEp MARKer Sfp 30 kHz for example ege EEN EH 4 67 4 68 K pom Se SE SE STStop lt arg gt Arguments MARker or pair of values in range 10 MHz to 1 8 GHz This single or double argument command sets the START and STOP frequencies of the spectrum analyzer display If MARker is the argument the start and stop frequenc
161. link gt 0FrF command with the destination register for an ensemble average or minimum hold operation terminates these operations In addition the DBUVM destination register cannot be turned off without first exiting DBUVM mode SAVe lt arg gt SET Arguments None A B C This is a query with one or no argument that returns the storage state of the indicated register or all registers H no argument is used the state of the A B and C register is returned H an argument is used only the state of the indicated register is returned SAVe SAVE A ON B OfF C 08F for example SAVe A SAVE A ON for example Sie B SAVE B OFF for example SAVe C SAVE C OFF for example Arguments None This simple query returns a group of command headers and arguments representing the current operating environment of the spectrum analyzer The string of commands can be retained for transfer to the same or another 2711 or 2712 spectrum analyzer at a later time when it is desirable to reproduce the same operating environment The set response enables you to replicate equipment setups You should not modify the SET response 4 61 4 62 HDR status has no effect on the seT query Individual command headers are always returned and the group header set is never returned Each header and argument is separated by a semicolon to ensure the response represents a functional message The set response is lengthy but it is easy
162. ly UNLISTENS the instrument H a message requires a response the controllerthen addresses the instrument as a talker TALKS the instrument 9 Now the instrument places the first byte of the response on the data bus and signals that it is ready 10 After the controller reads the byte it signals over the handshake lines that it has done so and is ready to receive more data The process repeats until ECt is cletected at which point the controller normally UNTALKS the instrument This process is transparent to you it is carried out by the spectrum analyzer the GPIB board in your controller and the device driver software generally supplied with the GPIB board In the following subsections you will learn how to set up your spectrum analyzer for GPIB operation See Appendix A for additional information concerning IEEE 488 and the GPIB GARAGE ROR S E SS SH ang OPERATION OVER THE GPIB You need the following equipment to operate the 2711 and 2712 SEH Analyzers over the General Purpose interface Bus GPIB e System controller Software device driver 2711 or 2712 equipped with the GPIB interface Interconnecting cable Application software e Optional Printer or Plotter Figure 1 1 shows a small system with a printer and plotter System Controler The system controller can be any general purpose computer equipped with a GPIB board Specially built controllers can also be used but are beyond the scope of this manual T
163. ment The result is updated at the end of each sweep when the normalized noise measurement moda is enabled The units are those selected as reference level units NiResult NNRESULT 93 5 for example Arguments ALL AMPlitude FREquency TG This single argument Command instructs the spectrum analyzer to carry out the indicated normalizations There argument is only valid when the Tracking Generator Option 04 is installed NORM ALL atl nommalization except reference NORM AMPlitude amplitude nonnalizations NORM FREquency frequency normalizations NORM TG tracking generator nommalizations Se 2711 amp 2712 Programmer Manual EE SNANAR NOTALI AE E 2711 amp 2712 Programmer Manual EE EE E NORM SH Arguments None This simple query returns a formatted listing of the current as e normalization parameters VR GAIN STEPS The following parameter list shows the format of the response f Actual values displayed in each category vary depending on the instrument l EE NORM RF ATTEN PREAMP amp DET GAIN NORM TEK 2711 or 2712 CURRENT NORMALIZATION VALUES j ao OBWModa lt arg gt i Arguments ON OFF IDLE DIEN This single argument command specifies occupied bandwidth Ka re measurement mode The occupied bandwidth measurement on mode is enabled if on or idle eg OBYMode ON CF NORMALIZATIONS OBiMode OFF OPWMode IDLE OBWMode REFERENCES j Arguments None EE This sim
164. mmer Manual E EVENT CODES Not all GPIB applications need the capability provided by the SRQ function and the serial poll sequence in fact the SRQ service routine is often more complex than the application demands For this reason the Request for Service Ros command is implemented in the 2711 and 2712 This command allows the controller to prevent the instrument from asserting SRQ In this mode of operation the EvEnt and ERr queries provide for the transmission of error and status information The FVEnt and ERr commands return the same codes ERr is included for compatibility with Tektronix 490 Series spectrum analyzers The Event and ERr queries provide more information about the cause of an event than the status byte does For this reason the event query can be useful in the Ros on and RQS OFF modes Event codes are grouped into categories as shown in Table 5 6 Individual event codes are listed in Table 5 7 Event codes are assigned priorities according to Table 5 5 but only the first event code of a given priority is accumulated in the pending event table However the EvEnt and ERr queries return a single code Therefore to ensure that all pending event codes are reported you must continue to issue Event or ERror quories until event code Zero 0 is returned Table 5 6 Event Code Categories Numerle Range Event n PAME A CO A LAT ae O Local events not used 100 199 Command errors 200 299 Executi
165. mode will average Arguments None A ANM _ This simple query returns the integer number of decibels dB below the peak at which a signal s bandwidth will be measured by the spectrum analyzer s bandwidth measurement mode BaNum AVNUM 128 for example BANUM 20 for example 2711 amp 2712 Programmer Manual Re S BWResult me Arguments None This simple query returns the result of the most recent bandwidth measurement in Hertz using the spectrurn analyzer s bandwidth measurement feature The result is updated at the end of the current sweep if bandwidth mode is not idle BWResult PARESULT 5 238643 for example CALSig lt arg gt Arguments ON OFF This single argument command turns the calibration signal on and off The RF input signal is disconnected when the calibration signal is turned on CALSig ON CALSig OFF CALSIg Arguments None This simple query returns the on off status of the calibration signal CALSig CALSIG OFF CALSIG ON CENslIg Arguments None This is a command with no argument that sets the canter frequency to the frequency of the primary marker CENsig CFSF lt arg gt ie Arguments CENter STArt This single argument command designates the displayed frequency as th fraquency may center or start frequency The indicated be adjusted depending on the current center 4 9 2711 amp 2712 Programmer Manual frequency and frequency span to ensure the resulting condition is p
166. n as in this example QUERY QUERY 10 5003 for example Typical examples are always followed by the term for example Lee Er Ze 2717 amp 2 712 Programmer Manual Seer ee AREs lt arg gt LIST OF COMMANDS AND QUERIES The following list of commands and queries provides detailed NEE ONF Ser information about the 2711 and 2712 instruction set It does not This single argument command turns automatic selection of attempt to explain the operation of the spectrum analyzer resolution bandwidth on and off Refer to the 2711 Spectrum Analyzer User manual or ARES ON 2712 Spectrum Analyzer User manual for dascriptions of the 2711 and 2712 or their features and functions ae AREs ACQmode lt arg gt Arguments None Arguments MAXMin PEAK This simple query returns the status of automatic resolution This single argument command designates the display storage bandwidth selection mode acquisition mode AREs AOQnode PEAK ARES ON Amde MAXMin ARES OFF ACQmodoe ARFait lt arg gt Arguments None Arguments oN OFF i turns the currently selected acquisition ee T SES query returns the ourrenty q This single argument command turns automatic selection of RF attenuation 3 on and off The attenuation linear scale factor and reference level may EE WE change when auto selection is turned on but not when auto selection is POOD turned off ACOMODE MAXMIN ARFatt ON AQP lt arg gt Only available for 2712 Option 12 Quasi Pe
167. n 04 Tracking Generator Arguments OFF ON This single argument command enables and disables fine manual adjustment of the optional tracking generator output amplitude in manual mode the spectrum analyzer s TRIGGER This single argument command turns the optional tracking generator on and off The tracking generator must be installed ee LEVEL knob adjusts the tracking generator output amplitude TGEnab OFF about the level established with TGLevel When TGMan is ON the level returned by rGLeve1 may differ slightly from the TGEnab Requires Option 04 Tracking Generator actual lavel Arguments None an This simple query returns the current on off status of the le paon acung generator TGMan Requires Option 04 Tracking Generator L Arguments None ERD OFF This simple query returns the on off status of manual tracking generator amplitude control TGLevel lt arg gt Requires Option 04 Tracking Generator an SCH Arguments Number in range 48 dBm to 0 dBm or equivatent TAN ON This single argument command sets the output amplitude of the oe optional tracking generator The value specified may be in DBM P DBMV DBV DBUV or DBUW DBUVM defauts to DBUV but TGOMode lt arg gt Requires Option 04 Tracking Generator its equivalent value must range between 48 dBm to 0 dBm The Arguments OFF ON level can be changed in 0 1 dB steps If units ara not appended the current reference level units are assumed This single a
168. n 4 Command and Query Definitions for details Example 6 6 shows QuickBASIC subroutines for storing and reestablishing the settings group The routine is suitable for use with the National Instruments GPIB board and software You must substitute the disk file name in which settings are to be stored in place of filename 6 16 GE SE SS 2711 amp 2712 Programmer Manual E SE DE EE EE Example 6 6 Subroutines to Save and Restore Settings Groups GET SET REQUEST THE SETTINGS WRTS SET CALL IBWRT BD WRTS READ THE SETTINGS FROM THE 2712 CALL IBRD BD RD TRIM THE SETTINGS TO THE NUMBER OF BYTES RETURNED SETTINGSS MIDS RDS 1 IBCNT DISPLAY THE SETTINGS FOR VERIFICATION PURPOSES PRINT SETTINGSS SAVE SETTINGS ON DISK SUBSTITUTE DISKFILE NAME THAT YOU WANT TO STORE SETTINGS UNDER FOR FILENAME OPEN O 1 FILENAME Waiting For Results A number spectrum analyzer functions require a wait period between the time they are requested or begin execution and the time at which the results of the operation are available These functions are listed below Marker readouts Ensemble averages Plots Normalizations Delta marker readauts Counter readouts Signal searches User Definable Programs In Example 6 7 we have used the M C MINUS SAVE A mode as an example of how to program for these events This is only one example of many different possibilities when the wart command can be u
169. nd capabilities interconnecting Cable An appropriate cable is required to connect between the controller and the spectrum analyzer The pinout and connector type are identical to the 9 pin connector used for PC AT type RS 232 interfaces Such cables are available in most computer stores For some RS 232 devices null modem adapters will be needed Refer to Appendix B for further information on connectors and adapters Application Software Application software is the program or programs that contro and acquire data from the spectrum analyzer You can construct your own programs using the information in this manual Off the shelf software is also available Printer or Plotter Optional 1 22 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 values or instrument settings Plotters provide superior results when displaying graphical data A printer or plotter cannot be connected to the spectrum analyzer s interface when a computer is connected For this reason you must choose between computer control or hard ale copy output when working directly from the spectrum analyzer s RS 232 interface An alternate approach connects the computer to the spectrum analyzer interface while using a AE e 2711 amp 2712 Programmer Manual EE control program to acquire data from the sp
170. ndshake function guarantees proper reception of data The interlocked handshake sequence between these two functions guarantees asynchronous transfer of each data byte The handshake sequence is performed via the NRFD DAV and NDAC signal ab lines on the bus see Figure A 5 Both functions must respond to ATN within 200 ns The SH function must wait for the RFD Ready For Data See message plus a minimum additional delay of 2 us before asserting DAV This delay allows the data to settle on the data bus lf three state drivers are used the settling time is reduced to RFD plus 1 1 ps Faster settling times are allowed under special conditions and warning notes in the IEEE 488 standard The time required for the AH function to accept an interface message byte depends upon the implementation of the function DC Device Clear Functlon The DCL Device Clear function allows the controller in charge to clear any or all instruments on the bus The controller under program direction asserts ATN and sends either the universal DCL Device Clear command or the SDC Selected 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 i IEEE 488 standard does not specify the settings an instrument must go to as a resul
171. next installed resolution bandwidth filter When a numeric argument is used the installed resolution bandwidth filter closest to the value is selected Bandwidths available depend on the instrument type and installed options This command disables automatic RES BW selection If units are not attached Heriz are assumed _ RESbw INC RESbw DEC RESbw 30 kHz for example RESbw Arguments None This simple query returns the currently selected resolution bandwidth in Heriz RES 3 0E 4 for example RFAIt lt arg gt 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 4 56 pm PATT 2711 amp 2712 Programmer Manual E oe RFAtt Arguments None This simple query returns the current RF attenuation in decibels dB whether it is fixed or automatically selected RFAtt RFAIT 34 for example RLUnit lt arg gt Arguments DBM DBMV DBV DBUV DBUW DBUVM This single argument command specifies the indicated units for the reference level The D argument is not allowed under these conditions e Linear display mode e DBUVM resutt is already saved Display source is the FM detector or external source There is a destination conflict with ensemble average minimum hold or display line RUWUnit DEM RUUnit DEW RUUnit D
172. nstrument to be polled Next the controller releases ATN and the addressed talker responds by sending its status byte over the bus If the addressed talker has requested service it must assert bit seven of the status byte and encode the remaining seven bits to indicate the reason for asserting SRQ Status bytes are device dependent and are not specified in the IEEE 488 standard An addressed instrument will release its SRQ line when serially polled but other instruments may still hold it asserted When the controller has read the status byte of an addressed instrument it reasserts ATN and addresses the next instrument to talk then releases ATN and receives the instrument s status byte The routine continues until the controller no longer detects the SRQ line asserted At this time the controller should send the Serial Poll Disable SPD message and optionally send the UNT message to release the last active talker Performing A Parallel Poll A 20 The Parallel Poll PP function 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 Se bit presented to the controller may or may not indicate a need for service If the data bit is used as a serv
173. ock date The pp and vy fields may be a single dot If so they are treated as if they had a leading digit of 0 The mon field may be any mixture of upper and lower case letters Note that these elements are separated by hyphens and the quotation marks must be present DATe 10 JAN 90 4 17 2711 amp 2712 Programmer Manual DATe Arguments None This is a query that returns the current date in the format DD MON Yy where pp is a two digit day of the month yy is the last two digits of the year and mon represents the first three letters of the month DATe DATE 10 JAN 90 DATIime Arguments None This is a query that returns the current date and current time in two comma separated strings The date is in the format DD MoN YY where DD is a two digit day of the month yy is the last two digits of the year and Mon represents the first three letters of the month The current time is in the format HH MM SS where HH is the hour MM the minute and ss the seconds DATIme DATIME 10 JAN 90 13 30 27 DEFMenu lt arg gt Arguments Ln user defined string This is a command with arguments separated by commas in the form above The Ln is called the link header where nis a number between ranga 1 and 16 that defines a display line number The link argument is a user defined string that will appear on the specified display line Only 32 characters of the string are used excess characters are discard
174. of 16 decimal or 10 hexadecimal to the table entry ee ae pm PE me ee E 2711 amp 2712 Programmer Manual ee eS 2711 amp 2712 Programmer Manual Be as EE EE Table 5 7 Continued Table 5 7 Event Codes eg Event Status Byte Event zl ke ki d teader delimiter error mmand argument error ument delimiter error Non numeric Arg numeric expected Interrupt Fault at FF o F Interrupt Fault Eo Command Not Implemented J CH rm M E ao Byte Event Code Dec Hex Description Code Description 7 Dec Sait EE Se mm EO Illegal Parameter Passed 428 No device dependent status to report 704 EO Ilegal Command o No system status to report 705 224 EO _ malloc Ran out of memor 87 commen header error 706 224 Eo RunTask Cannot Start process zl O oS ita zl bi fo A Ka gt wo q EE 10 224 Eo Markers ae o Missing argument 711 294 En oi Invalid message unit delimiter 742 EO 97 Binary block checksum error 73 Ez Co 109 97 Binary block byte count error na 224 Eo 129 97 legal Hex Character 715 En j i22 97 Unrecognized argument type oe EO 423 97 61 The argumentis too large ER EO 124 97 61__ Non binary Arg binary or hex expected zu EO e 97 61 _ Illegal response value in query 719 Co om 98 Te Flemote command
175. of at least 2 us 1 1 ps for tri state drivers so the instruments can detect that the ATN line is asserted before the controller places the first data byte on the bus Taking Control Asynchronous or Synchronous All data bytes transmitted over the GPIB with the ATN line asserted are interpreted as system control information Asserting ATN directly at any moment is an asynchronous operation with respect to the bus and may cause loss of data if a handshake cycle is in progress To prevent oss of data a controller can take control synchronously that is it can monitor ie Ulead Bus and only assert ATN when DAV is unasserted alse co A 19 As acontroller in charge the system controller program may pass control to any other instrument in the system capable of acting as a controller The controller in charge first addresses the other controller as a talker and then sends the TCT Take 9 Contro command The other controller then becomes the controller in charge when ATN is released Performing a Serial Poll The controller in charge may conduct a serial poll at any time whether or not an instrument on the bus has asserted the SRQ line Most but not all instruments have the Service Request SR function To perform a serial pall the controller first asserts ATN and issues the Untalk UNT and Unlisten UNL commands The controller then sends the Serial Poll Enable SPE command followed by the talk address of the first i
176. oincident with ATN or later so long as both are asserted This may occur any time after the last PPE message The controller then reads data bus lines while ATN and EO are asserted to interpret the status of all selected instruments To conclude the parallel poll the controller relaases EOI and then ATN The instrument s do not need to be reconfigured for each subsequent parallel poil The PPU Parallel Poll Unconfigure command will clear all device configurations and prevent them from responding to future polls The PPD Parallel Poll Disable command accomplishes essentially the same results except that the PP function remains in the configured state PPU is a universal command all instruments while PPD is used with PPC and becomes an addressed command only those devices selected with PPC will accept PPD A 241 Ga E SE gt SE E e EEN SS SC SE SE 2711 amp 2712 Programmer Manual es ms SATE APPENDIX B RS 232 CONCEPTS The first part of this appendix Introduction to RS 232 Communications introduces RS 232 communications concepts to users who have no previous experience with the RS 232 interface The second part Implementation of the RS 232 Interface describes implementation details for the RS 232 interface available for the 2711 and 2712 spectrum analyzers Option 08 FiS 232 Interface Section 1 Introduction contains all the information needed to properly configure the 2711 and 2712 for most applica
177. on errors 400 499 System events 500 599 Execution warnings not used 600 699 internal warnings not used 700 899 Spectrum analyzer dependant events 5 7 When ros is OFF EVent OF ERror returns the highest priority event in the table After Ros 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 also cleared from the pending event table but this does not clear the status byte In a similar manner reading a status byte clears it from the table but the event code is not cleared In either Ros mode the DCL or if the instrument is first addressed SDC GPIB commands may also be used to clear all event codes except POWER ON Example 5 2 shows a QuickBASIC subroutine that can ba used with the National Instruments GPIB board and software to report all pending event codes However when Ros is on you must first call SERIAL POLL to ensure a valid event code is returned Further the response header must be turned off so EVENT copes is returned exclusively as a number string IBFIND IBWRT and IBRD are callable subroutines supplied by National Instruments See Section 6 Programming tor explanations and additional programming instructions Example 5 2 Subroutine for Reading Event Codes REM INLUDE TBDCIL4 BAS COMMON SHARED BDNAMES BD EVENT CODE BDNAMES TEK_SA
178. onal and operational Of these four only the last is devica dependent Operational elements state the way in which each instrument reacts to a signal on the bus MECHANICAL ELEMENTS The IEEE Std 488 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 The connector has 24 pins sixteen active signal lines seven interlaced grounds and 1 shield connection Standard connector pin arrangement and nomenclature for the digital control signals are illustrated in Figure A 1 The cable that attaches to the GPIB connector must be no longer than 20 meters with no more than fifteen peripheral devices including a GPIB controller connected at one time The interconnecting cable assembly which is offered as an optional accessory to the spectrum analyzer is provided with a plug and receptacle connector type at each end of the cable to allow either a star or linear bus structure Contact your local EE SE GE b NDAC emmm EOI Fe el een DHA SHO D103 ec Set pA 12 11 109 B 7 854321 KZ A 23 22 2120 19 1817 18 15 14 13 LOGIC GND BW D GND11 D406 Gud DO GNDcs ects rl D GNDO ii Boe Figure A 1 IEEE Std 488 GPIB Connector Tektronix Field Office or representative for cabl
179. ond PT Odd values are rounded Units are not allowed the number is This is a query with one or no argument It returns a linked interpreted as dBm Nominal selects the factory default value integer response indicating the vertical position of the primary of 30 dBm lt arg gt none or PRImary or secondary lt arg gt SECond AE NOMinal marker or their vertical difference lt arg gt DELta The 0 point is at the bottom of the screen See the curve command MKRIvl 24 for example i een coordinates for a more complete explanation of screen cooraina MXRivI MVPos MVPOS PRIMARY 356 for example Arguments None MVPos SECond This simple query returns the signal amplitude required at the input to the spectrum analyzer s first mixer to deflect the display MPO SECOND 233 for example to the top graticule line MVPos DELLA i MXRiv1 WPO DELTA 123 for example MXRIVL 30 for example ATN A l 4 43 4 44 KC GE EE S 2711 amp 2712 Programmer Manual MXSpn lt arg gt Arguments OFF ON This single argument command turns the maximum span mode on and off The spectrum analyzer returns to the previously selected span division when MAX Span is turned off MXSpn ON MXSpn CFF MXSpn Arguments None This simpla query returns the current on off status of the maximum span feature MXSpn MXSPN ON MXSPN F NNBw lt arg gt Arguments Number in the range 1 Hz to 1 8 GHz This single argument command
180. or example Fifime lt arg gt Arguments Time in the form RH wues This command sets the time of the real time clock The argument is a string in the above format where HH is the hour in 24 hour format MM is minutes and ss is seconds The seconds are set to zero regardless of the argument given Note that the elements are separated by colons Quotation marks must be present Ali fields must contain a value a leading 0 is assumed if a single digit is used RFIme 13 30 00 H lmei Arguments None This query returns the current time in the format HH MM Ss where HH is the hour vw is the minute and ss is the seconds RIIme RIIME 13 30 27 SAVe lt arg gt Arguments A ON A O0FF B ON B OFF C ON C OFF and combinations of the above 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 opp deletes a saved display register from NVRAM For instance tha command save A ON saves the current contents of the A register to NVRAM and halts the A register from updating save A OFF permits the A register to be updated each sweep 4 60 fee N 4 Ee SE eee DTH amp 2712 Programmer Manual SEES ES EAU Single or multiple arguments can be used in a single command SAVe A ON for example SAVe C 0FF for example SAVe AH BCEE for example SAVe A ON B COKF C F for example Using the save lt
181. or the PCIHV PCIIA board and the QuickBASIC language these programs have names such as QBIB4 0BJ QBIB4728 0BJ and QBDECL4 BAS The programs include the BASIC device function calls which enable you to communicate easily over the GPIB The function calls are an integral part of your application programs Centronics Printer or Plotter Optional A printer a plotter or both can be added to your system to provide hard copy output Printers are preferred for character based data such as parameter values or instrument settings Plotters provide superior results when displaying graphical data A convenient approach is to install a printer on a parallel port of the controller and a GP1B compatible plotter on the bus With this approach you can plot graphical data directly from the spectrum analyzer when the controller is not available See Setting the Talk Only Option later in this section Spectrum Analyzer Fitter SETTING UP FOR GPIB OPERATION Your equipment must be correctly configured before GPIB Figure 1 1 Typical Small Instrument System for GPIB operations can be performed The following tasks must be i completed 2711 and 2712 Equipped with the GPIB e Installation of cables between the system components Your 2711 or 2712 must be equipped with the GPIB interface to Configuration of the the spectrum analyzer and device operate over the General Purpose Interface Bus Proceed to driver information if your instrument has
182. ple query returns the status of the occupied bandwidth measurement mode VERTICAL SCALE OFFSETS ied OWODE ON EE GEES OBAMODE OFF LOG NORMALIZATIONS cerns Tore En OBWPent lt arg gt FILTER SENSITIVITY Arguments Numeral in the range of 1 to 99 ATN This single argument command specifies the percentage 1 to 99 of occupied bandwidth for occupied bandwidth measurements ee FILTER AMPLITUDES Pent 40 for example Dee a E 2711 amp 2712 Programmer Manual OBWPcnt Arguments None Ba S This simple query returns the occupied bandwidth percentage Pent OWENT 40 for example OBWResult Arguments None This simple query returns tha result of the most recent occupied bandwidth measurement in Hertz CoWResult OBWRESULT 4 0E 6 for example PKHelght lt arg gt Arguments Integer in the range 2 to 255 This single argument command specifies how high a signal peak must be so it is recognized by the NEXT LOWER and NEXT HIGHER marker functions The signal height is specified in vertical display increments relative to the nearest local deer in its skirts 20 is the default value Units are not allowed SIGNAL PEAK This height must exceed PKHeight in order to recognize SIGNAL PEAK PKHeight 50 for example 4 49 WO 62711 amp 2712 Programmer Manual Goa PKHeight Arguments None net This simple query returns an integer representing the signal height in vertical display
183. points in a 2711and 2712 waveform see Section 4 Command and Query Definitions tor curve response formats Before curve data is transferred you must specify which digital display register A 6 8 decimal ASCll encoded hexadecimal or binary is determined by the waveform preamble see the WrMpre command The destination of the transmitted data or origin of the returned data is also determined by the preamble unless the A B C OF D argument is used with the curve query In these cases the origin Is specified by the argument For example cURve C returns data from the register Example 6 2 shows two QuickBASIC subroutines that can be used with the National Instruments board and software to send and return ASCll encoded curve data The returned data are displayed on the controller screen and will resemble the ASCH example in the curve command as described in Section 4 The WFMpre command determines the encoding and source or destination registers in both subroutines An alternate approach to transferring curve data as packed integers is illustrated in the GPIB demonstration program at the end of this section 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 generated in ASCII format using a spreadsheet Curves should always be transferred to a saved register to ensure they are not immediately over
184. pressed CGOSUB SAVE SET GOTO MENU CASE 61 F3 pressed GOSUB RES SET GOTO MENU CASE 62 FA pressed GOSUB SAVE FILE GOTO MENU CASE 63 F5 pressed GOSUB RES FILE GOTO MENU CASE 64 F6 pressed 2711 amp 2712 Programmer Manual GOSUB INT CUR 2711 amp 2712 Programmer Manual ieee em SS See SC sho SE SE Si 2711 amp 2712 Programmer Manual GOTO MENU CASE 68 F10 pressed SYSTEM returns to dos END SELECT GOTO MENU regenerates the menu subroutine to send a command or query Land receive the response SEND DCH 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 lt hold time 1 l LOOP QUES INSTR 1 wrt if ques 0 there is no response IF QUES 0 THEN GOTO SEND RCV tif message contains get response and print it CALL IBRD bd RDS GOSUB GPIB ERR PRINT PRINT THE RESPONSE IS PRINT PRINT MIDS RDS 1 IBCNT PRINT PRINT INPUT SEND MORE ENTER Y OR N Y IF Y Y THEN GOTO SEND RCV RETURN 1 t subroutine to fetch current instrument settings from 2712 and save to disk SAVE SEIT CLS PRINT PRINT ENTER NAME FOR SETTINGS FILE PRINT USE PATH IF NOT IN CURRENT DIRECTORY INPUT FILENAMES WRI SET CALL IBWRT BD WRITS request settings GOSUB GPIB ERR CALL IBRD bd RD read settings GOSUB GPIB ERR SETTINGSS MID RDS 1 IBCN
185. re usually sends and receives these messages in a way that is transparent to the system operator or programmer Refer to Appendix A for additional information about uni and multi line messages The instrument specific messages exchanged over the GPIB or RS 232 interface contro the measurement and display functions of the spectrum analyzer These messages are always transmitted over the data lines with the exception of the EO message terminator Instrument specific messages control parameters such as center frequency span division reference level and resolution bandwidth Itis the system programmer s task to efficiently compile a series of messages in a script designed to implement specific tests and measurements The script which is written in a conventional computer language and embodies specific spectrum analyzer commands and queries is called a control program An instrument specitic message consists of three or more 8 bit bytes of information that are transferred between the spectrum analyzer and the system controller Each byte represents an ASCII character or binary data A message may be an input message or an output message and it may contain one or more message units gei instanca here is an example of a message from Mary to ohn John dinner put in oven washing machine start bank withdraw how much cat let her in Bye bye John s response may resemble this one Mary 100 Bye bye He could
186. received when in local mode oan EO 202 oa _62__ Command aborted tl return to local 721 EO Amplitude Normalization Failed 23 o pe Deadock detected _722 E0 _ Reference Normalization Failed 205 98 62 rgument out of range 723 EO Internal Ref Freg too inaccurate 206 98 Le Group execute trigger ignored 724 Eo Internal Ref Amp too inaccurate 252 98 62 System error Illegal command _ 725 EO f Selected Stored Setting is Emp 253 98 Ce Integer overflow range 0 65535 Kee EO Video Monitor Not Installed 371 99 Le Output butter full too many queries 727 0 Satellite Video Monitor Not Instalted 372 o 63 Input buffer full command too Long 728 EO Not installed am es Cal Power On 99 E0 Counter Not Installed 403_ 67 ta User Request sa J 730 EO Cannot overwrite saved displa eon 4io 99 63 clas 731 En NVM Checksum Error A1 La 63_ RS 232 Framing error me EO _ Non Compatible NVM Format a2 99 63 _ RS 292 Hardware overrun 733 EO _ First Step Must Be Done First 700_ 224 EO Error meses 734 EO FREQ Norm Suggested Inner PLL 5 12 5 11 Ge 735 _ 736 __ 737 738 _ 739 740 Event Code Cl Q oy D ais ma fost ow ISN JS pS pS iN epes CH D 755 756 759 760 wiy e le NS Kach CH Gel fN fN Bla lala rd Poo POT p Go N o oo 2711 amp 2 ci d Table 5 7 Continued Status Byte H
187. rgument command turns the output level offset of the optional tracking generator on and off TGlevel 1 2 DBW for example TG0Mode ON Tode OFF TGLevel Requires Option 04 Tracking Generator TGOMode Requires Option 04 Tracking Generator Arguments None Arguments None This simple query returns the currently specified output amplitude of the optional tracking generator The units are This simple query returns the current on off status of the those currently selected as the reference level units tracking generator output offset TeLevel TG0Mode TGLEVEL 1 2 for example TGOMODE ON nw 4 71 a 4 72 a Ee POSS 2711 amp 2712 Programmer Manual See pret ENNEN 2 EE SC TGOOffset lt arg gt Requires Option 04 Tracking Generator Arguments Value within the 100 dB range This single argument command specifies the output level offset of the optional tracking generator The offset can be between 100 dB to 100 dB Units ara not allowed A non zero argument turns offset mode on and a 0 argument turns the offset mode off TH0Offset 10 5 for example TGOOffset Requires Option 04 Tracking Generator Arguments None This simple query returns the currently specified output level offset of the optional tracking generator in decibels dB TH0Offset TCOFSET 10 5 for example TGTMode lt arg gt Requires Option 04 Tracking Generator Arguments OFF ON This single argument command turns the
188. rguments AM EXTernal FM QP This single argument command designates the source of the signal displayed by the spectrum analyzer as the internal AM detector normal display internal ru detector useful for FM deviation checks or an Eternal input The op argument invokes the Quasi Peak detector 2712 Option 12 only if FM Or EXTernal are selected the spectrum analyzer is placed in zero span mode and max min signal acquisition is selected FM and External are not allowed in DBUVM mode EMC mode must be active before op is selected if not Event 789 is declared and the display source is not changed if op is selected a QP precedes the vertical scale factor in the on screen readout DSRe AM DSRc ExTernal DSRe FM De DSRe QP 4 22 2711 amp 2712 Programmer Manual E DSRe Arguments None This simple query returns the currently selected source of the signal displayed by the spectrum analyzer DSRc DSRC AM DSRC FM DSRC EXTERNAL pSRC OP 2712 Option 12 only EMC lt arg gt Only available for 2712 Option 12 Quasi Peak Detector Arguments ON OFF This single argument command turns EMC mode on and off EMC ON EMC F EMC Only available for 2712 Option 12 Quasi Peak Detector Arguments None This simple query returns the status of EMG mode EMC EXC ON EMC OFF EOS lt arg gt Arguments ON OFF This single argument command enables and disables the end of sweep SRQ When ros is on an end of s
189. rguments various mnemonics as listed in Table 4 4 This single argument command simulates pressing a key on the spectrum analyzer front panel The general form of the command resembles this example KEY lt arg gt where lt arg gt is the mnamonic for the key press to be simulated All permissible mnemonics are listed in Table 4 4 For instance to simulate pressing the INPUT Menu key you send the following message KEY INPutrrenu for exanple To turn on the calibration signal using the KEY command you can send this message KEY INPutmenu KEY M9 for example The KEY command is not as efficient as using a dedicated insirument specific command such as CALSig ON to achieve the same result tt requires more time and memory space Nevertheless the command does provide an alternative if you experience difficulty implementing a dedicated command In fact you can perform all GPIB programming using only the KEY command However because of its increased memory requirement and decreased speed use of the KEY command is discouraged as a general purpose GPIB programming technique Note that there are no KEY commands for the PLOT and POWER keys EE SE Table 4 4 Arguments of the Key Command nana Key appimenv Application Menu ei eames Display A Ko RL Display B TBS Backspace ke fc Date D DL Display D Ge Center Measure Demodulator Generator Menu Display Menu ee Fine Ref Lvl steps Assign Keypad
190. rious countries TVLStd What TV standard is being used VSYne Selects positive or negative video sync polarity VSYnc sitive or negative sync polarity being used 1 Requires Video Monitor mode Option 10 3 1 ZEA 2711 amp 2712 Programmer Manual P Table 3 8 SWEEP and RES BW Front Panel Commands RESbw TIME SINGLE AUTO S VFEnab SiGswp TiMMode see MENUS UTIL key for VFMode and VIDfit Stata Function Header Turn AUTO resolution bandwidth on and off AREs Is AUTO resolution bandwidth on or off Selects and arms the single sweep mode What is the status of the single sweep mode TIMe Select increment decrement the sweep speed TMe What is the sweep speed TiMMode Select auto manual or programmed sweep mode TiMMode What sweep mode is selected SE Song Ss SEN 8 a S Re oh SE sites 2 SE GE o 2711 amp 2712 Programmer Manual E GC SE 2711 amp 2712 Programmer Manual SE Table 3 10 DSPL Menu Commands Tabie 3 9 DISPLAY STORAGE Front Panel Commands SAVe SSweTRIG um MKA FREQ _APPL mood MAXHId DEMOD MG DSPL DISPLAY MENU 0 DIGITAL ANALOG DIGITAL 1 ENSEMBLE AVERAGING i INITIATE AVERAGING AVG 2 TERMINATE AVERAGING AVG 3 MAX A MEAN 5 MIN AVMode 6 MAX MIN 7 NUMBER OF AVERAGES AVNum Header Function A el MXHId Turn max hold function on and off MXHId Is the max hold function on or off 8 SAVE RESUL
191. rns the spectrum analyzer display register currently selected as the destination for MIN Hold and ensemble 1 8GHz 18 0 average functions e E Be a AVDest nr for example WOESE A AVDEST B ATHrhid lt arg gt AVDEST C Arguments ON OFF AVG lt arg gt This single argument command turns automatic selection of signal threshold on and off Tho threshold may change when Arguments ON OFF turning on auto selection but not when turning it off This single argument command turns the currently selected ATHrhid ON ensemble averaging mode on and off Ensemble averages will terminate after the requested number of sweeps are averaged ATHrhid OFF but ave OFF is used to terminate a continuous average Ensemble averaging cannot be turned on if the analog display ATHrhid mode is active or if there is a destination register conflict Arguments None AVG ON This simple query returns the status of automatic signal _ ANG OFF threshold selection AVG ATHrh1d EE Arguments None This simple query returns the on off status of the currently RNE Cee selected ensemble averaging mode AVG AVG ON AVG OFF 4 6 EE SE EE SE S EE 2711 amp 2712 Programmer Manual E S3 BWMode lt arg gt AVMode lt arg gt rs Arguments ON OFF IDLE Arguments MAX MAXMin MEAN MIN ia This single argument command turns the spectrum analyzer This single argument command designates the ensemble bandwidth measurement mode on and off When bandwidth
192. rt posit wrtS tem wrt S D END IF ELSEIF LEN wrt lt 6 THEN posit INSTR wrt tem wrt LEFT wrt posit wrt tem wrtS Di END IF tetera es send the curve query oe E wrt HDR ON wrt PRINT 1 wrt ensure that hdr is on func 5 CALL RS232 CALLS SSeS SS SS SS GOSUB DISPLAY WAVE RETURN VK KKK KKK RII A RK IK EK e ARIK KKK KKK k k kk ERK k k k This is an example of a hex waveform sent to the 1 2712 The send function assumes that an acquire t waveform function has been performed previously This is an arbitrary decision for demo purposes Any combination of characters can be constructed to create a waveform to be sent to the 2712 Also the waveform is always sent to storage k location C This is an arbitrary target location t A B or C can receive the waveform KR KKK IK RRR KK IK IKK KIKI HK KAKI ERK EERE REE ERR K SEND WAVE SC 6 49 LSS SSS SS SSS first make sure save C is on H wrt SAV C ON funct 3 CALL RS232 CALLS 1 next set preamble to point to target waveform IC 3 l wrt WFM WFI C func 3 l CALL RS232 CALLS t t next construct the waveform to be sent D curve command with argument indicating hex transfer wrts CURVE HO wrt wrt HEX 513 byte count FOR x 0 TO Sil actual waveform data conversion TEMPS STRS wf m x routine decimal to hex iF VAL TEM
193. ry listing similar to pressing UTIL 4 6 Each fine in the listing except the first and last is form atted as in this example filename read write enabled R or W size in bytes DIR DIR 12 88 e D IMPDBG RW 16380 12 88 0 4 19 SE E 2711 amp 2712 Programmer Manual DSETOO RW 370 SETOBU RW 370 UDP2 R 160 u for example Each line is separated by a line feed DiScor lt arg gt 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 DIScoor OFF DiScor Arguments None This simple query returns the current on off status of the spectrum analyzer s frequency corrections Note that DISCOR ON means the frequency corrections are off DIScor DISOOR ON DISOOR OFF DLine lt arg gt Arguments ON OFF This single argument command turns the display line feature on and off DLINE cannot be turned on if the A register is being used waterfall mode min hold ensemble averaging etc Attempting to do so generates an event 787 destination waveform conflict DLIne ON DLIne OFF 4 20 SENSE EE Com SE 2711 amp 2712 Programmer Manual ee SES RAS Go DLine oom Arguments None This simple query returns the current on off status of the display line feature DLIne DLI
194. s MLFtnxt Move the marker to the next signal peak left MMAx Move the marker to highest data point on screen MRGTnxt Move the marker to the next signal peak right Equivalent to turning the knob 1 click to the left PSTep Equivalent to turning the knob 1 click to the right SGTrak Turn signal tracking on and off SGTrak fs signal tracking on or off TUNe Change frequency L ee ve SE 2711 amp 2712 Programmer Manual cee E e Tablo 3 3 MKR FREQ Menu commands MKR FREQ APPL SWP TRIG UTIL DEMOD DSPL USER DEF MARKER FREQUENCY MENU 0 THRESHOLD AUTO 16 3DBM THRhld ATHrhid 1 PROGRMD TUNING INC STEp 2 KNOB FUNCTION MARKER TMOde 3 MARKER TO REFERENCE LEVEL TOPsig 4 MOVE MARKER TO NEXT PEAK LRAmpl HRAmp 5 TRANSPOSE MARKERS MEXchg 6 MARKER START STOP STStop 7 FREQUENCY START STOP 8 TUNING INCREMENT AUTO STPinc 9 SETUP TABLE 0 CENTER START FREQ CENTER CFSF 1 COUNTER RESOLUTION 1HZ CREs CNTrak 2 TABULAR TUNING TABLES TABle 3 FREQ OFFSET 0 000HZ FOFfset 4 FREQ OFFSET MODE OFF FOMode MAMp1 MKTime TAMp1 and TFReq return on screen measurement parameters MPOs and MvPos have no visible affect when the spectrum analyzer has an analog display all Display Storage registers disabled GER EE 2711 amp 2712 Programmer Manual Ge Table 3 4 FREQUENCY SPAN DIV and REF LEVEL Front Panel Commands
195. s not valid in zero span mode MFReq 193 25 MHz for example MFReq lt arg gt Arguments None PRImary SECond DELta This is a simple query with one or no arguments t returns a linked response indicating the frequency of the primary lt arg gt none or PRImary or secondary lt arg gt SECond marker or their frequency difference lt arg gt DELta The units are Hertz MFReq MPREQ PRIMARY 193 25E 6 for example MFReq SiCond MFREQ SEOOND 197 75E 6 for exanple MFReq DEIta MERED DELTA 4 5 amp 46 for example MHDest lt arg gt Arguments A B orc This single argument command selects the MIN Hold destination waveform MHDest A MiDest B Misst C i Es 4 39 2711 amp 2712 Programmer Manual MHDest Arguments None This simple query returns the MIN Hold destination waveform MHDest MADEST A MHDEST B MHDEST MKTIime lt arg gt Arguments number in the range 0 to 20 This single argument command sets the time of the primary marker The command is valid only in zero span mode Seconds are assumed unless units are appended The range is 0 to 20 seconds but the value specified must be within the current spectrum analyzer on screen time span or an SRQ and event code are generated MKTime 204 Msec for example NiKTime lt arg gt Arguments None PRImary SECond DELta This is a simple query with one or no arguments It returns a linked response indicating the time of the pr
196. s returned if the PLOT key is the last key pressed LRAmp Arguments None This is a command with no 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 cammand turns ona marker If signal track is enabled LRAmp1 turns it off enables the marker and assigns the knob function to marker control H there is no lower peak and scErr is on an SRQ and an event 896 are generated LRAanp1 MAMp lt arg gt Arguments None PRImary SECond DELta This is a simple query with one or no arguments It returns a linked response indicating the amplitude of the primary lt arg gt none Of PRImary or secondary lt arg gt SECond marker or their amplitude difference lt arg gt DELta The applicable units are those currently selected for the reference tevel unit MAMp1 MAMPI PRIMARY 6 8 for example 4 37 2711 amp 2712 Programmer Manual SS E MAMp1 SECond MAMPI SEOOND 2 4 for example MAMplL DELta eau MAMPL DELTA 4 4 for example MARker lt arg gt Arguments ON OFF SINgle DELta This single argument command turns markers on and off Turning on a marker piaces the knob function in marker control and disables signal track mode bandwidth measurement mode noise measurement mode and C N measurement mode The markers cannot be turned on in analog display or Video Monitor panel 10 modes or in waterfall mode unless
197. sable Auto Serial Polling yes High speed timing no interrupt jumper setting 7 Base HO Address 02E1H DMA channe 1 Internal Clock Freq in MHz 6 A ST Dees are E Sieg d oO SE Figure 1 5 Natlonal instruments PCIIA Board Characteristics 1 11 Installing the Device Driver Primary GPIB Address Secondary GPIB Address Timeout setting EOS byte 00H Terminate Read on EOS Set EO with EOS on Write Figure 1 6 TEK_SA Device Characteristics 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 PCH IA board the device driver is a program named GP1B CcoM created and modified by another National instruments program named IBCONF EXE If you are using a board from another manufacturer the appropriate driver should have accompanied your board The device driver program must be installed whenever you wish to use the GPIB Use the following procedure Refer to your DOS manual if you need help creating or modifying files Copy GPIB CoM to your computer s root directory e Add the following line to your conr IG sys file device CP1B C amp M if conFIG sys does not already exist in the controller s root directory create this file e Reboot your controller The GPIB device driver is loaded into memory whenever you boat your computer It then remains in memory unt
198. se Hertz are assumed Interpretation as canter or start frequency depends upon tha setting of crsr If start frequency is selected the span is checked and the start frequency may be adjusted to ensure the center frequency is never more than 1 8 GHz The argument is offset by the FOFfset command if FOMode is enabled FREq 193 25 MHz for example FREq Arguments None This simple query returns the currently selected center or start frequency FREQ FREQ 193 25E 6 for example 4 30 Eege x e 2711 amp 2712 Programmer Manual GRAt lt arg gt Arguments ON OFF This single argument command turns the graticule illumination on and off CHA OFF GRAt ON GRAt GTL Arguments None This simple query returns the current on off status of the graticule illumination GRA GRAT OFF CRAT ON Arguments None This is a command with no arguments that removes the spectrum analyzer from the remote state and returns it to local mode It is intended as the RS 232 equivalent of the GPIB universal GTL command see Appendix A GTL HDR lt arg gt Arguments ON OFF This single argument command turns the header on and off ina query response When HDR is ON a command header describing the nature of the response precedes the response proper 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 HD
199. se SRQs are masked using the Eos command e Device dependent failures or warnings generate SRQs These SRQs include all spectrum analyzer error messages that may appear on screen They cannot be independently masked Powering up the spectrum analyzer generates an SRQ when the power up SRQ is enabled requires GPIB interface This mode is enabled or disabled by pressing the key sequence UTIL 4 0 0 2 Illegal commands command execution or internal errors produce SRQs that cannot be independently masked e Failure of find signal commands MMAx MRGTnx MLFtnxt HRAmp1 LRAmpl generates an SRQ This SRQ can be masked with the scErr command Crossing the display line limit generates an SRQ This SRQ is enabled when the display line limit detector is on DLLimit This SRQ cannot be independently masked Internal hardwareAirmware errors generate an SRQ that cannot be independently masked STATUS BYTE The status byte usually provides information about instrument conditions according to certain categories normal abnormal busy command error execution error etc This is different from data returned by the ERr and EvEnt queries which provide detailed information about the cause of the current status For instance the response to an EVEnt query might describe what kind of error or warning prompted the spectrum analyzer to assert sro and report abnormal status The status byte is stored in the status b
200. sed The WAR command is typically used in PRINT 1 SETTINGSS conjunction with the single sweep mode to maintain CLOSE 1 synchronization between the controller and spectrum analyzer RETURN during program execution PUT SET OPEN THE DISK FILE AND READ IN THE STORED SETTINGS OPEN I 1 FILENAMES INPUT 1 SETTINGSS CLOSE 1 DISPLAY THE SETTINGS FOR VERIFICATION PURPOSES PRINT SETTINGSS SEND THE SETTINGS TO THE 2712 WRT SETTINGS S CALL IBWRT BD WRTS RETURN 6 1 7 Example 6 7 Subroutine to Demonstrate the WAIt Command 6 1 8 program segment to demonstrate the use of the WAIT command corer SSS SSS PEN OFF ON PEN GOSUB serial poll PEN ON use only waveform A and place instrument in single sweep mode wrtS VIEW A ON VIEW B OFF VIEW C OFF VIEW D OFrF SIGSWP CALL IBWRT bd wrt 61 9 dei doo aNu S dHaMS 4O GNG ATIHM OG uNa SddaMS O ON Hupnuy oD erojeq deems Jo pu Irun aiau fea 944 Pq RUMaI TIVO ndi M dMSOTSu 344 t 3454 SPqQ LUMI TIVO a AAO Y MdTIAu 924 VSONIN MIA NO n NO a MUIA d e MAILA NOO MATA AJO 2 uy pedetdstp sp eya WOT JORAIGNS 0 Y UT pears WIOJ ALM SYA SN MOU n pol LANEI TIVO wO IN FAVS 324 apeul useq sey daems suo Asport JV TP jun y SA UO UINF TON Od ans ang dooT vu daaMS AO CNG WITHM OG D eTnpou NS uN dgd amMs 40 ON JJO Ndd
201. sed commands only instruments previously addressed to listen will respond to these commands universal commands all interface instruments whether they have been addressed or not will Management Bus raspond to these commands and secondary addresses for 5 Signal Lines devices interfaced through a primary instrument Parallel Poll Enable PPE messages are derived from the characters in the DIO1 DIO8 Data first column under Lower Case letters in Figure A 3 decimal Input Output Lines coded characters 96 through 111 The standard recommends DAV Data Valid _ the use of decimal code 112 lower case letter p for the Parallel NRED Not Ready For Data Poll Disable PPD command All parallel poll configured NOAC Not Data Accepted instruments respond with status information at the same time P when the EO line is asserted and ATN is true FC Interface Clear ATN Attention SRQ Service Request REN Remote Enable EO End Or Identify System A 6 E 2711 amp 2712 Programmer Manual SE DEVICE DEPENDENT MESSAGES The IEEE standard does not specify the coding of device dependent messages messages that control the internal operating functions of a device After addressing a talker and the required number of listeners via interface control messages the controller unasserts the ATN line false on the bus When ATN becomes false high any commonly understood 8 bit binary code may b
202. sed as part of abnormal event handler but can be used any time 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 H SPR RETURN 1 TSubroutine 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 7 WRT HDR OFF EVE event code SPACE 5 request event code CALL IBWRT PDS WRT send command CALL IBRD BD event code tread code PRINT event code print code GOSUB GPIB ERR i RETURN subroutine to print the GPIB error code 14f a GPIB error occurs ang rend the program gracefully turn off header and GPIB ERR IF IBSTA lt 32768 THEN RETURN no GPIB error CLS PRINT if GPIB status word lt 32768 PRINT GPIB ERROR HAS OCCURRED PRINT PRINT GPIB ERROR CODE IS IBERR PRINT PRINT 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 rn SE es Ge REMOTE MENU CONTROL The 2711 and 2712 spectrum analyzers include a set of commands and queries for designing menus on the spectrum analyzer screen and interacting with these menus by pressing keys on the spectrum analyzer KEYPAD This feature is designed
203. sets the noise bandwidth for normalized noise mode measurements Units may be appended otherwise Hertz are assumed NNBw 4 Miz for example NNBw Arguments None This simple query returns the noise bandwidth in Hertz to be used for normalized noise mode measurements NNBw MEW 4 0E 6 for example NNMode lt arg gt Arguments OFF ON IDLE This single argument command turns the normalized noise measurement mode on and off The command also sets TMODE to MARKER ACOMODE to MAXMIN and SGTRAK to orr The command cannot be used in analog mode Video Monitor mode Option 10 waterfall mode when the D register is off or in linear 4 45 Hs T A 2711 amp 2712 Programmer Manual display mode Normalized noise mode measurements cannot be made on a saved waveform The NNMode IDLE command is equivalent to NNMode ON The IDLE response indicates when the mode is enabled but no signal is present to measure Node ON NNMode OFF M e IDLE NNMode Arguments None This simple query returns the current status of the normalized noise measurement made 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 NiMode NNMODE ON NAMODE OFF NMODE IDIE NNResult 4 46 Arguments None This simple query returns the result of the most recent normalized noise measure
204. space character is used to separate a command or response header from its first argument or to separate the question mark following a query header from its argument The space is optional when there are no arguments Comma Commas are used to separate or delimit multiple arguments in commands and responses They should not be used elsewhere Semicolon Semicolons are normally used to separate or delimit multiple message units in a single message They may also optionally follow the last argument of a command or query They should not be used elsewhere The line feed character can be optionally substituted for the semicolon Colon Colons are used to connect the two parts of a linked argument They should not be used elsewhere Line Feed GPIB The tine feed character can be used instead of a semicolon to delimit message units in a single message The 2711 and 2712 will substitute line feeds for semicolons in its responses when MSGd1m is set to LF Line feed can also be used as a message terminator with controllers that do not support the GPIB EOI protocol These two uses are separate and not exclusive Carrlage Return and Line Feed RS 232 When a controller sends data to the 2711 and 2712 the spectrum analyzer interprets CR LF or CR LF as a message terminator Messages sent by the spectrum analyzer over the RS 232 interface can be terminated in the following ways e By CR only carriage return ASCII 13 e By LF only
205. sponse with all necessary arguments and delimiters Simple messages may consist of individual commands or queries as in these examples FREQ 200MHZ SAVE A ON CURVE However message units may be combined to form more complex messages like this one FREQ 200 MHZ SAVE A CN CURVE Notice that commands and queries can be mixed in a single message 2711 amp 2712 Programmer Manual Commands A command can be represented graphically as shown in this example Header Delimiter spaca Command Header farg 1 arg 2 Jam N Argument Delimiters Comma Although muttipfe arguments are shown most commands have only a single argument Following are several examples of specific commands FREQ 5 5E 6 REFLVL 12 DBW VRIDSP LIN 100MV RESBW 1 0M SAVE A ON B ON C OFF TIME 5 US These examples illustrate several important characteristics of command formatting 1 Aheader delimiter space following the header is required 2 Variable number formatting options are available arguments are expressed as integers 12 and 100 floating point numbers 1 0 and 035 and in scientific notation 5 5E 6 3 The absence of units indicates that the appropriate units are inferred fiom the command header For instance TIME im plies seconds and FREQ or RESBW imply Hz Thus 5 5E 6 in the FREQ command implies 5 5 x 10 Hz or 5 5 MHz 4 Aspace between an argument and its units is optional 5 Shortened forms of units may be used
206. strument 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 The 2711 and 2712 RS 232 interface requires a minimum of three lines for operation e Transmit data TXD e Receive data RXD e Ground GND If hardware handshake is required two additional lines must be supplied in the cable Clear to Send CTS Request to Send RTS The section entitled Selecting a Data Flow Control Method located later in this section describes the use of these lines for hardware flow control 1 19 EE Se 2711 amp 2712 Programmer Manual OOo o nes 2711 amp 2712 Programmer Manual EIA Standard RS 232 D defines other lines typically used for modem control and handshaking The 2711 and 2712 can operate using the minimum wiring configuration If the appropriate handshake lines are provided a printer or plotter that expects handshaking over the RS 232 interface may be used Appendix B contains additional cabling information Data bits are transferred serially one bit at a time over the interface Data consists of instrument commands and qu
207. t eo Noise Level Less Than 2 dB og 224 Start Frequency Changed 819 224 EO_ Stop Frequency Changed 820 224 Eo _ Signal out of IF passband ao 224 En Le Modulation on signal g22 224 Eo ig Measurement Complete 823 224 EO _ Disconnect Input Signal 824 224 Eo ZERO SPAN Entered 825 224 Co Must Be In Delta Marker Mode ee 224 80 Stand B Si La E0 Printer Error B828 224 Printer Out Of Paper 829 224 Printer Is Not Connected 830 224 Port Offline gei 128 Formatting Plot g32 224 Eo _ Plot Aborted 933 224 En Can t Count With Corrections Off 1934 224 Eo Counter Signal Out of IF Passband 835 224 En Vert Mode Scale Mismatch on Diff pop 224 FO Query Not Available 837 224 E0 Average Noise Too Low 5 15 e 2711 amp 2712 Programmer Manual E ss SESE Table 5 7 Continued Event Status Byte Event Code Dec Description Nene 938 224 EO Only Waveforms Saved 839 224 Eo Only Waveforms Deleted 840 224 File System Full 841 224 File System Directory Full 842 224 File Size Error _843 224 j Too Many Files Open 844 224 File Not Found 845 224 Protected File 846 224 FO Cannot Delete File While in Use 847 224 EO Additional NVRAM Not Installed 84a 224 0 Invalid File Number Bug 224 EO Invalid Device Number 850 224 0 EndofFile a51 224 Eu _ NVM Version Mis Matc
208. t of receiving the DCL or SDC command In general these commands are used only to clear the GPIB interface circuits within an instrument DT Device Trigger Functlon A 18 The DT Device Trigger function allows the controller in charge to start the basic operation specified for an instrument or group of instruments on the bus The IEEE 488 standard does not specify the basic operation an instrument is to perform when it racaives the GET Group Execute Trigger command To issue the GET command the controller asserts ATN sends the listen addresses of the instruments that are to respond to the trigger and then sends the GET message Once an instrument starts its basic operation in response to GET the instrument must not respond to subsequent trigger state transitions until the current operation is complete Only after completing the operation can the instrument repeat its basic operation in response to the next GET message Thus the basic operating time is the major factor that determines how fast the instrument s can be repeatedly triggered by commands from the bus uh ELIE AAP BEN SM ch X CS SE E EE gt SE SE E 2711 amp 2712 Programmer Manual E GE C SR and PP Controller Service Request Parallel Poll Functions The C Controller function provides the capability to send primary talk and listen addresses secondary addresses universal commands and addressed commands to all instruments on
209. t only when header is present Response Header arg 1 arg SL Jam NI optional Argument Delimiters Comma With the exceptions of the SET PLOT and WAVFRM queries which never produce response headers response headers are optional Headers are turned on and off with the HDR command When HDR is ON all responses except SET PLOT and WAVFRM have headers No responses have headers when HDR is OFF Further when HDR is OFF the link in the responses to marker queries with linked numeric arguments Such as MAMp1 Or MFReq is also turned off Response headers cannot be selectively suppressed unless HDR OFF is set before the response and then HDR is set to ON again after the response Most responses consist of an optional header and the response argument However responses such as the WFMPRE response have many arguments separated by commas Others including the response to cuURVE contain hundreds of data words in a single argument called a binary block sev is a special query that returns many arguments separated by semicolons so the response can be read back to the spectrum analyzer as a series of commands Note that a response always terminates with a semicolon or line feed if MSGDLM is set to LF Following are examples of three queries and their resulting responses The first line after each query is the response with tha headers on the second line is the response to these queries with the headers off P
210. t that specifies the vertical scale factor for the indicated display mode The DSRC command must be used to enter FM or EXTernal modes although the vRtdsp command still sets the scale factor Display Type uV div mV div 8 839 to 279 5 kHz div T external 17 5 87 5 175 my JI mes corresponds to reference levels 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 VRIdsp 10G 5 for example VRidsp LIN 50 Uv for example VRTdsp FM 5 kHz for example VRidsp Exfernal 175E 3 for example VRTdsp lt arg gt Arguments None LOG LIN FM EXTernal This is a query with one or no argument that returns a linked response The current scale factor is returned when VRTdsp Is used without an argument When used with an argument VRTdsp returns the scale factor used when the indicated mode was last entered Units are decibel dB for Loc volts for LIN or EXTernal and Hertz for FM VRTdsp VRIDSP LOG 5 for example VRIdsp LOG VRIdsp 10G 5 for example 4 86 Wes Ge 2711 amp 2712 Programmer Manual GE VRTdsp LIN WFMpre lt arg gt VRIDSP LIN 50 0E 3 for example Arguments ENCdg Asc ENCdg Bin ENCdg Hex WPId A anp g VRidsp FM WFId B WFId C WFId D VRIDSP FM 5 6 3 for example This is a command with one or more linked arguments It is used VRidsp Externa to designate the sourc
211. ta point of the curve each data point may be represented by one to four bytes depending on encoding e Binary one byte Hexadecimal two bytes representing the hexadecimal numerals 0 F Decimal two four bytes representing a comma delimiter plus one to three decimal numerals 0 9 Absent for ASCIl encoded decimal otherwise 2 s complement of Zd Dou br MOD 256 Figure 4 1 Format of Curve Data 4 15 5 5 4 16 2711 amp 2712 Programmer Manual 505 245 505 5 Figure 4 2 Spectrum Analyzer Graticule Coordinates The spectrum analyzer s graticule is represented by 500 intervals horizontally and 240 intervals vertically The graticule corner coordinates are represented as shown in Figure 4 2 Points along the horizontal axis are numbered from 0 to 571 The resulting graticule is represented 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 graticule area Therefore the sixth data point 5 along the vertical axis crosses the bottom graticule line the 245th point crosses the top graticule line See Section 6 Programming for programming
212. ter or Plotter Optional sscesseeescessrsersseessenreeseee 196 IMPLEMENTATION OF THE RS 232 INTERFACE s0000010B 3 SETTING UP FOR GPIB OPERATION nn 1 6 RELATED DOCUMENTATION See B 7 Connecting the Equipment enen E or Configuring the 2711 OF 2712 sescssseserenerertestees um ze 18 Placing the 2711 or 2712 leese Setting the GPIB Device Address Seet The Power on SRQ scceccccssscscessseccesscesonssneecasaeersnsereaee Setting the Message Termlnatot ENEE want Setting the TALK ONLY Option secsseseeerers IE EATA Configuring the Device Driver EEN DEN E Installing the Device Driver ee D Configuring the Optional Printer or Plotter ee 1 Communicating with the 2711 and ET Ee Preparing the Softwar ees A GPIB Instrument Control Program ns eesesesencees 1 15 RS 232 OPERATION c cescssscscccesscecsceesscessansseseeeensneenerevsees 1 19 OPERATION OVER THE RS 232 INTERFACE 2sseeeseeeesees 1 20 System Controller ee Seege Ed oo Software Device Drivet csccccsscsccssreesssseessssesnencenereneee 1722 2711 and 2712 Equipped With the RS 232 Option E Interconnecting Cabla nna a mee Application Software ee SeEbEbe ee Dee Printer or Plotter Optional GENEE SETTING UP FOR RS 232 OPERATION csssscsessessssresssersnseee 1 23 oom OPERATORS SAFETY SUMMARY The general safety information in this part of the manual is for operating personnel Spacific warnings and cau
213. the D register is enabled MARKer ON Turns on primary marker MARKer SINgle Turns on primary marker MARKer DElta Turns on both markers MARKer OFF furn off all markers MARKer s Arguments Nona This simple query returns the on off status of the markers MARker MARKER SINGLE MARKER DELTA MARKER OFF MEMory 4 38 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 programs and other data stored in the spectrum analyzer s memory Values are always multiples of 16 Sle MEMory MEMORY 16464 3296 for example D FE SS 2711 amp 2 412 Programmer Manual ee SS MEXchg Arguments None This is a command that requires no argument It interchanges the primary stationary and secondary moveable markers If delta marker mode is not active the command generates an SRQ and event code 825 MEXchg MFReq lt arg gt Arguments number in the range 10 MHz to 1 8 GHz This single argument command sets the frequency of the primary marker Hertz are assumed unless units are appended The over all range is 10 MHz to 1 8 GHz but the value specitied must be within the current spectrum analyzer on screen frequency span or an SRQ and event code are generated This command i
214. then unnecessary to Curves User Antenna Normalizations explicitly transmit the FILE header or the lt filename gt when Definabie Tables restoring the file to the spectrum analyzer Read the disk file Programs into a string variable called FILEDATS as an example The string d variable will be of exactly the form needed to send the file to the _nSETOO UDPOO spectrum analyzer as in this example FILE lt filenane gt lt data block gt G Simply transmit FILEDAT to the spectrum analyzer EE 2711 amp 2712 Programmer Manual Sc Ee Table 4 3 Miscellaneous Files Description ART SL ROR EE EH i 12 88 Version SEARCH Signal search configuration SETUP Instrument configuration SCENT Centronics configuration GPIB _ GPIB configuration PLOT Plotter configuration Spo Real time clock confi uration Several other files of little use to the average user may be present but should not be altered These are listed in Table 4 3 Other files of a temporary nature may be created by the spactrum analyzer for internal purposes These files should not be altered if HDR was OFF when the file was returned it is then necessary to precede the disk file with FILE In this case transmit the following message FILE FILEDATS See Section 6 Programming for programming examples FILE or FILE lt arg gt Arguments None lt filename gt This is a simple query that returns a f
215. thmetic feature to the top or center of the display Porset CENter POrset TOP POFset Arguments None This simple query returns information indicating whether the result of the 8 C MINUS A function Is offset to the center or top of the spectrum analyzer display POF set POFSET CENTER POFSET TOP PRDouts Arguments None This simple query returns a list of the specirum analyzer s on screen readouts There are up to 14 arguments depending on the status and mode of operation These are the possible arguments e Title e Center or start frequency e Reference level e Span division e Resolution bandwidth Attenuation or marker delta frequency normalized noise catrier to noise occupied bandwidth requency count Video filter or marker delta amplitude noise bandwidth dB down for bandwidth mode 4 51 AE SE 2711 amp 2712 Programmer Manual oe oe Ld Vertical scale Video line TV channel number average counvD line Single sweep mode arm ER Tracking generator amplitude or amplitude offset CALIBRATOR or tracking generator frequency offset UNCAL or FREQ COR OFF e Real time clock The arguments are enclosed in quotation marks and separated by commas LL The response ends in a semicolon If an argument is missing a null string is returned in principal each argument can be up to 32 characters long the string length is dimensioned for a maximum of 14 X 32 448 characters but this length is nev
216. tion This function indicates to the instrument that its internal device dependent neath functions are to respond to information input from the front panel Local or to corresponding programming information from the GPIB Remote Only the system controller is permitted to assert the REN Remote Enable line whether or not it is the controller in charge at the time When the system controller asserts the REN line an instrument on the GPIB goes to a remote mode when it is addressed as a listener with its listen address An instrument remains in a ramote mode until the REN line is released high or an optional front panel switch on the instrument is activated to request the local mode or a GTL Go To Local command is received while the instrument is enabled as a listener The controller can also disable the instrument s front panel return to local switch es by sending a LLO Local Lockout command The LLO command must be preceded or followed by a listen address MLA to cause the instrument to go to a remote mode with front panel lockout The UNL Unlisten command ee does not return an instrument to the local mode When the REN line goes false it must be recognized by ail instruments on the bus and they must go to the local mode within 100 us If data bytes are still being placed on the bus when REN goes false the system program should insure that the data bytes are sent and received with the knowledge that the system is in
217. tion contains a collection of subroutines that illustrate simple approaches to transferring various types of data between the system controller and the spectrum analyzer You may wish to incorporate them into your own software or modify them so they ara more appropriate to your needs The header statements in Example 6 1 can be placed at the beginning of a program and b used as a basis for the subroutines in this section if you modify the subroutines or add new ones the statements may no longer be adequate NOTE The header statements in Example 6 1 and the sample subroutines in this section do not make provisions for error trapping and event reporting See Section 5 Status Reporting and the demonstration program at the end of this section for error and event reporting routines Example 6 1 GPIB Program Header Statements REM INCLUDE QBDECL4 BAS COMMON SHARED BD BDNAMES RD WRT RD SPACES 5000 BDNAMES TER B n CALL IBFIND BDNAME BD Curve Transfers Curves waveforms transferred from the spectrum analyzer to the controller are important for data analysis archiving and reporting purposes Curves transferred to the spectrum analyzer can be used for comparison or to establish references The curve command transfers a block of data from the controller to the spectrum analyzer and the curve query returns a block of data from the spectrum analyzer to the controller The data block represents the 512
218. tions Section 6 Programming includes an example of an interactive control program for the 2711 and 2712 spectrum analyzers This program uses the RS 232 interface and a Personal Computer PC controller If additional RS 232 communications information is needed refer to the documents listed at the end of this appendix INTRODUCTION TO RS 232 COMMUNICATIONS As with GPIB communications RS 232 communications follow a set of electrical mechanical and protoco standards The current standard is called EIA Std RS 232 C Many different types of devices are designed to communicate according to specifications contained in standards EIA Std RS 232 C The RS 232 standard is very flexible allowing for many possible implementations The RS 232 Interface is NOT a bus GPIB is a bus therefore only one device can be connected at atime RS 232 uses an asynchronous serial data flow instead of 8 bit parallel with byte by byte handshaking AS 232 does not support device addresses or serial polling Both devices on an RS 232 interface the DCE controller and the DTE terminal must be configured the same way for communications to occur successfully To meet this requirement communications parameters for the controller and terminal must be set independently fee l
219. tions may also be found throughout the manual where they apply TERMS IN THIS MANUAL This SGAUTION 2 symbol identities conditions or practices that could result in damage to the equipment or other property WARNING ae 8 This symbol identifies conditions or practices that could result in personal injury or loss of life TERMS MARKED ON EQUIPMENT CAUTION indicates a personal injury hazard not immediately accessible as one reads the markings or hazard to property including the equipment itself DANGER indicates a personal injury hazard immediately accessible as one reads the marking A means Caution refer to the manual for additional information AC POWER SOURCE DC To prevent damage to the Spectrum Analyzer operate it only from appropriate AC mains sources Damage to the instrument can occur if the 50 60 Hertz AC power source applies more than 250 VAC rms between conductors or between either conductor and ground See Section 2 Specifications in the 2711 Spectrum Analyzer User manual or the 2712 Spectrum Analyzer User manual for additional information POWER SOURCE The 2711 and 2712 Spectrum Analyzers can be powered from the optional mode 2704 2705 DC to AC Inverter and external DC battery pack These spectrum analyzers will run for about one hour on a fully charged 2705 Battery Pack and for extended periods of time on alternate DC sources See the 2704 DC to AC Inverter and 2705 Battery Pack ins
220. truction manual for further information PRODUCT GROUNDING vi To prevent potentially hazardous voltages from existing on the exposed metal parts of the 2711 or 2712 do not disconnect the spectrum analyzer s protective ground The 2711 and 2712 Spectrum Analyzers are earthed by the protective grounding lead of their AC power cord Upon loss of the protective ground connection all accessible conductive parts of the spectrurn analyzer can render an electric shock EE E 2711 amp 2712 Programmer Manual INPUT POWER AND VOLTAGE LIMITATIONS The safe maximum total RF input power for the Spectrum Analyzer is 20 dBm 67 dBmV Dages Total input power above the rated maximum can cause damage to the Instrument and voids the factory warranty USE THE PROPER FUSE For continued fire protection observe the fuse specifications located on the rear panel of the 2711 and 2712 Spectrum Analyzers GENERAL PRECAUTIONS ot WARNING Using the 2711 and 2712 Spectrum Analyzers in wet damp conditions or inclement weather may result in electric shock or damage to the instrument The 2711 and 2712 Spectrum Analyzers may be operated in any position Always allow at least 2 inches 5 1 cm of clearance adjacent to the ventilation holes at the sides bottom and back of the spectrum analyzer case The spectrum analyzer is intended for portable operation and can be used outdoors in fair weather The 2711 and 2712 Spectrum Anal
221. ts per byte STOP 1 number of stop bits va EOL CRLF carriage return line feed terminator H DEE SE 2711 amp 2712 Programmer Manual SE FLOW CONTROL NONE no handshaking k ECHO OFF only needed for terminal emulation 1 VERBOSE ON responds for each communication DK KKK IK RK KK RK KK IKK kk kkk kk REI KER IKE kk kk kk k If the 2712 has not been configured to agree with the above parameters the program displays 1 an error message and forces the user to change va the 2712 Program will not execute otherwise LK KKK RIK ERIK I KR IR RK IK II IK RIK IK RIKI KERR ek ek e EEK CS 0 suppress checking CLEAR TO SEND line va DS 0 suppress checking DATA SET READY line RB 2048 size in bytes of receive buffer vn TB 2048 size in bytes of transmit buffer LK RIK I IKI KIRK KKK IK KEKE IKKE KEIR RRR EKER KEKE SELECT DEVICE buffer N initialize these two indicators read error 0 t OPEN com1 9600 n 8 1 CS D5 rb 2048 tb 2048 FOR RANDOM AS 1 clear RS232 buffers and reset STATUS reporting to ensure no messages pending en vn ve gee eee LEE ee ESS SS SS SSS EE je status INP amp H3FB COM1 line control register le status lc status OR 64 set break bit to on OUT amp H3FB lc status send back modified register CALL PAUSE 1 twait one second b le status INP amp 4H3FB get COM1 line control reg je status
222. turn results normally displayed on screen 1 Only available with 2712 Option 12 Quasi Peak Detector Header Function AQP Turn auto quasi peak mode on and off QPFilt Select quasi peak detector band for manual mode BWMode Turn bandwidth mode on and off BWMode Is bandwidth BW mode on or off BWNum Set the number of dB down for BW mode BWNum What is the dB down setting in BW mode BWResult What is the BW at the specified dB down CNBw Set noise BW for carrier to noise CN mode CNBw What is the noise BW in C N mode CNMode Turn carrier to noise mode on and off CNMode Is carrier to noise mode on or off CNResult What is the C N ratio DSRe Set the detection mode DSRc What is the detection mode EMC Set EMC mode on or oft EMC Is EMC mode on or off NNBw Set the noise BW for normalized noise mode NNBw What is the noise BW in normalized noise mode NNMode Turn normalized noise mode on and off NNMode s normalized noise mode on or off NNResult What is the normalized noise in the specified BW OBWMode Set occupied bandwidth mode to on off or idle OBWNode Is the occupied bandwidth mode on off or idle OBWPent Set percent 1 to 99 occupied bandwidth OBWPcnt Return the current occupied bandwidth percent OBWResult Return the results Hz of the most recent occupied bandwidth measurement SSBegin Set the beginning signal search frequency SSBegin What is the beginning signal search frequency SSEnd Set t
223. type of error you may take corrective action proceed without doing anything if the program continues to run and yields valid results or end the Program gracefully This subroutine can be calted following each call to a GPIB function to determine the type of error and to end the pragram gracefully GPIB ERR IF IBSTA lt 32768 THEN RETURN PRINT GPIB ERROR HAS OCCURRED PRINT GPIB ERROR CODE IS TBERR END RETURN Instrument related Errors A third type of error involves those directly related to the spectrum analyzer or its interface with the bus Any time the spectrum analyzer detects an abnormal condition it issues a service request SRQ if Ros is set to on The SRQ causes the GPIB board to generate a light pen interrupt You can automatically detect and decode abnormal events by branching to an interrupt handler whenever the interrupt occurs To do this add these lines to your program ON PEN GOSUB ABNORM EVE PEN ON AENORM EVE CALL SERIAL POLL CALL EVENT FIND RETURN Table 6 2 GPIB System Software Callable Subroutines Subroutine Description DEBLK CUR D COURS Convert first cnT elements of array CURS CNT 8 NUMBYT from binary block to 2 byte integer format in same array and return the number of bytes converted IBF IND BD BDNAMES Open device indicated by BDNAMES and return unit descriptor BDs IBRD BD RD Read data from sDs to str
224. um analyzer s on screan readouts REDout REDOUT ON REDOOT OFF REFIvI lt arg gt Arguments pic INC ref level in the range 70 to 20 dBm This single argument command increases decreases or sets the reference level H inc or DEC is the argument the command increases or decreases the reference level by 1 dB or 10 dB depending on the FINe command or the local 1dB 10dB setting When a numeric argument is used it must be within the range of 70 to 20 dBm or equivalent in alternate units of DBM DBMV DBV DBUV DBUW or DBUVM 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 enabled if LIN mode is active the scale factor will be computed All values are interpreted according to the current reference level offset and impedance correction REFIiv INC REFlv1 DEC REFlv1 10 DBW for example REFIvI Arguments None This simple query returns the current reference level in the currently selected reference level units REF1V1 REFLVL 35 0 for example RESbw lt arg gt l Arguments INc DEC bandwidth of resolution bandwidth filter This single argument command increases decreases or selects the resolution bandwidth ff INC or pec is the argument the command increases or decreases the resolution bandwidth to the
225. umes that a data byte sent with EOI asserted is the last data byte in the compiete message When the instrument controller is talking it may assert the EOI signal line as the last data byte is transferred The EO tine is also asserted when the ATN line is true if the controller conducts a parallel polling sequence on the bus The EO line is not used for a serial polling sequence INTERFACE FUNCTIONS AND MESSAGES Tha ten major interface functions listed in Table A 1 provide a variety of capabilities and options for an instrumentation system These functions may be implemented in or for any particular instrument with instrument hardware or with a programming routine software Only those functions necessary for an instrument s purpose must be implemented by the instrument s designer An instrument will seldom have all ten interface functions For example an instrument generally does not need to implement the Parallel Poli 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 Figure A 3 are discussed below All interface control messages discussed are sent and received over the GPIB when the ATN line is asserted low l A 15 RL Remote Local Function T TE A 16 The RL function provides an instrument with the capability to select between two sources of input informa
226. used to create an interactive menu on the spectrum analyzer s display screen SET What are the current spectrum analyzer settings SGErr Enable disable SRQ when marker cannot find a signal SGErr ts marker cannot tind signal SRQ enabled or disabled STByte Return GPIB serial poll status byte WAIt Command the spectrum analyzer to wait for the end of swee These commands and queries are independent of any spectrum analyzer menu or function block They represent functions that effect the interaction of the spectrum analyzer and the GPIB controller or the RS 232 interface 3 25 SS Section 4 Command Query Replace this page with the tab divider of the same name fee SECTION 4 COMMAND AND QUERY DEFINITIONS This section contains an alphabetical listing of all instrument specific commands and queries The list defines each command or query In addition it contains all the information needed to send messages to the spectrum analyzer or to interpret the responses from the spectrum analyzer TYPOGRAPHICAL CONVENTIONS Each spectrum analyzer command is discussed in the following format COMmand lt arg gt if no argument is needed lt arg gt is omitted Arguments Argument 1 argument 2 If no argument is required None is listed Upper case letters are required when entering data Lower case letters may be supplied if desired Letters other than those shown will not be accepted by the spectrum analy
227. utine for RS232 branched from R5232 CALLS subprogram WK LT RK KR KI A KI IK KK IKK IK IK AAI EE KTR E dek kee KEE RHR EK UE READ BUFFER urn automatic branch off COM 1 OFF 6 35 6 36 initialize string to save response from 2712 ras m s Ei Tset time limit for reading response from 2712 binary waveform transfer may take longer tten seconds will be enough for others normalize query takes longer to respond IF INSTR wrt NORM THEN hold i 40 ELSEIF func 5 THEN hold i 15 ELSE hold i 10 END IF D initialize counter and try to read for time allotted to make sure controller is just not too fast for the 2712 i TIMER DO WHILE TIMER lt i hold i GOSUB READ INPUT IF end of read Y THEN i 0 Ne END IF LOOP set flag to avoid possible endless loop in RS232 calls end of read S yY RETURN SSS SS initialize flag to indicate that read something buffers N U read entire contents of buffer accumulate response and set buffer flag on so know have read something DO WHILE NOT EOF 1 a INPUT LOC 1 1 SS rd rd a buffer y LOOP 2714 amp 2712 Programmer Manual d GE EK KK TI a kk kk RIKER K KK KEKE AIRE KERR KKK KEKE K KK EEK EEE Ex va following code segment distinguishes between a binary waveform transfer and any other response x from the 2712 Binary transfers can contain
228. waep SRQ is nor mally generated at the end of each spectrum analyzer sweep However intermediate end of sweep SRQs are suppressed in the case of normalization User Defined Programs plots signal searches and ensemble averages until the process is com plete A single SRQ is then issued indicating end of process For instance 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 FOS ON BOS OFF 4 23 EOS Arguments None generator EOS ROS ON HOS OFF ERAse lt arg gt Arguments Numerals from 2 to 39 except 9 19 and 29 This single argument command specifies a stored settings register to be erased Registers 2 to 39 may be specified except for registers 9 19 and 29 which are invalid register numbers If the settings are protected locally or because PROTSET Is ON only the waveforms associated with the indicated settings are erased and an SRQ and event 839 are generated If register 9 19 or 29 is specified an SP and Event 701 are generated FRAse 2 FRAse 24 for example ERr Arguments None This simple query returns an integer event code ERr is equivalent to EvEnt and is preserved in the spectrum analyzer for consistency with the command sets of other instruments ERr ERR 878 for exanple EVEnt Arguments None This simple query
229. ware reserved variables REM SINCLUDE qbdecl4 bas D tdeclare common global variables COMMON SHARED bdt BDNAMES RDS wrt COMMON SHARED event code NUMBYT U dimension max size of returned data string RDS SPACES 5000 F dimension an integer array for packed integer CURve response DIM SHARED CUR amp 512 Tobtain bus device unit descriptor BD BDNAMES must match name established for the 2712 with the IBCONF program BDNAMES TEK_SA CALL IBFIND BDNAMES DOS r establish link to abnormal event handler enable interrupt line ON PEN GOSUB ABNORM EVE PEN ON N D enables SRQ generation in case of abnormal event CALL ibwrt d RQS ON trap DOS errors ON ERROR GOTO ERR TRAP 6 2 SE EE 4 6 22 generate the menu MENU CLS Nee 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 D chk keyboard for keypress decode and branch to correct subroutine KYBD CHK Nee INS INKEYS IF INS GOTO KYBD CHK IF LEN INS 1 THEN BEEP GOTO KYBD CHK IN KEY ASC MID INS LEN IN 1 tdecoding complete SELECT CASE IN KEY branch to subroutine CASE 59 F pressed GOSUB SEND RCV GOTO MENU CASE 60 F2
230. written by the next spectrum analyzer sweep Whenever a curve is generated the WRT MID line in the PUT CURVE subroutine must be replaced by a statement such as this one WRES CURve INDS BCS DATASICKS where INDS Null for ASCII H for hex for binary BCS Null for ASCII 0201 for hex CHA 2 CHR 1 for binary Byte Count DATAS 512 data points appropriately encoded representing the curve cx Null for ASCII HEX chksum for hex EE 0 HEX chksum if chksum lt 16 CHR chksum for binary Checksum SE SE sas SE EE E Crt 2711 amp 2712 Programmer Manual Bees Exampte 6 3 Subroutines to Return or Transmit Data Files Example 6 2 Subroutines to Return or Transmit Curve Data required That is a BSETO3 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 6 10 GET FILE GET CURVE ESTABLISH SOURCE REGISTER AND ENCODING ENSURE ENTER THE 2712 FILENAME FOR THE FILE TO UPLOAD ee 1 HEADER ts TURNED ON SEE TABLE 4 1 FOR A LIST OF THE NAMES WRTS WFMPRE WFID D ENCDG ASCII HDR ON FILE2712 lt 2712 FILENAME gt CALL IBWRT BD WRT 1TURN ON HEADER REQUEST FILE RESERVE SPACE FOR THE DATA WRIS HDR ONsFILE FILE2712 RD SPACES 2056 CALL IBWRT BD WRT RETURN THE CURVE DATA READ FILE INTO STRING VARIABLE RD WRTS
231. y the carrier to noise C N feature to perform a C N Arguments ON OFF measurement i This single argument command enables and disables the CNEW frequency counter in signal track mode The command sets NEw 4 046 for example counter resolution to 1 Hz when the counter is enabled CNItrak CN Oft track F CNTtrak lt arg gt 2711 requires Option 02 Frequency Counter an 4 11 4 12 a 2711 amp 2742 Programmer Manual CNTtrak 2711 requires Option 02 Frequency Counter oo Arguments None This is a simple query whose response indicates whether the frequency counter is on or off in signal track mods CNitrak CNITRAK OFF CNTTRAK ON COUnt 2711 requires Option 02 Frequency Counter Arguments None This simple query returns the result in Hertz of the last frequency count performed as a result of the cuBas command count COUNT 55 250646 for example CREs lt arg gt 2711 requires Option 02 Frequency Counter e Arguments 1 Hz 1 kHz This single argument command designates the frequency counter resolution CREs 1 Hz CREs 1 kHz CRES 2711 requires Option 02 Frequency Counter Arguments None This simple query returns the currently selected counter resolution Values of 1 Hz and 1 kHz are possible CREs CRES 1 E10 CRES 1 E 3 CURve lt arg gt Arguments Complex block of data described below This single argument command enables a block of curve data to be sent to one of the spectrum
232. yte register which is updated as conditions In the spectrum analyzer change The spectrum analyzer responds to a serial poll by placing the status byte on the data bus see Appendix A to be read by the controller Only the most recent 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 spectrum analyzer System status bytes have a fixed definition for all Tektronix devices and identify most events common to any IEEE 488 system Bit 8 is always set 1 for device dependent status bytes and is always reset 0 for system status bytes Tables 5 1 through 5 4 show general and specific encodings of device dependent and system status bytes EI SS RT 2711 amp 2712 Programmer Manual Se EE Ae rO EEA EE 2711 amp 2712 Programmer Manual SANE 5 4 L Btysts Lo Table 5 1 General System Status Bytes Status Byte Bits fa 7 e s 4 3 211 fRieEt pisits ists 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 2 General Device dependent Status Bytes Status Byte Bits Bit Value Where R SRQ pending 1 pending 0 not pendin
233. yzers can be damaged by Z incorrect AC supply voltages RF inputs that exceed the maximum ratings operation in very high temperatures or without adequate ventitation immersion in liquids and physical abuse vii viij 2711 amp 2712 Programmer Manual Ss To avoid explosion do not operate this product in explosive atmospheres unless it has been specifically certified for such operation To avoid personal injury do not remove covers or panels or Zeen Deele spectrum analyzer without the protective covers Instated To avoid the possibility of overheating do not operate the 2711 or 2712 Spectrum Analyzer in a carrying case personnel Ze Section 1 Introduction Replace this page with the tab divider of the same name Ae Gs STEE eg SE Les EE SE SE GE S SE 2711 amp 2712 Programmer Man ual SE SECTION 1 INTRODUCTION TO PROGRAMMING The Tektronix 2711 and 2712 Spectrum Analyzers allow remote control of their functions when equipped with a communications port The following instrument configurations provide an IEEE Standard 488 General Purpose Interface Bus GPIB or an RS 232 data communications interface 2711 Option 03 GPIB port e 2711 Option 08 AS 232 port 2712 Standard GPIB port 2712 Option 08 RS 232 port With a desk top computer and an appropriate control program you can configure front panel settings except those intended for local use only such as INTENSITY and
234. zer 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 off all messages are shown as in the following example amand ON Chrom OFF Where there is a targe range of arguments such as numeric values typical examples are shown as in this example OMnand 10 5 kHz for example Typical examples are always followed by the phrase for example 4 2 Each query is discussed in the following format QUEry lt arg gt In most cases no argument is needed and lt arg gt is omitted Arguments Argument 1 argument 2 If no argument is required None is listed Following each query is a general discussion of its arguments specific precautions and other important information A detailed description of the response to the query is also provided The query is shown along with its arguments The spectrum analyzer 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 show
235. zer key which alters its measurement status may be pressed to return the spectrum analyzer to focal mode For example the MENU keys do not change the status but items selected from a menu may change the status 5 Press VID FLTR 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 analyzer screen The words TALKER or LISTENER will also appear momentarily They are displayed when the spectrum analyzer enters the indicated mode but because of timing considerations they do not always appear for short commands queries and responses You should see a response similar to the following one on the controller s screen SEH 2711 amp 2712 Programmer Manual Fe ee ee 2711 amp 2712 Programmer Manual Cae ee oo PRINT PRINT THE REPLY IS PRINT PRINT MID RD 1 IBCNT The reply will look like this one ID TEK 2711 or 2712 V81 1 VERSION 10 11 91 FIRM MORE WARE VIDEO MONTTIOR GPIB COUNTER NVM 12 88 PRINT PRINT The actual response depends on the options in your INPUT SEND MORE N nr Y instrument IF Y Y THEN GOTO SEND RCV END 8 You will then be asked SEND MORE Y N Enter Y

Download Pdf Manuals

image

Related Search

Related Contents

Descriptif technique    Bosch Appliances 5000 Security Camera User Manual  Monitor Fitbit One Manual de producto  Spire DustGuard 80  information Service    Manuale dell l`utente per Server Ultra Enterprise 450  Whirlpool RC8300XKH User's Manual  Gigaset SL400/SL400A – seu acessório de alta qualidade  

Copyright © All rights reserved.
Failed to retrieve file