Home
HP Hunting Equipment 54720 User's Manual
Contents
1. TVOLt 19 72 19 78 VAMPlitude 19 80 VAVerage 19 82 VBASe 19 84 VLOWer 19 86 VMAX 19 87 VMiDdle 19 89 VMIN 19 90 VPP 19 92 VRMS 19 94 VTIMe 19 96 VTOP 19 97 VUPPer 19 99 MEASure RESults and statistics 19 71 Measurement Error 19 3 Measurement Not Found in Limit Test 27 12 Measurement Setup 19 3 measurement source and SOURce 19 69 MEASurement READout 18 7 measurements effect of connected dots 6 4 pixel memory 6 4 repeatability 6 4 waveform memories 6 4 MEDia 17 14 MEDia and SSCReen 28 50 MEDia and SSUmmary 28 56 MEDian in MEASure HISTogram command 19 35 to 19 36 Memories and VIEW 24 28 MENU 9 23 MERGe 9 24 20 4 Message MSG Status Bit 4 4 Message Available MAV Status Bit 4 4 Message Available Bit and OPC 8 12 Message Communcations and System Functions 3 2 message exchange protocols of IEEE 488 2 3 3 Message Queue 4 17 message termination with hardcopy 3 4 METric HARDeopy LENGth 17 13 MIN 16 24 Mnemonic Truncation 6 5 MNFound in Limit TESt command 27 12 to 27 13 MODE 11 11 18 8 MODE in HISTogram command 29 7 MODe in TRiGger command 22 31 to 22 32 model number reading 8 13 MODel 9 25 monitoring events 4 2 MSBFirst and BYTeorder 24 9 MSG bit 8 22 8 24 MSPan 26 7 N New Line 1 12 New Line NL as terminator 5 13 NL New Line 1 12 Noise REJect and hysteresis 22 29 NORMal CHARDcopy BACKground 17 7 Normal Ac
2. If you are using the Service Request to interrupt a program or controller operation when the trigger bit is set then you must clear the event register after each time it has been set HP 54710 and HP 54720 4 15 Programmer s Reference Status Reporting Error Queue Error Queue As errors are detected they are placed in an error queue This queue is first in first out If the error queue overflows the last error in the queue is replaced with error 350 Queue overflow Any time the queue overflows the least recent errors remain in the queue and the most recent error is discarded The length of the oscilloscope s error queue is 30 29 positions for the error messages and 1 position for the Queue overflow message The error queue is read with the SYSTEM ERROR query Executing this query reads and removes the oldest error from the head of the queue which opens a position at the tail of the queue for a new error When all the errors have been read from the queue subsequent error queries return 0 No error The error queue is cleared when any of the following items occur Whenthe instrument is powered up Whenthe instrument receives the CLS common command When the last item is read from the error queue For more information on reading the error queue refer to the SYSTEM ERROR query in the System Commands chapter For a complete list of error messages refer to the chapter Error Messages 4 16 HP
3. Modified Variables B m pa n po oe n po lf Orparame 256 IF BIT B 7 THEN B BINIOR Orparam B RETURN B FNEND t SUB Ertrap i t Description Ertrap is called by an error interupt It checks for i error 54 which will occur when there is a duplicate i file name The existing file will be purged i Parameters none t IF ERRN 54 THEN PURGE WAVESAMPLE OFF ERROR SUBEND H SUB V convert INTEGER Wav REAL Pre Vdata 1 1 Description V convert takes the data from the scope and converts it t into voltage values using the equation from the manual t Parameters Wav array of data values Enters as q levels i leaves as voltages HP 54710 and HP 54720 79 Programmer s Reference Example Programs Digitize Example Program 2460 Pre the preamble for the data 2470 Vdata array of vertical values volts 2480 1 2490 1 Internal yref pre 10 level associated with y origin 2500 1 yinc pre 8 duration between y axis levela 2510 1 yorg pre 9 y axis value at level zero 2511 1 C indexing variable 2520 1 2530 1 Modified variables Vdata 2540 1 2550 Yref Pre 10 2560 Yine Pre 8 2570 Yorg Pre 3 2580 FOR C 1 TO Pre 3 2590 Vdata C Wav C Yref Yinc Yorg 2600 NEXT C 2610 SUBEND 2620 1 2630 SUB H convert Hdata Pre 2640 1 2650 1 Description EH convert creates horizontal axis values using the 2660 equation from the manual 2670 t 2680
4. Programmer s Reference Publication Number 54710 97002 Fifth Edition October 1993 This reference applies directly to firmware revision code 3 XX For Safety information Warranties and Regulatory information see the pages behind the index Copyright Hewlett Packard Company1992 1993 Ali Rights Reserved HP 54710 and HP 54720 Oscilloscopes Common Commands CLS ESE ESR 2L RN OPC OPT xRCIL RST SAY SRE STB TRG TST mW At The HP 54710 and HP 54720 Oscilloscope Programming Command Set raat Se AER AUToscate BLANK CDiSptay DiGiize ERASE HEEN HER LER LTEE LTER MENU MtRGe MODet MTEE MTER OPEE OPER PRINI RECatl RUN SERial SINGIe STOP STORE TER UEE UER VIEW SYStem DATE DSP ERRor HEADer KEY LONGform SE Tup TIME ACQurre Bwlitii BEST COMPiete FRAMe COUNI OUTPut INTerpoiote PLUGIN MODE PROBe POINIS SKEW SRATe STATus TYPE CALbrate CHANDE DISK DISPlay BWLimst DELete ASSign DiSPIay OfRectory CGRade INP at FORMat COLumn OEF Set LOAD DATA DUTPut STORe DcoLar PROBe DwAVeform PRDTection FORMat RANGe GRA Ficuie SCALe iNVerse SENSitivity LINE UNIT e MASK PERSistence ROW SCOLor SOURCE STRing TEXT Se ee ee FEY DiSPlay FREQuency MAGNily MSPan OFFSet RANGe RE Solution SOURce SPAN WiNDOw FUNChon N ADD DIFF OSPlay BN ige FFT FFTMagnitude HORizontat Niegrate Nyer MAGNify MAXIMU
5. The instrument and controller communicate using lt program message gt s and lt response message gt s These messages serve as the containers into which sets of program commands or instrument responses are placed lt program message s are sent by the controller to the instrument and response message s are sent from the instrument to the controller in response to a query message A query message is defined as being a program message that contains one or more queries The instrument will only talk when it has received a valid query message and therefore has something to HP 54710 and HP 54720 3 3 Programmer s Reference Message Communication and System Functions Protocols say The controller should only attempt to read a response after sending a complete query message but before sending another program message The basic rule to remember is that the instrument will only talk when prompted to and it then expects to talk before being told to do something else Protocol Operation When the instrument is turned on the input buffer and output queue are cleared and the parser is reset to the root level of the command tree The instrument and the controller communicate by exchanging complete program message s and response message s This means that the controller should always terminate a program message before attempting to read a response The instrument will terminate response message s except during a hard
6. 1 15 digitize aborting 2 8 DIGITIZE seting up for execution 11 2 DIRectory 14 4 disabling serial poll 2 8 discrete derivative of functions 16 9 DISK HARDcopy DESTination 17 8 Disk Commands 14 2 DELete 14 4 DIRectory 14 4 FORmat 14 5 LOAD 14 5 STORe 14 6 disk reset conditions 8 19 DISPlay 13 7 16 10 20 3 25 4 26 4 Display Commands 15 2 ASSign 15 7 COLumn 15 8 15 11 DATA 15 12 DCOLor 15 14 DWAVeform 15 15 FORmat 15 16 GRATicule 15 17 INVerse 15 18 LINE 15 19 MASK 15 20 PERSistence 15 22 ROW 15 23 SCOLor 15 24 SOURce 15 28 STRing 15 29 TEXT 15 30 Display DISk and SSCReen 27 18 28 45 display persistence 15 22 Display PRinter and SSCReen 27 18 28 45 display reset conditions 8 17 DISplay LINE and masking 15 21 DISplay STRing and masking 15 21 Divide 16 11 dividing functions 16 1 D3500 HARDcopy DEVice 17 9 DJ550 CHARDcopy DEVice 17 9 DMAGnitude in MEASure FFT command 19 25 DOS file compatibilty 14 2 double wide plug in sarnple rate 11 14 Driver Electronics code and capability 2 4 DSP display 10 5 to 10 6 DTIMe in TRIGger command 22 15 ARM 22 16 to 22 17 DELay 22 18 TRiGger 22 19 to 22 20 Duplicate Mnemonics 1 8 duration between data points and XINCrement 24 31 DUTycycile 19 20 to 19 21 DWAVeform 15 15 E EDGe in TRIGger command 22 21 SLOPe 22 22 SOURce 22 23 EDLY and DEVents 22 8 EEPROM and calibratio
7. 1410 1420 1430 1440 1450 1460 1470 1480 1490 1500 1510 1520 1530 1540 1550 1560 1570 1580 1590 1600 1610 i SUB Readme3i PRINT Example Programs Service Request Example Program PRINT Break the program at this time and determine the cause of PRINT the error PRINT PRINT Once you have fixed the cause of the error described by PRINT the error code and message rerun the program by pressing PRINT RUN PAUSE CLEAR SCREEN SUBEND SUB Srq type J The scope has interupted the computer and we have read the 1 i Standard Event Status Register Now the value J that was read by the ESR will be evaluated to determine why the SRQ was generated PRINT ESR SELECT J CASE 32 value is J PRINT 32 gt CME or Command Error CASE 16 PRINT 16 gt EXER or Execution Error CASR 8 PRINT 8 gt DDE or Device Dependent Error CASE 4 PRINT 4 END SELECT SUBEND gt OYE or Query Error 7 30 HP 54710 and HP 54720 Programmer s Reference Example Programs Configuration Example Program Configuration Example Program 10 IRE SAVE CONFIG This is an RMB and IBasic Program 20 30 tit queries the scope to determine the configuration and then 40 iprints it to the crt It assumes that the scope is at HPIB 50 t 60 DIM Mframe 13 S10t 1 4 13 70 OUTPUT 707 SYSTEM BEADER ON 80 OUTPUT 707 SYSTEM LONGFORM ON 90 i 1
8. 19 37 to 19 38 M25 in MEASure HISTogram command 19 39 to 19 40 MSS in MEASure HISTogram command 19 41 to 19 42 MAGNify 16 22 26 6 MAGNify in FUNCtion FFT command 16 12 magnifying the FFT 26 7 MAGNitude in MEASure FFT command 19 26 MAIN and VIEW 24 28 Mainframe Calibration 12 3 Making Measurements 19 4 managing bus issues 2 2 Marker Commands 18 2 18 6 MEASurement READout 18 7 MODE 18 8 TDELta 18 9 TSTArt 18 10 TSTOp 18 12 index VDELta 18 14 VSTArt 18 15 VSTOp 18 17 X Position 18 19 X1Yisource 18 21 X2Position 18 20 X2Y2source 18 22 XDELta 18 23 Y iPosition 18 24 Y2Position 18 25 YDELta 18 26 marker reset conditions 8 17 MASK 15 20 to 15 21 mask parameter 15 20 Mask Test Commands 28 2 Mask Test Event Register 4 14 mask Service Request Enabie Register 8 21 MASK DEFine 28 28 to 28 29 Master Summary Status MSS and STB 8 23 Master Summary Status MSS Status Bit 4 4 math reset conditions 8 19 MAV Message Available 4 4 MAV bit 8 22 8 24 MAXimum 16 23 MEAN in MEASure HISTogram command 19 33 to 19 34 Measure Commands 19 2 DEFine 19 14 DELTatime 19 18 DUTycycle 19 20 FALLtime 19 22 FREQuency 19 28 NWIDth 19 51 OVERshoot 19 53 PERiod 19 55 PREShoot 19 57 PWIDth 19 59 RESults 19 61 RiSetime 19 65 SCRatch 19 67 SENDvalid 19 68 SOURce 19 69 S TATistics 19 71 TMAX 19 74 TMIN 19 76 Index 7 index
9. 1E12 T 1E9 G 1E6 MA 1ES K 1E 3 M 1E 6 u 16 9 N 1E 12 P 1E 15 F 1E 18 A HP 54710 and HP 64720 3 9 Programmer s Reference Message Communication and System Functions Syntax Overview Suffix Unit The suffix units that the instrument will accept are shown in table 3 2 u Table 3 2 suffix unit Suffix Referenced Unit V Volt S Second 3 10 HP 64710 and HP 54720 Programmer s Reference Status Reporting Status Reporting Figure 4 1 is an overview of the oscilloscope s status reporting structure The status reporting structure allows monitoring specified events in the oscilloscope The ability to monitor and report these events allows determination of such things as the status of an operation the availability and reliability of the measured data and more To monitor an event first clear the event then enable the event All of the events are cleared when you initialize the instrument e To generate a service request SRQ interrupt to an external controller enable at least one bit in the Status Byte Register The Status Byte Register the Standard Event Status Register group and the Output Queue are defined as the Standard Status Data Structure Model in IEEE 488 2 1987 IEEE 488 2 defines data structures commands and common bit definitions for status reporting There are also instrument defined structures and bits 4 2 HP 54710 and HP 54720 Programmer s Reference Figure 4 1 Arm Ev
10. EX FARRER e e he he e de de fe e dede ee eee id fece e de ee ee e de e de e e dede e e ded de de e de de e de dee dee This sub program converts a to engineering notation de Ye dede de deo do de ede de E E E e dee dee e dede ide dede dee ee dee de dede dec de de dr d de de d m S SIZE N 1 FOR Cei TO S SELECT N C CASE 999 A C w N C CASE gt 9 998 4 A C N C 1 E 3 Ex C m CASE 9 99 amp 8 7 A C N C 1 E 6 Ex C u CASE 9 99E 10 A C N C 1 E 9 Ex C n CASE 9 99E 13 A C N C 1 E 12 Ex C 7 p CASE 9 99E 16 A C N C 1 E 15 Ex C e f CASE ELSE A C N C END SELECT NEXT C SUBEND i SUB Result state N M LRM he dede ede e de e e eoe e de ede de eoe de deed o e e eoe de e de e fd de e dede e de e ede d f d A 4x l HP 54710 and HP 54720 7 15 Programmer s Reference 2220 2230 2240 2250 2260 2270 2280 2290 2300 2310 2320 2330 2340 2350 2360 2370 2380 2390 2400 2410 2420 2430 2440 2450 2460 2470 2480 2490 2500 2510 2520 2530 2540 2550 2560 2570 2580 2590 2600 2610 2620 2630 2640 2650 2660 Example Programs Measurement Example Program i This sub program interprets the Result State Value i de e dede e ode de oce de e o ee fe e e de de de de dede de dr de dece fed e e Rod e ede e e d e ede e e EEE SELECT N CASE 0 MS Result Correct CASE 1 MS Result Questionable CASE 2 M e Result Less than or Equal to CASE 3 M Result Greater
11. PERiod TEST SLOPe SOURce PREShoot SOURCce TYPE PwiDih STATe VIEW RESults SwEep XOiSplay RiSetine XINCrement SCRaich XORigin SENDvalid XRANge SOURce XREFerence STATistics XUNI S TEDGe YBISpiay TMAX YINCrement TVOLI YORigin VAMPlitude YRANge VAVerage YREF erence VBASe YORigin VLOWer YREFerence VMAX YUNI S VMN VPP VRMS VTIMe vTOP VUPper S4710804 Command Tree continued HP 54710 and HP 54720 6 9 Programmer s Reference i ae ee enee e EPR Example 1 Example 2 Programming Conventions The Command Tree Tree Traversal Examples The OUTPUT statements in the following examples are written using HP BASIC 5 0 on an HP 9000 Series 200 300 controller The quoted string is placed on the bus followed by a carriage return and linefeed CRLF OUTPUT 707 CHANNELI RANGE 0 5 OFFSET 0 In the previous example the colon between CHANNEL and RANGE is necessary because CHANNEL1 RANGE is a compound command The semicolon between the RANGE command and the OFFSET command is required to separate the two functions The OFFSET command does not need CHANNEL preceding it since the CHANNEL1 RANGE command sets the parser to the CHANNEL node in the tree OUTPUT 707 TIMEBASE REFERENCE CENTER POSITION 0 00001 or OUTPUT 707 TIMEBASE REFERENCE CENTER OUTPUT 707 TIMEBASE POSITION 0 00001 In the first line of example 2 the subsystem selector is implied for the POSITION command in the compound command A
12. RUN 9 32 SERial Serial Number 9 33 SINGle 9 34 STOP 9 35 STORe SETup 9 36 STORe WAVEform 9 36 TER Trigger Event Register 9 37 UEE 9 38 UER 9 39 VIEW 9 40 10 System Commands 11 DATE 10 4 DSP 10 5 ERRor 10 7 HEADer 10 10 KEY 10 11 LONGform 10 17 SETup 10 19 TIME 10 21 Acquire Commands BWLimit 11 5 COMPlete 11 6 COMPlete STATe 11 8 COUNt 11 9 INTerpolate 11 10 MODE 11 11 POINts 11 12 SRATe Sample RATe 11 14 Contents 5 12 13 Contents TYPE 11 16 Calibration Commands Mainframe Calibration 12 3 Plug in Calibration 12 4 Normal Accuracy Calibration Level 12 5 Best Accuracy Calibration Level 12 6 Probe Calibration 12 8 Calibration Commands 12 9 BEST CANcel 12 12 BEST CONTinue 12 12 BEST DATA 12 12 BEST STARt 12 18 BEST STATus 12 13 FRAMe CANcel 12 14 FRAMe CONTinue 12 14 FRAMe DATA 12 15 FRAMe DONE 12 15 FRAMe LABel 12 16 FRAMe MEMory 12 16 FRAMe STARt 12 16 FRAMe TIME 12 17 OUTPut 12 18 PLUGin CANcel 12 19 PLUGin CONTinue 12 19 PLUGin DONE 12 19 PLUGin MEMory 12 20 PLUGin STARt 12 20 PLUGin TIME 12 20 SKEW 12 21 STATus 12 22 Channel Commands BWLimit 13 5 DISPlay 13 7 Contents 6 14 15 Contents INPut 13 8 OFFSet 13 10 OUTPut 13 12 PROBe 13 13 PROBe CALibrate 13 15 PROBe INPut 13 16 PROTection CLEar 13 17 PROTection 138 18 RANGe 13 19 SCALe 13 21 SENSitivity 198 22 UNITs 13 23 UNITs ATTenuation 18 24 UNITs OFFSet 13 25 Disk Com
13. in MEASure command 19 72 to 19 78 temperature and best accuracy calibration 12 7 temperature and calibration 12 3 TER Trigger Event Register 9 37 termination of message during hardcopy 3 4 Terminator 1 12 Terminator Program Message 1 12 terminators in syntax 1 4 TEST 28 64 Test TST 8 26 test failure 27 9 27 12 27 15 28 33 to 28 34 TEST in Limit TESt command 27 39 to 27 40 TEXT 15 30 The Command Tree 6 6 to 6 10 THINkjet HARDcopy DEVice 17 9 threshold and DEFine 19 14 to 19 15 THReshold in MEASure FFT command 19 28 TIFF CHARDcopy DEVice 17 9 TIME 10 21 to 10 22 time and date setting 10 2 time base reset conditions 8 15 time base scale and number of points 11 12 time buckets and COMPlete 24 11 time buckets and POINts 24 19 time difference between markers 18 9 time interval and DELay 21 4 time scale and operands 16 3 time scale of functions 16 3 Timebase Commands 21 2 DELay 21 4 POSition 21 6 RANGe 21 7 REFerence 21 8 SCALe 21 9 Index 13 Index VIEW 21 10 truncating numbers 1 11 verical axis full scale 13 19 WINDow DELay 21 11 Truncation Rule 6 5 version of software reading 8 10 WINDow RANGe 21 14 TST Test 8 26 VERSus 16 30 WINDow SOURce 21 15 TST Test 8 26 VERTical 16 31 TIMEbase POSition and DELay 21 5 TSTArt 18 10 to 18 11 vertical axis control 13 2 TIMEBASE REFERENCE and DELay TSTOp 18 12 to 18 13 vertical axis o
14. 1 14 Using the Digitize Command 1 15 Receiving Information from the Instrument 1 17 String Variable Example 1 18 Numeric Variable Example 1 18 Definite Length Block Response Data 1 19 Multiple Queries 1 19 Instrument Status 1 20 Contents 1 Contents 2 Interface Functions HP IB Interface Connector 2 3 HP IB Default Startup Conditions 2 3 Interface Capabilities 2 4 Command and Data Concepts 2 5 Addressing 2 5 Communicating Over the Bus 2 6 Remote Local and Local Lockout 2 7 Bus Commands 2 8 Status Messages 2 8 3 Message Communication and System Functions Protocols 3 3 Syntax Diagrams 3 5 Syntax Overview 3 8 4 Status Reporting Status Reporting Data Structures 4 5 Status Byte Register 4 8 Service Request Enable Register 4 10 Trigger Event Register TRG 4 10 Standard Event Status Register 4 11 Standard Event Status Enable Register 4 12 User Event Register UER 4 13 Local Event Register LCL 4 13 Operation Status Register OPR 4 13 Limit Test Event Register LTER 4 14 Mask Test Event Register 4 14 Histogram Event Register 4 15 Arm Event Register ARM 4 15 Error Queue 4 16 Output Queue 4 17 Message Queue 4 17 Key Queue 4 17 Clearing Registers and Queues 4 17 Contents 2 Contents 5 Programming Syntax HP BASIC Output Statement 5 3 HP BASIC Enter Statement 5 3 Device Address 5 4 Instructions 5 4 Instruction Header 5 5 Queries 5 7 Program Data 5 8 Multiple Subsystems 5 10 Multipl
15. 1 Parameters Hdata Horizontal values 2690 1 Pre the preamble for the data 2700 1 2710 1 Internal xref pre 7 data point associated with the x origin 2720 1 xinc pre 5 duration between x axis data points 2730 1 xorg pre 6 x axis value of first point in record 2740 2750 1 Modified variables BHdata 2760 1 2770 Xref Pre 7 2780 XincePre 5 2790 Xorg Pre 6 2800 FOR C 1 TO Pre 3 2810 Hdata C C 1 Xref XinctXorg 2820 NEXT C 2830 SUBEND 7 10 HP 54710 and HP 54720 Programmers Reference 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 Example Programs Measurement Example Program Measurement Example Program RE SAVE MEAS 7XX Observing True Representation of signal Rev 1 18 Jede de dede dede de dese dede do d dede ded dede de dede dee e dede e dede d e dole de ede dede ede dede fede dede dede TREN ERE EEE peek k Main PrOGLAm kekiitibieee e d REGE ERE ERR pud dede deed dede ede dede dede dede dee dede dede dee deed de dede eode ded dede d d e e GE Readme Initscope 8Scope True rep Scope Measure 8Scope Rt 4g 8Scope Measure Scope Rt_2g9 Scope Measure Scope PRINT The program has completed BEEP 4e dede de de e e de e e de e ee RHEE fe ee e e e e e e e de e e he e e de e ede de e idee dede e e e de de
16. 18 HEEN Histogram Event Enable 9 18 SAV Save 8 20 HER Histogram Event Register 9 19 SAVE 25 4 LER Local Event Register 9 20 LTEE Limit Test Event Enable 9 21 Save SAV 8 20 save recall register 8 14 8 20 Index 11 index saving limit test waveforms 27 37 saving Mask Test waveforms 28 62 SCALe 13 21 21 9 SCALe in HISTogram command 29 9 OFFSet 29 10 to 29 11 RANGe 29 12 to 29 13 SCALe 29 14 to 28 15 TYPE 29 16 SCALe in MEASure HISTogram command 19 48 SCALe DEFault 28 35 SCALe SOURce 28 36 to 28 37 SCALe Xi 28 38 to 28 39 SCALe XDELta 28 40 to 28 41 SCALe Y2 28 43 SCOLor 15 24 to 15 27 SCRatch 19 67 SCReen HARDcopy AREA 17 6 selected device clear SDC 2 8 Selecting Multiple Subsystems 1 12 self test 8 26 Semi colon and multiple functions 5 11 and multiple subsystems 5 10 semi colon usage 1 7 sending compound queries 3 4 Sending Program Messages 5 3 SENDvalid 19 68 SENSitivity 13 22 separator 1 6 separators in syntax 14 Sequential and Overiapped Commands 6 11 SERial SERial number 9 33 serial number reading 8 13 serial poli SPOLL in example 4 9 serial poll disabling 2 8 serial polling of the Status Byte Register 4 9 serial prefix reading 8 10 Service Request code and capability 2 4 Service Request Enable SRE 8 21 to 8 22 Service Request Enable Register SRE 4 10 Service Request Enable Register Bits 8 22 Service Request Enable Re
17. 64710 and HP 54720 Programmer s Reference Status Reporting Output Queue Output Queue The output queue stores the oscilloscope to controller responses that are generated by certain instrument commands and queries The output queue contains one or more bytes This summary bit sets the MAV bit bit 4 in the generates the Message Available summary bit when the output queue a Status Byte Register The output queue may be read with the HP Basic ENTER statement Message Queue The message queue contains the text of the last message written to the advisory line on the screen of the oscilloscope The length of the oscilloscope s message queue is 1 The queue is read with the SYSTEM DSP query Note that messages sent with the SYSTem DSP command do not set the MSG status bit in the Status Byte Register Key Queue The key queue contains the key codes for the last 10 keys pressed on the front panel This queue is first in first out If the key queue overflows the oldest key codes are discarded as additional keys are pressed The key queue is read with the SYSTEM KEY query Clearing Registers and Queues The CLS common command clears all event registers and all queues except the output queue If CLS is sent immediately following a program message terminator the output queue is also cleared HP 54710 and HP 54720 4 17 Programmer s Reference Status Reporting Clearing Registers and Queues Figure 4 3 Status Reporting
18. Path Waveform Preamble Internal Con indexing variable Functions FNBcon converts from signed bytes ASSIGN 8Path TO WAVESAMPLE ENTER G8Path Waveform Preamble FOR Con 1 TO Preamble 3 Waveform Con FNBcon Waveform Con NEXT Con SUBEND HP 54710 and HP 54720 7 7 Programmer s Reference Example Programs Digitize Example Program 1650 i 1660 SUB Graph INTEGER Waveform REAL Preamble 1670 1 1680 1 Description Graph takes the converted data and plots it on screen 1690 1 It uses the Y Display Range to show the data as seen 1700 on screen vertically and X Display Range to show 1710 as seen horizontally pre 14 and 12 respectively 1720 1730 Parameters Waveform array of data values Enters as q levels 1740 3 leaves as voltages 1750 t Preamble the preamble for the data 1760 t 1770 1 Internal Vrange preambie 14 y axis duration of waveform displayed 1780 1 Srange preamble 12 x axis duration of waveform displayed 1790 1 Offset preambie 15 center of screen vertically 1800 1 vmin lower limit vertically 1810 1 vmax upper limit vertically 1820 1 hmin lower limit horizontally preamble 13 1830 1 hmax upper limit horizontally 1840 1 Hdata Horizontal values in proper units 1850 t1 Vdata Vertical values in proper units 1851 I indexing variable 1860 1870 Modified variables Hdata Vdata and I 1880 1890 Subprog
19. SENSItivil y LINE MTER UNITS MASK MENU PERSistence MERGE ROW MODei SCOLar OPEE SOURce OPER STRing PRIN TEXT RECOU RUN SERGI SINGE STOP STORES R e eg ero E TER VEE FFT FUNCtion N HARDcopy HSTogram LTESt Marker UER VIEW DISPlay ADD ADDresa AXIS FAL CURsor FREQuency OFF AREA MODE Limit MEASurement MAGNify DISP ley BACK ground RUN MNFOund MODE MSPan Divide DESTination SCALe RUN TBELta OFF Set FFT OEVice WINDOW SOURCE TSTAri RANGe FFTMagniude FACTors SSCreen TSTOp FE Solution HORizontal FFEed SSUMmary YDEL ta SOURCE iNTegrate FiLEname SwAvVeform VSTAri SPAN Wert LENGIh TEST YSTOG WINDow MAGNIFY ME Dies Ut Mit X Position MAXimum X2P asition MIN XI source MLL Tiply X2Y2source OFF Set XDEL ta ONLY Y Position RANGE Y2Posillon SueTract YDEL ta VERSUS VERTica 470808 6 8 HP 54710 and HP 54720 Programmer s Reference Programming Conventions The Command Tree Figure 6 2 continued MEASure MTESt Timebose TRIGger TRiGger N PMEMary WMEMory N WAVeform DEFine AMASK DELay DEVents Bwiimt ADD DISPlay BANDpass DELTatime COUNt POSition DTiMe PROBe CLEAR SAVe BYTeorder DUTycycie MASK RANGe EDGe OSPiay XOFF set COMPiete FALL time POLYgon REFerence GLITch ERASe XRANge COUN FFT RUMade SCALe HOLDoff MERGe YOFFset COUR ing FREQuency SCALe VEW HYSTeresis YRANge DATA HiSTogram SSCReen WINDOW LEVet FORMat NWiDIh SSUMmary MODE POINIS OVERshaot SwAVetorm PATtern PREambie
20. Syntax 6 Programming Conventions 7 Example Programs Introduction to Programming the HP 54710 HP 54720 Oscilloscopes Introduction to Programming Introduction to Programming This chapter introduces the basics for remote programming of an oscilloscope The programming instructions in this manual conform to the IEEE 488 2 Standard Digital Interface for Programmable Instrumentation The programming instructions provide the means of remote control There are basic operations that can be done with a controller and an oscilloscope Set up the instrument Make measurements Get data waveform measurements configuration from oscilloscope e Send information pixel image configurations to oscilloscope Other tasks are accomplished by combining these basic functions 1 2 HP 64710 and HP 54720 Programmer s Reference Introduction to Programming Talking to the Instrument Talking to the Instrument Computers acting as controllers communicate with the instrument by sending and receiving messages over a remote interface Instructions for programming normally appear as ASCII character strings embedded inside the output statements of a host language available on your controller The input statements of the host language are used to read in responses from the oscilloscope For example HP 9000 Series 200 300 BASIC uses the OUTPUT statement for sending commands and queries After a query i
21. TRG 8 25 TSTArt 18 10 TSTOp 18 12 ULIMit 27 41 UNITs 13 23 VAMPlitude 19 80 VAVerage 19 82 VBASe 19 84 VERSus 16 30 VERTical 16 31 VIEW 21 10 24 28 VMAX 19 87 VMIN 19 90 VPP 19 92 VRMS 19 94 VSTArt 18 15 VSTOp 18 17 VTOP 19 97 VUPPer 19 99 WAI Wait to Continue 8 27 Wait to Continue WAD 8 27 WINDow 26 13 WINDow DELay 21 11 WINDow POSition 21 13 WINDow RANGe 21 14 WINDow SOURce 21 15 X1Position 18 19 X1Ylsource 18 21 X2Position 18 20 X2Y2source 18 22 XOFFset 25 5 XRANge 25 5 YiPosition 18 24 Y2Position 18 25 YOFFset 25 6 YRANge 25 6 Command and Data Concepts 2 5 Command Error 30 4 Command Error CME Status Bit 4 4 command error and protocol 3 4 command execution and order 3 4 command format 1 4 command mode 2 5 command structure 1 14 Command Tree 6 8 to 6 9 Command Types 6 6 commands embedded in program messages 5 12 commas and spaces 1 6 Common Command Header 1 8 Common Command Headers 5 6 Common Commands 8 2 TST Test 8 26 Clear Status CLS 8 5 CLS Clear Status 8 5 ESE Event Status Enable 8 6 ESR Event Status Enable 8 8 Event Status Enable ESE 8 6 Event Status Register ESR 8 8 Identification Number IDN 8 10 DN identification Number 8 10 Learn LRN 8 11 LRN Learn 8 11 index OPC Operation Complete 8 12 Operation Complete C OPC 8 12 OPT Option 8 13 Option
22. ame CT TL zs OPEE Jo Bit 7 af Statue Byte Register 547 10802 Status Reporting Data Structures 4 6 HP 54710 and HP 54720 Programmer s Reference Status Reporting Status Reporting Data Structures Figure 4 2 continued __ Read by LER Locat Event LOCAL Register REG ISESDETRTEIRIRISIS IRL I e we User Event LEL Register User Set by VEE Event Enabie Read by YEE Register pet sts tot zt ESR Standard Event Status CME OYE ROL OPC Register Sta Set by ESE NRI event A eee ees Rea by sese Read by Read by EN TER ke SYS DSP Trigger TRG Event Register REG Registar From Operation Stotus Ragiater AE Outpul Queue E Read By SERIAL POLL Isis Jeja Joi Sr Mth MAY TRE Register k see fronie Set by SRE lt NRF gt Enisi oe e Read by SRE EZ X Messoges sant to ihe display via SYS DISP TENET witl not set his bii The bit is eei oniy 54710B01 SRO by internal messoges Status Reporting Data Structures continued HP 54710 and HP 54720 4 7 Programmer s Reference Status Reporting Status Byte Register Status Byte Register The Status Byte Register is the summary level register in the status reporting structure It contains summary bits that monitor activity in the other status registers and queues The Status Byte Register is a live register That is its summary bits are set and cleared by the presence and absence of a summary bit from other event reg
23. clear OUTPUT Scope pmemoryl display on OUTPUT 8Scope pmemoryl add BEEP INPUT Do you want to leave the saved waveform on Y or N Y IF UPC Y 1 1 Y THEN ELSE OUTPUT 8Scope pmemoryl display off END IF SUBEND SUB Rt 4g Scope Jp se de he de de dee efe e e dee hee eoe de ee eo dece ede oe eee e e sd fe e e eye de dede e eid e dede de n dn n n 1 This sub program will reaquire the 54721A calibration i output in the real time mode with 4GSa s 1 Ade fe de e de e e de dece fe defe e eode obe debe e e e de dede de dee eee fe dede dee eei desee dee eee tee ki CLEAR SCREEN PRINT Setting up for 4GSa sec OUTPUT Scope acquire mode rtime OUTPUT 8Scope acquire srate 4E49 OUTPUT Scope acquire interpolate on PRINT PRINT When ready to make some measurements press continue PAUSE CLEAR SCREEN SUBEND SUB Measure 8Scope dfe e ede dee deese de e de de de de cdede deo ede eoe de fe de de e e i e e eee n AN de v d e e de d dede ded ded d t hd This sub program will make a width and Vpp measurement It will also report the mean and standard deviations d ode fe ide fe ede de dee dede de e e e e e e e e e ee e e e e e e Fee fee e e de e de de de dede e fe e e dde de de hl CLEAR SCREEN REAL R 1 14 A 1 14 DIM Ex 1 14 1 M 32 i HP 54710 and HP 54720 7 18 Programmer s Reference 1320 1330 1340 1350 1360 1370 1380 1390 1400 1410 1420 1430
24. data No setup saved END IF NEXT I ASSIGN Path TO tclose file DEALLOCATE Set SUBEND t SUB Ertrap fte fefe ce de e eder de ee eee dee e e ee e e e e e d tede eoe e ede de de de e e d de e e de dede dede e d WE i The program will branch to this Error Trap if the ON ERROR is ON and an error occurs It reset the t ON ERROR to OFF the return to where it was called V e de e fe e ee e e e e le e e de e e e e e ole ee e de e de d de de de dede de doe de he je e e d d d d x IF ERRN 54 THEN Error 54 is Duplicate File Name PURGE JSETUPS OFF ERROR ELSE CLEAR SCREEN PRINT ERRMS BBEP PAUSE END IF SUBEND i SUB Recall learnstr Length 1 1 This sub program lets the user select which of the 3 setups 1 that have been stored on the disk in JSETUPS1 2 or 3 to i use to setup the scope It will loop until the user selects i E to exit i COM Io Scope Hpib ASSIGN 8Path TO JSETUPS fopen file ALLOCATE Set Length Icreate temp variable Done 0 REPEAT CLEAR SCREEN PRINT Please enter 1 to recall setup 1 PRINT 2 to recall setup 2 PRINT 3 to recall setup 3 1 24 HP 54710 and HP 54720 Programmer s Reference 1320 1330 1340 1350 1360 1370 1380 1350 1400 1410 1420 1430 1440 1450 1460 1470 1480 1490 1500 1510 1520 1530 1540 1550 1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660 1670 1680 1690 1700 1710 1720 1730 1740 1750 1760 Example Programs L
25. different subsystems on the same line by separating each command with a semicolon The colon following the semicolon enables you to enter a new subsystem For example program mnemonic data program mnemonic data terminator CHANNELI RANGE 0 4 TIMEBASE RANGE 1 Multiple commands may be any combination of compound and simple commands 1 12 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Programming Getting Started Programming Getting Started The remainder of this chapter deals mainly with how to set up the instrument how to retrieve setup information and measurement results how to digitize a waveform and how to pass data to the controller Refer to the chapter Measure Subsystem for information on sending measurement data to the instrument The programming examples in this manual are written in HP BASIC 5 0 for an HP 9000 Series 200 300 Controller Initialization To make sure the bus and all appropriate interfaces are in a known state begin every program with an initialization statement For example l HP BASIC provides a CLEAR command which clears the interface buffer CLEAR 707 initializes the interface of the instrument When you are using HP IB CLEAR also resets the oscilloscope s parser The parser is the program that reads in the instructions that you send After clearing the interface initialize the instrument to a preset state OUTPUT 707 RST initia
26. for reading a query is not followed This includes the interrupted and unterminated conditions described in the following paragraphs Syntax Diagrams The example syntax diagrams in this chapter are similar to the syntax diagrams in the IEEE 488 2 specification Commands and queries are sent to the instrument as a sequence of data bytes The allowable byte sequence for each functional element is defined by the syntax diagram that is shown The allowable byte sequence can be determined by following a path in the syntax diagram The proper path through the syntax diagram is any path that follows the direction of the arrows If there is a path around an element that element is optional If there is a path from right to left around one or more elements that element or those elements may be repeated as many times as desired HP 54710 and HP 54720 3 5 Programmer s Reference Message Communication and System Functions Syntax Diagrams Figure 3 1 arm source HOE i Eco RESource 006 Ug g res terme R Sour ce TYPE I rove Example Syntax Diagram 3 6 HP 64710 and HP 64720 Programmer s Reference Message Communication and System Functions Syntax Diagrams Figure 3 2 TWAVEFORM OSEARCH 30 TRIGGER gt DELAY 3 8 ns NL program message unit TWAVEFORM OSEARCH 30 TRIGGER lt command program header Xprogram header separator program dota TWAVEF ORM
27. is displayed on the oscilloscope screen 2 8 HP 64710 and HP 54720 Programmer s Reference Message Communication and System Functions Message Communication and System Functions This chapter describes the operation of instruments that operate in compliance with the IEEE 488 2 syntax standard It is intended to give you enough basic information about the IEEE 488 2 Standard to successfully program the instrument You can find additional detailed information about the IEEE 488 2 Standard in ANSI IEEE Std 488 2 1987 IEEE Standard Codes Formats Protocols and Common Commands This instrument series is designed to be compatible with other Hewlett Packard IEEE 488 2 compatible instruments Instruments that are compatible with IEEE 488 2 must also be compatible with IEEE 488 1 HP IB bus standard however IEEE 488 1 compatible instruments may or may not conform to the IEEE 488 2 standard The IEEE 488 2 standard defines the message exchange protocols by which the instrument and the controller will communicate It also defines some common capabilities that are found in all IEEE 488 2 instruments This chapter also contains a few items which are not specifically defined by IEEE 488 2 but which deal with message communication or system functions 3 2 HP 54710 and HP 54720 Programmer s Reference Message Communication and System Functions Protocols Protocols The message exchange protocols of IEEE 488 2 define the overali sc
28. paths simply assigns HPIB select code to be 7 and 1261 t1 the scope address to be 7 1270 t1 1280 1 Parameters 1310 Passed 8Scope I O path 707 1320 Scope the HPIB address that the scope is selected to 1330 1 Internal Isc the interface select code for the HPIB card 1350 1 Modified Variables Scope 1360 1 1400 CLEAR SCREEN 1420 Isc 7 1430 Scope 7 1580 ASSIGN Scope TO Isc 100 Scope 1610 SUBEND 1620 1630 SUB Meas 8S Isc 1640 1641 1 Description The scope is setup and waiting to make continuous meas s 1642 1 Setup On interupt so Lim Tst Comp gives SRQ 1643 1 2 Setup Limit test 1644 1 3 Set RUN Limit Tests 1645 1 4 Report results 1646 1647 1 Parameters 1648 Passed 6S Scope specific scope s address 1650 t COM For cnt INTEGER num acq M 1651 1653 1 Internal Results array of values returned from a RESULTS 1654 1 Value 4 of each set is the mean Therefore 1655 1 Results 4 13 and 22 are the ones of 1656 i l interest 1657 1 M measurement sets requested 1658 1 Num acq the termination variable 1661 1 7 34 HP 54710 and HP 54720 Programmer s Reference 1662 1663 1664 1665 1871 1872 1900 1901 1910 1920 1930 2000 2001 2002 2003 2010 2020 2060 2068 2069 2070 2071 2076 2077 2080 2081 2082 2083 2085 2086 2087 2088 2089 2091 2100 2110 2111 2112 2113 2118 2119 2120 2121 2122 2124 Modif Calls
29. program data is used to convey parameter information as alpha or alphanumeric strings For example the TIMEBASE REFERENCE command can be set to left center or right The character program data in this case may be LEFT CENTER or RIGHT TIMEBASE REFERENCE RIGHT sets the time base reference to right The available mnemonics for character program data are always included with the instruction s syntax definition When sending commands either the long form or short form if one exists may be used Upper case and lower case letters may be mixed freely When receiving responses upper case letters are used exclusively Numeric Program Data Some command headers require program data to be expressed numerically For example TIMEBASE RANGE requires the desired full scale range to be expressed numerically For numeric program data you have the option of using exponential notation or using suffix multipliers to indicate the numeric value The following numbers are all equal 28 0 28E2 280E 1 28000m 0 028K 28E 3K When a syntax definition specifies that a number is an integer that means that the number should be whole Any fractional part would be ignored truncating the number Numeric data parameters that accept fractional values are called real numbers For more information see the chapter Interface Functions All numbers are expected to be strings of ASCII characters Thus when sending the number 9 you would send a byte
30. program syntax 1 4 programming and front panel control 2 7 programming basics 1 2 Programming Conventions 6 2 programming examples langauge 1 2 Programming Getting Started 1 13 Programming Syntax 5 2 PROTection 13 17 protection switch calibration 12 3 Protocol 3 3 Protocol exceptions 3 4 protocol exceptions 3 4 Protocol Operation 3 4 Protocol Overview 3 3 Protocols 3 3 to 3 4 pulse width measurement setup 19 3 PWIDth 19 59 to 19 60 Q Queries defined 5 7 Query 1 6 1 9 ADDRess 17 5 AER 9 10 AMASK SOURce 28 16 AMASICUNITs 28 18 AMASk XDELta 28 20 AMASk YDELta 28 22 AREA 17 6 ASSign 15 7 BACKground 17 7 BANDpass 24 8 BWLimit 11 5 18 5 23 3 BYTeorder 24 10 COLumn 15 9 to 15 11 COMPlete 11 7 24 11 COUNt FAlLures 28 23 COUNt FSAMples 28 24 COUNt FWAVeforms 28 25 COUNt SAMPles 28 26 COUNt WAVeforms 28 27 COUNt 11 9 24 12 COUPIing 24 13 CURSor 18 6 DATA 15 13 24 15 DELay 21 4 DELTatime 19 18 DESTination 17 8 DEVent 22 9 22 11 22 51 to 22 53 Index 9 Index 22 56 DEVents 22 13 DEVice 17 9 DIRectory 14 4 DISPlay 13 7 DISPlay 16 10 25 4 26 4 DTIMe 22 16 22 20 DUTycycie 19 21 DWAVeform 15 15 EDGe 22 23 ESR 8 8 Event Status Enable 8 6 Event Status Register 8 8 FACTors 17 10 FAIL 2710 29 17 FALLtime 19 22 FFEed 17 11 FORmat 15 16 FORmat 15 16 24 18 FRAMe 12 15 FREQuency 19 30
31. register hosts the LCL bit bit 0 from the Local Event Register The other 15 bits are reserved You can read and clear this register using the UER query This register is enabled with the UEE command For example if you want to enable the LCL bit you send a mask value of 1 with the UEE command otherwise send a mask value of 0 Local Event Register LCL This register sets the LCL bit in the User Event Register and the USR bit bit 1 in the status byte It indicates a remote to local transition has occurred The LER query is used to read and to clear this register Operation Status Register OPR This register hosts the WAIT TRIG bit bit 5 the LTEST bit bit 8 the HIST bit bit 9 the MASK bit bit 10 and the PROG bit bit 14 The WAIT TRIG bit is set by the Trigger Armed Event Register and indicates that the trigger is armed The LTEST bit is set when a limit test fails or is completed and sets the corresponding FAIL or COMP bits in the Limit Test Event Register The HIST bit is set when the COMP bit is set in the Histogram Event Register indicating that the histogram measurement has satisfied the specified completion criteria The MASK bit is set when the Mask Test either fails specified conditions or satisfies its completion criteria setting the corresponding FAIL or COMP bits in the Mask Test Event Register The PROG bit is reserved for future use If any of these bits are set the OPER bit bit 7 of the Status By
32. representing the ASCII code for the character 9 which is 57 A three digit number like 102 would take up three bytes ASCII codes 49 48 and 50 This is taken care of automatically when you include the entire instruction in a string HP 54710 and HP 54720 1 11 Programmer s Reference Introduction to Programming Embedded Strings Embedded Strings Embedded strings contain groups of alphanumeric characters which are treated as a unit of data by the oscilloscope For example the line of text written to the advisory line of the instrument with the SYSTEM DSP command SYSTEM DSP This is a message Embedded strings may be delimited with either single or double quotes These strings are case sensitive and spaces act as legal characters just like any other character Program Message Terminator The program instructions within a data message are executed after the program message terminator is received The terminator may be either an NL New Line character an EOI End Or identify asserted in the HP IB interface or a combination of the two All three ways are equivalent Asserting the EOI sets the EOI control line low on the last byte of the data message The NL character is an ASCII linefeed decimal 10 The NL New Lina terminator has the same function as an EOS End Of String and EOT End Of Text terminator Selecting Multiple Subsystems You can send multiple program commands and program queries for
33. responses 10 2 formfeed 17 11 Fractional values 1 11 FRAMe in CALibrate command CANcel 12 14 CONTinue 12 14 DATA 12 15 DONE 12 15 LABel 12 16 MEMory 12 16 STARt 12 16 TIME 12 17 FREQuency 19 28 to 19 30 26 5 frequency measurement setup 19 3 frequency resolution for FFT 26 10 frequency span of FFT 26 12 FREQuency in FUNCtion FFT command 16 12 FREQuency in MEASure FFT command 19 25 front panel control while programming 2 1 front panel simulation 10 2 full scale vertical axis 13 19 function and vertical scaling 16 28 Function Commands 18 2 ADD 16 8 DIFF 16 9 DISPlay 16 10 DIVide 16 11 FFTMagnitude 16 16 HORizontal 16 17 INTegrate 16 20 Index 5 index INVert 16 21 MAGNify 16 22 MAXimum 16 23 MINimum 16 24 MULTiply 16 25 OFFSet 16 26 ONLY 16 27 RANGe 16 28 SUBTract 16 29 VERSus 16 30 VERTical 16 31 function time scale 16 3 Functional Diagram for Limit Test 27 3 functional elements of protocol 3 3 functions calculating and data flow 6 4 combining in instructions 1 7 Functions and VIEW 24 28 G gain and offset of a probe 12 8 general bus management 2 2 GGTHan Definition 22 24 GIF HARDcopy DEVice 17 9 GLITch in TRIGger command 22 24 POLarity 22 25 SOURce 22 26 WIDTh 22 27 global reset conditions 8 15 GLTHan Definition 22 24 go to local command GTL 2 7 graphs setting the number of 15 16 GR
34. screen and digitizes the waveform Then the operator can reposition before transfering the data to the computor Then the computor will draw the waveform as repositioned on the computor screen It also save the data to a record and recalls that data before drawing it Begin main none Get waveform Graph Initscope Readme Readme2 Retrieve wave Save waveform none Preamble amp Waveform Path amp Scope Real array for the first 15 parameters of the preamble they are numerics and the remaining 3 parameters are alphas and are not used Integer array to store the wavefrom data Path the path for saving recalling data to from media The scope s complete HPIB address 15 INTEGER Waveform 1 32000 Begin main 1 CALL Readme CALL Initscope 8Scope CALL Get waveform 8Scope Waveform Preamble CALL Save waveform 8Path Waveform Preamble CALL Readme2 CALL Retrieve wave 8Path Waveform Preamble CALL Graph Waveform Preamble HP 54710 and HP 54720 7 3 Programmers Reference 291 292 310 Example Programs Digitize Example Program PRINT TABXY 15 30 Program has Ended LOCAL 707 300 End main END 320 Begin subs i 321 330 340 341 342 343 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 611 620 621 623 630 640 641 SUB Readme Description Readme prints program explain
35. second way to send these commands is shown in the second part of the example Since the program message terminator places the parser back at the root of the command tree TIMEBASE must be re selected to re enter the TIMEBASE node before sending the POSITION command 6 10 HP 54710 and HP 54720 Programmer s Reference Example 3 Programming Conventions Infinity Representation OUTPUT 707 TIMEBASE REFERENCE CENTER CHANNEL1 OFFSET 0 In example 3 the leading colon before CHANNEL tells the parser to go back to the root of the command tree The parser can then recognize the CHANNELI1 OFFSET command and enter the correct node Infinity Representation The representation for infinity for this oscilloscope is 9 99999E 37 This is also the value returned when a measurement cannot be made Sequential and Overlapped Commands IEEE 488 2 makes a distinction between sequential and overlapped commands Sequential commands finish their task before the execution of the next command starts Overlapped commands run concurrently Commands following an overlapped command may be started before the overlapped command is completed Response Generation As defined by IEEE 488 2 query responses may be buffered for the following reasons When the query is parsed by the instrument When the controller addresses the instrument to talk so that it may read the response This oscilloscope buffers responses to a query when the query is parse
36. than or Equal to CASE 4 M Result Invalid CASE 5 M Edge Not Found CASE 6 MS Max q level not found CASE 7 M Min q level not found CASE 8 M Requested Time not found CASE 9 M Voltage not found CASE 10 M Top and Base are equal CASE 11 M Measurement zone too small CASE 12 M Lower Threshold CASE 13 M e Upper Threshold CASE 14 M Bad Upper Lower combination CASE 15 M Top not on waveform CASE 16 MS Base not on waveform CASE 17 M Completion Criteria not reached CASE 18 M Invalid Signal for measurement CASE 19 M Source Signal not displayed CASE 20 M e Clipped High 7 16 HP 54710 and HP 54720 Programmer s Reference 2670 2680 2690 2700 2710 2720 2730 2740 2750 2760 2770 2780 2790 2800 2810 2820 2830 2840 2850 CASE 21 M e Clipped Low CASE 22 M e Clipped High and Low CASE 23 MS All Holes CASE 24 M No Data on Screen CASE 25 MS Cursor not on screen CASE 26 M Measurement Aborted CASE 27 M Measurement timed out CASE 28 MS No measurement to track CASE ELSE END SELECT SUBEND Example Programs Measurement Example Program HP 64710 and HP 54720 Programmer s Reference 7 17 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 i1 RE SAVE i Example P
37. the following to read the contents of the stoius byte OUTPUT 707 STBR ENTER 707 variobla PRINT lt vor iat a gt S470080S 4 18 HP 54710 and HP 64720 Programmers Reference Programming Syntax Programming Syntax Computers acting as controllers communicate with the oscilloscope by sending and receiving program messages over a remote interface Program messages are placed on the bus using an input or output command and passing the device address instruction and terminator Passing the device address ensures that the instruction is sent to the correct interface and instrument Instructions for programming the oscilloscope normally appear as ASCII character strings embedded inside the output statement of a host language available on your controller Responses from the oscilloscope are read with the input statements of the host language 5 2 HP 54710 and HP 54720 Programmer s Reference Programming Syntax HP BASIC Output Statement HP BASIC Output Statement HP 9000 Series 200 300 BASIC uses the OUTPUT statement for sending coramands and queries to the oscilloscope Figure 5 1 CDA space Adaress C C Program neasaae 9 C Terminator 54789401 HP Basic Syntax for Sending Program Messages HP BASIC Enter Statement After a query is sent the response is usually read using the HP BASIC ENTER statement The ENTER statement passes the value across the bus to the controller and places it
38. usually improves the repeatability of your measurements The equivalent time sampling mode is slightly different Notice that averaging is turned on or off before the data is stored in the channel memories That means once the data is acquired if you need to turn averaging on or off before making any measurements you must reacquire the data However because the equivalent time sampling mode is primarily used on repetitive signals you should be able to reacquire the data Also you may notice that postprocessing the data in the equivalent time signal path includes calculating functions storing data to the waveform memories transferring data over the HP IB bus or transferring data to and from the disk After the measurements are performed the data is sent through the display portion of the oscilloscope Notice that connected dots is a display feature and that it has no influence on the measurement results The pixel memory is also part of the video RAM which Is past the point where the measurements are performed on the data Therefore you cannot make measurements on data in the pixel memory But you can make measurements on data stored to the waveform memories 6 4 HP 54710 and HP 54720 Programmer s Reference Truncation Rule Table 6 1 Programming Conventions Truncation Rule Truncation Rule The following truncation rule is used to produce the short form abbreviated spelling for the mnemonics used in the programm
39. 00 i DETERMINE THE FRAME MODEL NUMBER j 110 120 OUTPUT 707 MODEL FRAME 130 ENTER 707 Mframes 140 150 i DETERMINE THE PLUG INS AND THEIR LOCATIONS 160 I 170 FOR I1 TO 4 180 OUTPUT 707 USING K MODEL PLUGIN I 190 ENTER 707 Slot I 200 NEXT I 210 220 i REPORT THE MAINFRAME MODEL AND PLUG INS www 230 240 CLEAR SCREEN 250 PRINT The Main frame is Mframe 260 PRINT 270 PRINT The plug in in slot 1 is Slot 1 280 PRINT The plug in in slot 2 is Slot 2 290 PRINT The plug in in slot 3 is Slot 3 300 PRINT The plug in in slot 4 is Slot 4 m 310 PRINT 320 PRINT End of Program 330 END HP 54710 and HP 54720 7 31 Programmer s Reference 10 20 30 40 50 60 70 80 90 100 110 120 130 170 180 200 210 220 230 240 250 280 290 300 310 320 340 350 i i i 1 i l H i t i t i t i i i i i Example Programs Limit Test Example Program Limit Test Example Program MLIM ibw Copyright c 1993 Hewlett Packard Co All rights reserved Contributor Colorado Springs Division Product Throughput Application Revision 3 0 pate 6 14 93 Author Ed Mierzejewski Structure Chart None Description This Uses Measure Limit Testing to make 3 measurements on 10 successive pulses at a 10 Hz rate Considerations None Main routine Begin main Sub routines None Functions None Sub programs Variable list
40. 12 SRATe 11 15 SSCReen 27 19 28 45 29 9 SSUMmary 27 31 28 57 29 13 STATe 22 39 STA Tistics 19 71 Status Byte STB 8 23 Status 12 22 STB Status Byte 8 23 SWEep 22 44 to 22 49 22 54 to 22 55 TDELta 18 9 TEDge 19 72 Test TST 8 26 TEST 27 40 28 64 29 7 TMAX 19 74 TMIN 19 76 TST Test 8 26 TSTArt 18 10 TSTOp 18 13 TVOLt 19 78 TYPE 11 17 24 26 ULIMit 27 41 UNITs 13 23 VAMPlitude 19 80 VAVerage 19 83 VBASe 19 84 VDELta 18 14 VIEW 21 10 24 29 VLOWer 19 86 VMAX 19 87 VMIDdie 19 89 VMIN 19 90 VPP 19 92 VRMS 19 95 VSTArt 18 15 VSTOp 1817 VTOP 19 97 VUPPer 19 99 WINDow DELay 21 11 WINDow POSition 21 13 WINDow RANGe 21 14 WINDow SOURce 21 15 WINDow 26 13 X1Position 18 19 X1Yisource 18 21 X2Position 18 20 X2Y2source 18 22 XDELta 18 28 XDISplay 24 30 XINCrement 24 31 XOFFset 25 5 XORigin 24 32 XRANge 24 33 25 5 XREFerence 24 34 XUNits 24 35 index YiPosition 18 24 YDEita 18 26 YDISplay 24 36 YINCrement 24 37 YOFFset 25 6 YORigin 24 38 YRANge 24 39 25 6 YREFerence 24 40 YUNits 24 41 Query command 1 9 Query Error 30 6 Query Error QYE Status Bit 4 4 query error and protocol 3 5 Query Headers 1 9 query interrupt 1 9 Query response 1 17 query responses formatting 10 2 query results and output queue 5 7 query results and the error que
41. 132 2133 2134 2135 2137 2138 i Example Programs Limit Test Example Program it Modified Variables num acq 1 1 Calls sub programs None 1 COM For cnt INTEGER Num acq M S PRINT hello Num acq M SUBEND 7 36 HP 54710 and HP 54720 Programmer s Reference Index A abbreviated spelling of instructions 5 4 aborting a digitize command 1 16 aborting a digitize operation 2 8 absolute maximum voltage and VMAX 19 87 absolute minimum voltage and VMIN 19 90 accuracy and calibration 12 6 accuracy and probe calibration 12 8 Acquire Commands 11 2 BWLimit 11 5 COMbPlete 11 6 COUNt 11 8 INTerpolate 11 10 MODE 11 11 POINts 11 12 SRATe 11 14 TYPE 11 16 ACQuire TYPE and display mode 15 2 acquired data flow 6 3 acquisition ACQuire TYPE and completion 11 6 points 11 12 record length 11 12 sample rate 11 14 type 11 16 acquisition record length 11 12 acquisition reset conditions 8 16 active probes and calibration 12 8 ADD 16 8 20 3 ADDRess 17 5 ADDRess and SSCReen 28 50 ADDRess and SUMmary 28 56 address oscilloscope default 2 6 Addressing 2 5 AREA 17 6 ARM Arm Event Register 4 15 ARM bit 8 24 Arm Event Register ARM 4 15 arming the trigger 2 8 ASCII character 32 1 6 ASCH linefeed 1 12 5 13 ASCH and FORMAt 24 17 ASSign 15 7 attenuation factor for probe 13 13 attenuation factors and probes 12 8 attenuation factor
42. 1440 1450 1460 1470 1480 1490 1500 1510 1520 1530 1540 1550 1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660 1670 1680 1690 1700 1710 1720 1730 1740 1750 1760 Example Programs Measurement Example Program Normally when making measurements they should be preceeded by a DIGITIZE But because I have the scope setup like I want it from previous sub programs and I will be using the statistics I will not use the DIGITIZE command fem pa dem Wee ne PRINT Making measurements on Channel 1 PRINT Measuring for 5 seconds OUTPUT Scope measure source channeli OUTPUT Scope measure statistics on sendvalid on OUTPUT RScope measure pwidth vpp WAIT 5 Give the measurements a chance to build up values OUTPUT Scope stop Stop match on screen values with returned OUTPUT Scope measure results ENTER Scope USING K A Eng A R Ex Convert to Engineering Notation CLEAR SCREEN PRINT The results of the positive pulse width measurement are PRINT Result state R 2 M Interpret the Result State value PRINT The current value is R 1 Ex 1 PRINT The state value is R 2 It means M PRINT The minimum value is R 3 Ex 3 PRINT The maximum value is R 4 Ex 4 PRINT The average value is R 5 Ex 5 PRINT The standard deviation is R 6 Ex 6 PRINT The number of measurements is R 7 Ex 7 PRINT The results of the peak to peak mea
43. 24 19 PREamble 24 20 SOURce 24 25 TYPE 24 26 VIEW 24 28 XDISplay 24 30 XINCrement 24 831 AORigin 24 32 XRANge 24 33 XREFerence 24 34 XUNits 24 35 YDISplay 24 36 YINCrement 24 37 YORigin 24 38 YRANge 24 39 YREFerence 24 40 YUNits 24 41 Waveform Memory Commands Waveform Memory Commands 25 2 DISPlay 25 4 SAVE 25 4 XOFFset 25 5 XRANge 25 5 YOFFset 25 6 YRANge 25 6 FFT Commands FFT Commands 26 2 DISplay 26 4 FREquency 26 5 Contents 14 27 Contents MAGNify 26 6 MSPan 26 7 OFFSet 26 8 RANGe 26 9 RESolution 26 10 SOURce 26 11 SPAN 20 12 WINDow 26 13 Limit Test Commands Limit Test Commands 27 2 FAIL 27 9 LLIMit 27 11 MNFound 27 12 RUN RUMode 27 14 SOURce 27 17 SSCReen 27 18 SSCReen DDISk 27 20 SSCReen DDISk BACKground 27 21 SSCReen DDISk MEDia 27 22 SSCReen DDISk PFORmat 27 23 SSCReen DPRinter 27 24 SSCReen DPRinter ADDRess 27 25 SSCReen DPRinter BACKground 27 26 SSCReen DPRinter MEDia 27 27 SSCReen DPRinter PFORmat 27 28 SSCReen DPRinter PORT 27 29 SSUMmary 27 30 SSUMmary ADDRess 27 32 SSUMmary FORMat 27 33 SSUMmary MEDia 27 34 SSUMmary PFORmat 27 35 SSUMmary PORT 27 36 SWAVeform 27 37 TEST 27 39 Contents 15 28 Contents ULIMit 27 41 Mask Test Commands Mask Test Commands 28 2 AMASk CReate 28 14 AMASk SOURce 28 15 AMASKk UNITs 28 17 AMASKk XDELta 28 19 AMASk YDELta 28 21 COUNt FAILures 28 23 COUNt FSAMples 28 24 COUNt FWAVeforms 28 25 COUNt SAMPl
44. 26 5 GLITch 22 25 GRATicule 15 17 HOLDoff 22 28 HORizontal 16 17 HYSTeresis 22 29 Identification Number IDN 8 10 IDN Identification Number 8 10 INPut 13 9 13 16 INTerpolate 11 10 INVerse 15 18 Learn LRN 8 11 LENGth 17 13 LEVel 22 30 LLIMit 27 11 29 18 to 29 19 LRN Learn 8 11 MAGNify 26 6 MASK DEFine 28 29 MASK 15 20 MEDia 17 14 MNFound 27 13 29 20 MODE 22 32 MODE 11 11 18 8 MSPan 26 7 NWIDth 19 32 19 34 19 36 19 38 19 40 19 42 19 45 19 47 19 50 19 52 OFFSet 13 11 16 26 26 8 OPC Operation Complete 8 12 Index 10 OPT Option 8 13 Option OPT 8 13 OUTput 12 18 13 12 OVERshoot 19 54 PATtern 22 34 PERiod 19 55 PERSistence 15 22 POINts 11 13 24 19 POLYgon DEFine 28 31 POSition 21 6 PREamble 24 22 PREShoot 19 58 PROBe 13 14 23 4 PROTection 13 18 PWIDth 19 60 SRE Service Request Enable 8 21 RANGe 13 19 RANGe 13 19 16 28 21 7 26 9 REFerence 21 8 RESolution 26 10 RESults 19 61 RISetime 19 66 ROW 15 23 RUMode 28 34 RUN 27 16 29 21 SCALe SOURce 28 37 SCALe X1 28 39 SCALe XDELta 28 41 SCALe Y1 28 42 SCALe Y2 28 43 SCALe 13 21 21 8 SCOLor 15 26 SENDvalid 19 68 SENSitivity 13 22 Service Request Enabie SRE 8 21 SKEW 12 22 SLOPe 22 36 SOURce 24 25 SOURce 15 28 1970 26 11 27 17 29 6 SOURce and TRIGger 22 37 SPAN 26
45. 4 spelling of headers 1 10 SPOLL example 4 8 SRATe 11 14 to 11 15 SRE Service Request Enable 8 21 to 8 22 SRE Service Request Enable Register 4 10 SSCReen 28 44 to 28 45 SSCReen in Limit TESt command 27 18 to 27 19 DDISk 27 20 DDISk BACKground 27 21 DDISk MEDia 27 22 DDISk PFORmat 27 23 DPRinter 27 24 DPRinter ADDRess 27 25 DPRinter BACKground 27 26 DPRinter MEDia 27 27 DPRinter PFORmat 27 28 DPRinter PORT 27 29 SSUMmary 28 56 to 28 57 SSUMmary in Limit TESt com mand 27 30 to 27 31 ADDRess 27 32 FORMat 27 33 MEDia 27 34 PFORmat 27 35 PORT 27 36 Standard Event Status Enable Register SESER 4 12 Standard Event Status Enable Register Bits 8 7 Standard Event Status Enable Register defauit 2 3 Standard Event Status Register ESR 4 11 Index 12 Standard Event Status Register Bits 8 9 Standard Status Data Structure Model 4 2 STATe and ACQuire COMPlete command 11 8 STATe in TRIGger command 22 38 CLOCK 22 39 CONDition 22 40 LOGic 22 41 SLOPe 22 42 STATistics 19 71 Status 1 20 Status Byte STB 8 23 to 8 24 Status Byte Register 4 8 to 4 9 Status Byte Register and serial polling 4 9 Status Byte Register Bits 8 24 Status Byte Register default 2 3 Status Messages 2 8 status of an operation 4 2 Status registers 1 20 8 4 Status Reporting 4 2 Status Reporting Bit Definitions 44 Status Reporting Data Structures 4 5 to 4 7 9 7 to 9 9 STATus in CALibrat
46. 76 1077 1080 1090 1150 1160 1170 1171 1180 1190 1200 1220 1230 1231 1233 1240 1250 1260 1270 1280 1290 Example Programs Digitize Example Program There are 2 forms of digitize 1 with parameters will digitize the specified channel function screen is blanked then place the data in associated channel function memory 2 without parameters digitizes amp ll on channels functions and places data in the associated channel function memory and leaves them on but stopped Both digitizes are here and on adjacent lines One of the lines must be commented out or only the last one will be used Parameters Passed Scope Waveform Preamble Internal Digits this is the length of the data header Length the number of bytes of data from the scope End enpties output buffer of linefeed One char used to find the character Modified Variables Waveform Preamble Digits Length End and One char de a am Rub es ee gt e CLEAR SCREEN PRINT Get waveform OUTPUT 8Scope DIGitize CHAN1 OUTPUT Scope DIGitize User sets disp LOCAL 707 PRINT Adjust Display as you want it Press continue when ready PAUSE Read data t OUTPUT Scope WAVeform DATA ENTER Scope USING 1A One char IF One char e i THEN ENTER Scope USING 1D Digits ENTER 8Scope USING amp VALS Digits amp D Length CLEAR SCREEN PRINT PRINT reading Length bytes from scope i tRediment
47. ATicule 15 17 GRATicule HARDcopy AREA 17 6 group execute trigger GET 2 8 H halting bus activity 2 8 handshake code and capabilities 2 4 Hardcopy Commands 17 2 ADDRess 17 5 AREA 17 6 BACKground 17 7 DESTination 17 8 DEVice 17 9 FACTors 17 10 FFEed 17 11 FiLEname 17 12 LENGth 17 13 MEDia 17 14 hardcopy of the screen 17 2 hardcopy output and message termination 3 4 HEADer 10 10 Header Types 1 7 header within instruction 1 5 Header Instruction 5 5 to 5 6 Headers 1 6 headers in syntax 1 4 HEEN 9 18 HELP in MENU command 9 23 HER 9 19 High SENsitivity and hysteresis 22 29 HiSTogram commands 29 2 WINDow X2Position 29 19 WINDow YiPosition 29 20 WINDow Y2Position 29 21 to 29 22 Histogram Event Register 4 15 HiSTogram in MENU command 9 23 HITS in MEASure HISTogram command 19 31 to 19 32 HOLDoff in TRIGger command 22 28 HORizontal 16 17 horizontal functions controlling 21 2 horizontal offset and XOFFset 25 5 horizontal range and XRANge 25 5 horizontal scaling and functions 16 3 Host language 1 5 HP 9000 Series 200 300 Controller 1 2 HP BASIC 5 0 1 2 HP BASIC Enter Statement 5 3 HP BASIC Output Statement 5 3 HP PaintJet print background 17 7 HP IB Default Startup Conditions 2 3 HP IB Interface Connector 2 3 HP IB menu 2 5 HPIB CHARDcopy DESTination 17 8 hue 15 25 HYSTeresis in TRIGger command 22 29 H Identification Number IDN 8 10 IDN Identification Nu
48. Begin main 1 CALL Readme CALL Set paths 8Scope Isc CALL Set scope f Scope CALL Meas 8Scope Isc 330 End of main END i 360 Begin subs 370 380 390 400 410 420 430 440 450 460 461 i SUB Readme 1 eh oe ow w ee be Readme Set paths Set scope Meas Tcount Description Readme writes instructions and information at the beginning of the program for the user to ensure proper setup prior to continuing the program Parameters None CLEAR SCREEN PRINT TABXY 5 5 7 32 HP 54710 and HP 54720 Programmer s Reference 470 471 472 473 474 475 480 490 491 500 510 520 521 530 540 550 560 570 571 580 590 600 610 620 960 970 980 990 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1101 1104 1105 1110 1120 1130 1140 PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PAUSE CLEAR SUBEND Example Programs Limit Test Example Program MLIM ibw uses a HP8131 in the burst mode to manualy start a burst of 10 2ns pulses with a 99 9 ms period 1 V amp It will work with any similar signal including the front panel cal It makes a Vpp Risetime and Positive pulse width measurement on each and reports the mean after all 10 measurement sets are complete There are NO specific plug ins required except a suitable 1 must be in channel 1 Program was deve
49. C OPT 8 13 Reset RST 8 15 RST Reset 8 15 SAV Save 8 20 Save SAV 8 20 Service Request Enable SRE 8 21 SRE Service Request Enable 8 21 Status Byte STB 8 23 S TB Status Byte 8 23 Test TST 8 26 TRG Trigger 8 25 Trigger TRG 8 25 WAI Wait to Continue 8 27 Wait to Continue WAD 8 27 Common Commands Syntax Diagram 8 3 common commands within a program message 8 4 Communicating Over the Bus 2 6 COMPiete 11 8 complete spelling of instructions 5 4 COMPiete 24 11 compound and simple com mands combining 5 10 Compound Command Header 1 7 Compound Command Headers 5 6 compound queries 3 4 concurrent commands 6 11 CONDition and STATe 22 40 connected dots effect on meas urements 6 4 Controller code and capability 2 4 Controller HP 9000 Series 200 300 1 2 controlling the front panel while programming 2 7 Index 3 Index conventions of programming 6 2 Conversion from Data Value to Y Axis Units 24 4 COUNt 11 9 COUNt FAILures 28 23 COUNt FSAMples 28 24 COUNt FWAVeforms 28 25 COUNt SAMPles 28 26 COUNt WAVeforms 28 27 COUNt 24 12 coupling input 13 8 13 16 COUPling 24 13 critical measurements and calibration 12 6 CTIFf CHARDcopy DEVice 17 9 CURSor 18 6 D DA TA 15 12 to 15 13 24 14 to 24 16 Data Acquisition 24 3 Data Acquisition Types 24 4 Data Conversion 24 4 Data Flow 6 3 to 6 4 data
50. Crement YORIgin YRANge YREF erence YUNis 54710804 In This Book This book is your guide to programming the HP 54710 and HP 54720 Digitizing Oscilloscopes using the HP IB command set Part One Introduction to Programming the HP 54710 HP 54720 Oscilloscopes gives you the conceptual information needed to start programming the oscilloscope This part includes information about basic program communications interface syntax data types and status reporting It also has a set of sample programs that show you some typical applications Part Two HP 54710 HP 54720 HP IB Command Reference describes ali the commands used to program the oscilloscope Each chapter lists the commands that belong to an individual subsystem and explains the function of each command Part 1 Contents Introduction to Programming the HP 54710 HP 54720 Oscilloscopes Introduction to Programming Introduction to Programming 1 2 Talking to the Instrument 1 3 Program Syntax 1 4 Output Command 1 4 Device Address 1 5 Instructions 1 5 Instruction Header 1 6 White Space Separator 1 6 Program Data 1 6 Header Types 1 7 Duplicate Mnemonics 1 8 Query Headers 1 9 Program Header Options 1 10 Program Data Syntax Rules 1 10 Character Program Data 1 11 Numeric Program Data 1 11 Embedded Strings 1 12 Program Message Terminator 1 12 Selecting Multiple Subsystems 1 12 Programming Getting Started 1 13 Initialization 1 13 Example Program
51. Decision Chart Do you want io do stotus reporting no yes Rere the instrument ond ciear the atatus registers DutPUT 787 RST OUTPUT 707 CiS yos Do you want to wend o Service Request ISRO interrupt to the controller no yes Da you wont te report svants monitored by the Stondard Event Stotus Register Use the ESE common command fo enchle ths bits you want to use to generate o summary bit to the Status Byta Register Use the EBE common command tao enabie the bits you want to generate the RQS MSS bit to set bit 6 in the Status Byte Register ond send an SRA to the computer If ovante ore monitored by the Standard event Status Register also Enable ESB with SR commend Activate the instrument function that you want to monitor When an interrupt occurs read the Status Byte Register Use the foilowing PsSPOLLC787 PRINT P To read ine Stotue Byta Register use the fol iowing OUTPUT 707 4STS ENTER 87 variabie PRINT variable This reads the decime value of the Sictus Byte Register Determine which bits in the Status Byte Register are set Use the following to read the Standard Event Statue Register OUTPUT 787 ESR ENTER 707 lt var fable gt PRINT variable Use the fottowinag to ges if an operation is comp fete OUTPUT 767 sOPC ENTER 787 lt variabie gt PRINT variable Usa
52. Definitions in Status Reporting 4 4 BLANK 9 13 BLANK and VIEW 9 40 blanking the user text area 15 30 Block data 1 5 1 19 block data in a learnstring 1 5 block data and DATA 24 14 Block Data in Program Data 5 9 Block Diagram Status Reporting Overview 4 3 buffer output 1 9 SKEW 12 21 calibration factors 12 4 calibration factors and raw data 6 4 calibration level of accuracy 12 5 calibration protection switch 12 3 calibration status 12 22 CDISplay Clear DiSpiay 9 14 center screen voltage 13 10 CENTronies HARDcopy DESTination 17 8 Channel Commands 13 2 BWLimit 13 5 DISPlay 13 7 INPut 13 8 OFFSet 13 10 OUTput 13 12 PROBe 13 13 13 15 to 13 16 PROTection 13 17 PROTection 13 18 RANGe 13 19 SCALe 13 21 SENSitivity 13 22 UNITS 13 23 to 13 25 channel reset conditions 8 19 channel to channel skew factor 12 21 Channels and VIEW 24 28 Character data 1 11 character program data 1 10 to 1 11 Character Program Data in Program Data 5 8 CLEar 20 3 Index 1 Index clearing buffers 2 8 error queue 30 3 overload protection 13 17 pending commands 2 8 Request for OPC flag 8 5 Standard Event Status Enable Register 4 11 Standard Event Status Register 8 8 status data structures 8 5 the error queue 4 16 TRG bit 4 10 4 15 Clearing Registers and Queues 4 17 to 4 18 clipped signals and raeasurement error 19 5 CLOCk and STATe 22 39 CLS Clear Stat
53. ERGe 20 4 MINimum 16 24 MNFound 27 12 29 20 MODE 11 11 18 8 22 31 MSPan 26 7 MULTiply 16 25 NWIDth 19 51 OFFSet 13 10 13 13 13 15 16 26 26 8 ONLY 16 27 OPC Operation Complete 8 12 Operation Complete OPC 8 12 Option COPT 8 13 OUTput 12 18 13 12 OVERshoot 19 53 PATtern 22 33 PERiod 19 55 PERSistence 15 22 POINts 11 12 POLYgon DEFine 28 30 POSition 21 6 PREamble 24 20 PREShoot 19 57 PROBe 23 4 PROTection 13 17 PWIDth 19 59 RANGe 13 19 16 28 21 7 26 9 RCL Recall 8 14 Recall RCL 8 14 REFerence 21 8 Reset RST 8 15 RESolution 26 10 RISetime 19 65 ROW 15 23 RST Reset 8 15 RUMode 28 32 RUN 27 14 29 21 Save SAV 8 20 SAVE 25 4 SCALe 13 21 21 9 SCALe DEFauit 28 35 SCALe SOURce 28 36 SCALe X1 28 38 SCALe XDELta 28 40 SCALe Y1 28 42 SCALe Y2 28 43 SCOLor 15 24 SCRatch 19 67 Index 2 SENDvalid 19 68 SENSitivity 13 22 Service Request Enable SRE 8 21 SKEW 12 21 SLOPe 22 36 SOURce 15 28 19 69 24 25 26 11 27 17 29 6 SOURce and TRIGger 22 37 SPAN 26 12 SRATe 11 14 SRE Service Request Enable 8 21 SSCReen 27 18 28 44 29 9 SSUMmary 27 36 28 56 29 12 STATe 22 38 S TATistics 1971 STORe 14 6 STRing 15 29 SUBTract 16 29 SWAVeform 27 37 28 62 29 8 23 10 29 14 29 16 SWEEp 22 44 to 22 49 22 54 to 22 55 TEST 27 39 28 64 29 7 TEXT 15 30 TRG Trigger 8 25 Trigger
54. Example Programs Limit Test Example Program ied Variables Num acq sub programs Tcount COM For cnt INTEGER Num acq M S need to pass num acq on intr REAL Resuits 1 27 1 9 parameters per measurement M 10 Num acq o CLEAR Partl ON INTR Isc 9 CALL Tcount Part2 1 OUTPUT S ltes sour 1 fail nev mnf pass run wav M OUTPUT 8S ltes sour 2 fail nev mnf pass run wav M OUTPUT 8S ltes sour 3 fail nev mnf pass run wav OUTPUT 85 stop cdis OUTPUT S ltes test on Part3 1 ENABLE INTR Isc 2 OUTPUT S srun t scope will wait for triggers PRINT SCREEN t Setup interupt Yf using the 8131A Start Generator NOW REPEAT t wait for limit test complet UNTIL Part i OUTPUT B5 meas reg ENTER CLEAR PRINT PRINT PRINT PRINT PRINT PRINT SUBEND Num acq M read summary of measurements amp s Results SCREEN a The results are the vpp mean is Results 4 the rise time mean is Results 13 and the width mean is Results 22 Results SUB Tcount i i i i i i i Descr iption Tcount will set Num acq to the stop value when the Lim Test Complete interupt occurs Parameters In Pasged COM For cnt INTEGER Num acq M Num acq the variable used to terminate at proper number M the number of acquisitions wanted termination value ternal None HP 54710 and HP 54720 7 35 Programmer s Reference 2129 2130 2131 2
55. LLO disables all front panel controls including the LOCAL key The only active control is the power switch This prevents undesired or accidental front panel control which could result in data or settings being changed The instrument accepts the Local Lockout command whether the instrument is addressed in the remote or local mode The instrument is returned to the local mode by either setting the REN line false or by sending the go to local command GTL to the instrument HP 54710 and HP 54720 2 7 Programmer s Reference Interface Functions Bus Commands Bus Commands The following commands are IEEE 488 1 bus commands ATN true IEEE 488 2 defines many of the actions that are taken when these commands are received by the instrument Device Clear The device clear DCL and selected device clear SDC commands clear the input buffer and output queue reset the parser and clear any pending commands If either of these commands is sent during a digitize operation the digitize operation is aborted Group Execute Trigger The group execute trigger GET command arms the trigger This is the same action produced by sending the RUN command Interface Clear The interface clear IFC command halts all bus activity This includes unaddressing all listeners and the talker disabling serial poll on all devices and returning control to the system controller Status Messages When the instrument is in the remote mode the Remote message
56. M MNimum MUL Tiply OFF Set ONLY RANGe SuBTract VERSus VERTical HARDcopy ADDress AREA BACKground DES Tination DE Vice FACTors FFEed FLEname LENGI MEDia HIST ogram AXIS MODE RUNI SCALe WINDow LTESt FAIL LLiMiIt MNFound RUN SOURCE SSCreen SSuMmory SWAVeform TEST ULM Marker CuRsor ME A Sur ement MODE TDEL ta TSTAr TSTOp YDELIG VSTArt vSTOp Position X2Position X1Y1source X2Y2spurce XDELta Y Position 2Peetion YDELta 54710803 EIN or ee ae ME ASure DEFine DEL Tatime DUTycycie FALL time FET FREQuency HiSTagram NWIDIh QVERshoo PERiod PREShoot PwIDth RESults RiSetime SCRatch SENDvatid SOURce STATistics TEDGe TMAX TMIN TVOLt VAMPlilude VAVerage VBASe VLOWer VMAX VMtDdle V MIN VPP VRMS VTiMe VTOP VUPper MTESE AMASK COUNT MASK POLYgon RUMode SCALe SSCReen SSUMmory SwAVetorm TEST Timebase DELay POSition RANGe REFerence SCALG VIEW WINDow TRIGger DEVents DTiMe EDGe GLiTch HOLDoff HYSTeresis LEVel MODE PATTern SLOPe SOURCe STATe SwEep STV SwEep UDTV TRIGger N BWL imit PROBe PMEMory ADD CLEAR DISPlay ERASe MERGe WME Mory lt N gt DiSPlay SAVe XOFFset XRANge YOFFset YRANge WAVeform BANDpass 8YTearder COMPlete COUNT COUP ling DATA FORMat POINIS PREambte SOURce TYPE VIEW XDiSploy XINCrement XORigin XRANge XREFerence XUNiis YDiSplay YIN
57. NT Rang 40 END After running this program the controller displays 8 1 18 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Definite Length Block Response Data Definite Length Block Response Data Definite length block response data allows any type of device dependent data to be transmitted over the system interface as a series of 8 bit binary data bytes This is particularly useful for sending large quantities of data or 8 bit extended ASCH codes The syntax is a pound sign followed by a non zero digit representing the number of digits in the decimal integer After the non zero digit is the decimal integer that states the nuraber of 8 bit data bytes being sent This is followed by the actual data For example for transmitting 4000 bytes of data the syntax would be 44000 4000 bytes of data terminator The 4 represents the number of digits that follow and 4000 represents the number of bytes to be transmitted Multiple Queries You can send multiple queries to the instrument within a single program message but you must also read them back within a single program message This can be accomplished by either reading them back into a string variable or into multiple numeric variables For example you could read the result of the query ITIMEBASE RANGE DELAY into the string variable Results with the command ENTER 707 Results When you read the result of multiple queries in
58. OSE ARCH SP 3 TRIGGER SP os lt white space white space icwhite spoce program mnemonic gt program mnemonic program ddto program date separator lt program dato TWAVEF ORM OSE ARCH 30 TRIGGER decimal numeric progrom dato program data 3e TRIGGER lt program message unit eeporator we H S program message termingtor SP NL lt program message unit white zt R aS epoce gt DELAY 3 8 ns ur d Cw program header program cud separator program dato DELAY 3 8 ns whites space decima program dato suffix program dato SP ns white space suffix multiplier suffix unit n 2 t 500 8L 31 program message Parse Tres HP 54710 and HP 54720 3 7 Programmer s Reference Message Communication and System Functions Syntax Overview Syntax Overview This overview is intended to give a quick glance at the syntax defined by IEEE 488 2 It will help you understand many of the things about the syntax you need to know IEEE 488 2 defines the blocks used to build messages that are sent to the instrument A whole string of commands can therefore be broken up into individual components Figure 3 1 is an example syntax diagram and figure 3 2 shows a breakdown of an example program message in the parse tree There are a few key items to notice A semicolon separates commands from one another Each program message unit serves as a co
59. TPUT 707 RST Initialize instrument to preset state OUTPUT 707 TIMEBASE RANGE 5E 4 Time base to 500 us K full scale OUTPUT 707 TIMEBASB DELAY 0 i Delay to zero OUTPUT 707 TIMEBASE REFERENCE CENTER 1 Display reference at center OUTPUT 707 CHANNEL1 PROBE 10 Probe attenuation to 10 1 OUTPUT 707 CHANNEL1 RANGE 1 6 Vertical range to 1 6 V full scale OUTPUT 707 CHANNBL1 0OFFSET 4 Offset to 0 4 OUTPUT 707 CHANNEL1 INPUT DC Coupling to DC OUTPUT 707 TRIGGER MODE EDGE Edge triggering OUTPUT 707 TRIGGER LEVEL chanl 4 Trigger level to 0 4 OUTPUT 707 TRIGGER SLOPE POSITIVE Trigger on positive slope OUTPUT 707 ACQUIRE TYPE NORMAL Normal acquisition OUTPUT 707 DISPLAY GRATICULE FRAME t Grid off END 1 14 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Using the Digitize Command Program Overview Line 10 initializes the instrument interface to a known state Line 20 initializes the instrument to a preset state Lines 30 through 50 set the time base mode to normal with the horizontal time at 500 us full scale with 0 s of delay referenced at the center of the graticule Lines 60 through 90 set the vertical range to 1 6 volts full scale with center screen at 0 4 volts with 10 1 probe attenuation and DC coupling Lines 100 through 120 configures the instrument to trigger at 0 4 volts with normal triggering Line 130 configures the instrument for normal acquis
60. YOFFset 25 6 YORigin 24 38 YRANge 25 6 YRANge 24 39 YREFerence 24 40 YUNits 24 41 to 24 42 Index 15 index Index 16
61. a combination of the two All three ways are equivalent Asserting the EOI sets the EOI control line low on the last byte of the data message The NL character is an ASCII linefeed decimal 10 Figure 5 11 Program Message gt 54709811 Karn HOO instruction Terminator HP 54710 and HP 54720 5 13 Programmer s Reference Programming Syntax instruction Terminator 5 14 HP 54710 and HP 54720 Programmer s Reference Programming Conventions Programming Conventions This chapter covers conventions used in programming the oscilloscope as well as conventions used throughout this manual A block diagram and description of data flow is included for understanding oscilloscope operations A detailed description of the command tree and command tree traversal is also included in this chapter 6 2 HP 54710 and HP 54720 Programmer s Reference Programming Conventions Data Flow Data Flow The data flow gives you an idea of where the measurements are made on the acquired data and when the post signal processing is applied to the data Figure 6 1 is a data flow diagram of the oscilloscope The diagram is laid out serially for a visual perception of how the data is affected by the oscilloscope Figure 6 1 Dismay Computer IMS 34070 Hos Computer 56020 F 3d4 p Fi 0 31 js mew Lid f ot d 4 i Rea Tine Real Time nigro BW Lint interpolation
62. am headers can be sent using any combination of uppercase or lowercase ASCII characters Instrument responses however are always returned in uppercase Program coramand and query headers may be sent in either long form complete spelling short form abbreviated spelling or any combination of long form and short form TIMEBASE DELAY 1US long form TIM DEL 1US short form Programs written in long form are easily read and are almost self documenting The short form syntax conserves the amount of controller memory needed for program storage and reduces the amount of 0 activity The rules for the short form syntax are shown in the chapter Programming Conventions Program Data Syntax Rules Program data is used to convey a variety of types of parameter information related to the command header At least one space must separate the command header or query header from the program data program mnemonic separator data terminator When a program mnemonic or query has multiple program data a comma separates sequential program data program mnemonic separator data data terminator For example MEASURE TVOLT 1 0V 2 has two program data 1 0V and 2 There are two main types of program data that are used in commands character and numeric program data 1 10 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Character Program Data Character Program Data Character
63. and cleared with the MTER query 4 14 HP 54710 and HP 54720 Programmer s Reference Status Reporting Histogram Event Register When either the COMP or FAIL bits are set they in turn set the MASK bit bit 10 of the Operation Status Register You can mask the COMP and FAIL bits thus preventing them from setting the MASK bit by defining a mask using the MTEE command Enable Mask Value Block COMP and FAIL 6 Enable COMP block FAIL 1 Enable FAIL block COMP 2 Enable COMP and FAIL 3 Histogram Event Register Bit 0 COMP of the Histogram Event Register is set when the Histogram completes The Histogram completion criteria are set by the HISTogram RUNTi command The Histogram Event Register is read and cleared with the HER query When the COMP bit is set it in turn sets the HIST bit bit 9 of the Operation Status Register Results from the Histogram Register can be masked by using the HEEN command to set the Histogram Event Enable Register to the value 0 You enable the COMP bit by setting the mask value to 1 Arm Event Register ARM This register sets bit 5 Wait Trig bit in the Operation Status Register and the OPER bit bit 7 in the Status Byte Register when the instrument becomes armed The ARM event register stays set until it is cleared by reading the register with the AER query or using the CLS command If your application needs to detect multiple triggers the ARM event register must be cleared after each one
64. ar address ranging from 0 to 30 The active controller specifies which devices talk and which listen Aninstrument may be talk addressed listen addressed or unaddressed by the controller If the controller addresses an instrument to talk the instrument remains configured to talk until it receives an interface clear message IFC another instrument s talk address OTA its own listen message MLA or a universal untalk command UNT If the controller addresses an instrument to listen the instrument remains configured to listen until it receives an interface clear message IFC its own talk address MTA or a universal unlisten command UNL HP 54710 and HP 54720 2 5 Programmer s Reference Interface Select Code Instrument Address Interface Functions Communicating Over the Bus Communicating Over the Bus Device addresses are sent by the controller in the command mode to specify who talks and who listens Since HP IB can address multiple devices through the same interface card the device address passed with the program message must include not only the correct interface select code but also the correct instrument address Device Address Interface Select Code 100 Instrument Address The examples in this manual assume that the oscilloscope is at device address 707 Each interface card has a unique interface select code This code is used by the controller to direct commands and communicat
65. atements PRINT PRINT PRESS continue to run program HP 54710 and HP 54720 7 11 Programmer s Reference 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 Example Programs Measurement Example Program PAUSE CLEAR SCREEN SUBEND SUB Initscope 8Scope Jede ee fe e ee de e dede ede jode de de f de i de d de de de ie ode de dede de dede e dede defe dete eed edel i This sub program initializes the I O and scope i de fede eode ded dede de dee dde ed de e ed EE EE EE E e e EEEE EEEE E EEEE d e e d RR ASSIGN 8Scope TO 707 CLEAR Scope tclear HP IB interface OUTPUT Scope cls OUTPUT Scope RST ireset scope to default config OUTPUT Scope SYSTEM HEADER OFF iturn off header CLEAR SCREEN SUBEND SUB True_rep Scope dede dede fe jede de dede dede e de dede ted de dede dede ede de dede de dee fede e de dede deed e vede dee de d hm i The first step of this demonstration is to show the true i signal in the equivalent time mode B seco dece ede de ee eoe e e e e e e e e fe ee ee e e e e e de de e e e e de d e e e de e e e fe de e e he de de o de de de de fe fn fe e n PRINT First see the true signal in the Equivalent Time mode PRINT PRINT ved dede de dede de dede de dede qe dede de dee e dee eie dee deed ode dr dede ed fe d
66. atime 19 18 DUTycycle 19 20 Contents 9 Contents FALLtime 19 22 FFT 19 24 FFT DFRequency 19 24 FFT DMAGnitude 19 25 FFT FREQuency 19 25 FFT MAGNitude 19 26 FFT PEAK1 19 26 FFT PEAK2 19 27 FFT THReshold 19 28 FREQuency 19 29 HISTogram HITS 19 31 HISTogram MEAN 19 38 HISTogram MEDian 19 35 HISTogram M1iS 19 37 HISTogram M2S 19 39 HISTogram M3S 19 41 HISTogram OFFSet 19 43 HISTogram PEAK 19 44 HlISTogram PP 19 46 HISTogram SCALe 19 48 HiSTogram STDDev 19 49 NWIDth 19 51 OVERshoot 19 53 PERiod 19 55 PREShoot 19 57 PWIDth 19 59 RESults 19 61 RiSetime 19 65 SCRatch 19 67 SENDvalid 19 68 SOURce 19 69 STATistics 19 71 TEDGe 19 72 TMAX 19 74 TMIN 19 76 TVOLt 19 78 Contents 10 20 21 22 Contents VAMPlitude 19 80 VAVerage 19 82 VBASe 19 84 VLOWer 19 86 VMAX 19 87 VMIDdle 19 89 VMIN 19 90 VPP 19 92 VRMS 19 94 VTIMe 19 96 VTOP 19 97 VUPper 19 99 Pixel Memory Commands Pixel Memory Commands 20 2 ADD 20 3 CLEar 20 3 DISPlay 20 3 ERASe 20 3 MERGe 20 4 Timebase Commands DELay 21 4 POSition 21 6 RANGe 21 7 REFerence 21 8 SCALe 21 9 VIEW 21 10 WINDow DELay 21 11 WINDow POSition 21 13 WINDow RANGe 21 14 WINDow SOURce 21 15 Trigger Commands Trigger Commands 22 2 Contents 11 Contents DEVents 22 8 DEVents ARM 22 9 DEVents EVENt 22 11 DEVents TRiGger 22 13 DTIMe 22 15 DTIMe ARM 22 16 DTIMe DELay 22 18 DTIMe TRiGger 22 19 EDGE 22 21 EDGE SLOPe 22 22 EDGE SOUR
67. ation to the computor t i i Parameters none i screen CLEAR SCREEN PRINT DIG 7XX ibw does the following tasks PRINT PRINT a initialize interface and scope PRINT l b digitize and acquire data PRINT C store data to disk PRINT d retrieve data from disk PRINT e draw signal on computer PRINT PRINT Assumed system configuration is PRINT PRINT HP IB address m 7 PRINT Scope address 7 PRINT signal attached to channel 1 PRINT PRINT If the addresses are not correct change the ASSIGN PRINT statements in sub program Initacope PRINT PRINT Press Continue when ready to start PAUSE CLEAR SCREEN SUBEND i SUB Readme2 Description Readme2 is user information and status H t Parameters none t CLEAR PRINT PRINT PRINT PRINT SCREEN The waveform data and preamble information have now been read from the scope and stored in the computer s disk 7 4 HP 54710 and HP 54720 Programmer s Reference Example Programs Digitize Example Program 642 PRINT When you press continue that information will be retrieved 650 PRINT from the disk and plotted to the computor screen 680 PRINT 690 PRINT Press CONTINUE to continue 700 PAUSE 710 CLEAR SCREEN 720 SUBEND 730 740 SUB Initscope 8Scope 750 i 760 i Description Initscope assigns the path to the scope initializes 761 i the scope autoscales and sets up the acquisiton 762 i parameters 763
68. ce 22 23 GLITch 22 24 GLITch POLarity 22 25 GLITch SOURce 22 26 GLITch WIDTh 22 27 HOLDoff 22 28 HYSTeresis 22 29 LEVel 22 30 MODE 22 31 PATTem 22 38 PATTern CONDition 22 34 PATTernLOGic 22 35 SLOPe 22 36 SOURce 22 37 STATe 22 38 STATe CLOCk 22 39 STATe CONDition 22 40 STATe LOGic 22 41 STATe SLOPe 22 42 STV 22 43 STV FIELd 22 44 STV LINE 22 45 STV SOURce 22 46 STV SPOLarity 22 47 STV STANdard 22 48 SWEep 22 49 Contents 12 23 24 Contents UDTV 22 50 UDTV ENUMber 22 51 UDTV PGTHan 22 52 UDTV PLTHan 22 53 UDTV SLOPe 22 54 UDTV SOURce 22 55 UDTV STATe 22 56 TriggerN Commands TriggerN Commands 23 2 BWLimit 23 3 PROBe 23 4 TRiGger STV FIELd Command Query 23 5 FIELd 23 5 TRiGger STV LINE Command Query 23 7 LINE command query 23 7 TRIGger STV SOURce Command Query 23 9 SOURce command query 23 9 TRIGger STV SPOLarity Command Query 23 10 POLarity command query 23 10 TRiGger STV STANdard Command Query 23 11 STANdard command query 23 11 TRiGger UDTV ENUMber Command Query 23 12 CONDitioncommand query 23 12 TRIGger UDTV SLOPe Command Query 23 14 OCCurence SLOPe coramand query 28 14 l TRIGgerUDTV SOURce Command Query 28 15 OCCurrence SOURce command query 23 15 TRIGger UDTV STATe Command Query 23 17 LOGic command query 23 17 Waveform Commands BANDpass 24 8 BYTeorder 24 9 COMPlete 24 11 Contents 13 25 26 Contents COUNt 24 12 COUPling 24 18 DATA 24 14 FORMat 24 17 POINts
69. ce to build up values 1170 OUTPUT Scope stop i See that values match ON SCREEN amp OVER HPIB 1180 OUTPUT Scope measure results 1190 ENTER Scope USING K R 1200 OUTPUT CRT Printing Results to your printer 1210 PRINT 1220 PRINT Statistics is St SendValid is Sv 1230 PRINT 1240 PRINT First value is R 1 1250 PRINT Second value is R 2 1260 PRINT Third value is R 3 1270 PRINT Fourth value is R 4 1280 PRINT Fifth value is R 5 1290 PRINT Sixth value is R 6 1300 PRINT Seventh value is R 7 1310 WAIT 5 7 20 HP 54710 and HP 54720 Programmer s Reference 1320 1330 1340 1350 CLEAR SCREEN NEXT C PRINTER IS CRT SUBEND Example Programs Results Measurement Example HP 54710 and HP 54720 Programmer s Reference 7 21 Example Programs Learn String Example Program Learn String Example Program 10 IRE SAVE LSTG7XX2 HP Basic for HP IB interface rev 2 0 20 36096 dee dede de de e dee e e e e de e de e he e ode e e ge e de de e e de dfe dede de e e e e dede de e de dede de de de d y x 30 1 This program reads and returns the learn string from and toa 40 1 547XX Oscilloscope 50 I ts dr dee dee ede de ded edd 60 dede ded dede e ht th het 70 I Begin MAIN PROGRAM 80 Jefe de de de eee e e e de e dede he ie e he ec de ee e e e e de he e de de dede e o e dd e dre dede dh Y s 90 COM Io 8Scope Hpib 100 Readme tDescription of the program 110 Init
70. copy output If a query message is sent the next message passing over the bus should be the response message The controller should always read the complete response message associated with a query message before sending another program message to the same instrument The instrument allows the controller to send multiple queries in one query message This is referred to as sending a compound query As noted later in this chapter multiple queries in a query message are separated by semicolons The responses to each of the queries in a compound query will also be separated by semicolons Commands are executed in the order they are received Protocol Exceptions If an error occurs during the information exchange the exchange may not be completed in a normal manner The following are some of the protocol exceptions Command Error A command error is reported if the instrument detects a syntax error or an unrecognized command header Execution Error An execution error is reported if a parameter is found to be out of range or if the current settings do not allow execution of a requested command or query Device specific Error A device specific error is reported if the instrument is unable to execute a command for a strictly device dependent reason 344 HP 54710 and HP 54720 Programmer s Reference Message Communication and System Functions Syntax Diagrams Query Error A query error is reported if the proper protocol
71. curacy Calibration Level 12 5 NORMAL acquisition type 11 16 NORMal and acquisition completion 11 6 MSPan in FUCNtion FFT command 16 13NORMal and hysteresis 22 29 MSS bit and STB 8 23 MTEE 9 26 MTER 9 27 MTESt Commands AMASk CReate 28 14 AMASKk SOURce 28 15 AMASK UNITs 28 17 AMASk XDELta 28 19 AMASK YDELta 28 21 MASK DEFine 28 28 POLYgon DEFine 28 30 RUMode 28 32 SCALe DEFault 28 35 SCALe SOURce 28 36 SCALe X1 28 38 SCALe XDELta 28 40 SCALe Y1 28 42 SCALe Y2 28 43 SSCReen 28 44 SSUMmary 28 56 SWAVeform 28 62 TEST 28 64 MTESt in MENU command 9 23 multi stot plug in best accuracy calibration 12 6 Multiple Functions within a Sub system 5 11 multiple instructions 5 10 Multiple numeric variables 1 19 Multiple program commands 1 12 multiple program data 1 10 Multiple Queries 1 19 Multiple subsystems 1 12 5 10 MULTiply 16 25 my listen address MLA 2 5 number of graphs 15 16 Numeric data 1 11 numeric program data 1 10 to 1 11 Numeric Program Data in Program Data 5 8 Numeric Variable Example 1 18 Numeric variables 1 18 NWIDth 19 51 to 19 52 o OFFSet 18 10 to 183 11 16 26 26 8 offset and gain of a probe 12 8 OFFSet in MEASure HlSTogram command 19 43 ONLY 16 27 OPC Operation Complete 8 12 OPC bit 8 7 8 9 OPEE 9 28 OPER bit 8 22 8 24 OPER 9 29 operands and time scale 16 3 operating the disk 14 2 Operation Complete OPC 8 12 Operat
72. d EOI The EOI bus control line follows the IEEE 488 2 standard without exception HP 54710 and HP 54720 l 6 11 Programmer s Reference Programming Conventions EO 6 12 HP 54710 and HP 54720 Programmer s Reference Example Programs Example Programs The programs listed in this chapter are the same as those on the disks provided with this programmer s reference The disks are provided in both LIF and DOS formats The disks contain some interactive files i e additional files are created while running the programs To preserve the original quality of the example programs disks make a copy of the originals and use the copy for running the programs 7 2 HP 54710 and HP 54720 Programmer s Reference 10 20 30 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 59 60 61 62 63 64 66 67 68 70 71 130 140 185 186 190 220 240 260 290 Example Programs Digitize Example Program Digitize Example Program DIG 7XX ibw Revision 3 Date 6 Description Main Routine Sub routines Sub programs Functiona Variable List Preamble Waveform i l i i i i i i i t t i t t i t J t i i i i 1 t 1 i t 1 Scope i REAL Preamble 1 Copyright c 1993 Hewlett Packard Co All rights reserved Contributor Colorado Springs Division Product Example Program G 9 93 Author Ed Mierzejewski DIG 7XX ibw autoscales to get amp waveform on
73. de e e de dee dede det e n END te c End of Main Program 1 Je de dede e e e e de de dede de de dede dede e dee e e e de de e de e de e e de ide e de dede e de e de def e e e de e de de dfe dee e ed fe Go e d d xA x i Eee de de de de ede he de de e cfe dec e e de e e e dede de e dede ede e de ede e doe dede e re e de dede de de de e de fen e de t f dr 14 Begin Sub Programs 1 Eee dede be de de ee die dede ede dede de ehe de euo de e d fe e e e eee de e ee d e e e den e e e de de ee e e d ode de dede n n i SUB Readme PRR de de de de de dede e dede ede e ede de de de de de de e fede e e ide e e e fe che ee fe e de dede de de e d f de fe de ede dede defe dede dede o v e A A gn 1 This sub program writes user program information to the screen t ede he eoe e dee e eode defe ee de cde ee e e e e ede e e e e de e e e e c e dee de dee de de f e d de de de d de e de dde d HAE CLEAR SCREEN PRINT This example program will setup and measure the cal PRINT signal from the 54721A with different sampling rates PRINT and statistics It shows the difference sampling rate PRINT makes when measuring a fast pulse PRINT PRINT The program assumes that the system is configured such that PRINT HP IB interface is at address 7 PRINT Scope is at address 7 PRINT A 54721A is installed into slots 1 amp 2 PRINT PRINT If these addresses are incorrect break program and set addresses PRINT as needed in the ASSIGN st
74. dent reasons QYE Query Error Indicates if the protocol for queries has been violated ROL Request Control Indicates whether the device is requesting control OPC Operation Complete Indicates whether the device has completed all pending operations OPER Operation Status Register indicates if any of the enabled conditions in the Operation Status Register have occurred Ras Request Service Indicates that the device is requesting service MSS Master Summary Status Indicates whether a device has a reason for requesting service ESB Event Status Bit Indicates if any of the enabled conditions in the Standard Event Status Register have occurred MAV Message Available Indicates if there is a response in the output queue MSG Message Indicates whether an advisory has been displayed USR User Event Register Indicates if any of the enabled conditions have occurred in the User Event Register TRG Trigger Indicates whether a trigger has been received LCL Local Indicates if a remote to local transition occurs FAIL Fail Indicates thatthe specified testhas failed COMP Complete Indicates that the specified test has completed LTEST Limit Test indicates if any of the enabled conditions have occurred in the Limit Test Register MTEST Mask Test indicates if any of the enabled conditions have occurred in the Mask Test Register HIST Histogram indicates if any of the enabled conditions have occurred in the Histogram Register WAIT TRIG Wait for Trigge
75. e 900 Jede ede de he ee dee ee e e cde ecc e e ee e de cde de de e e t e de e e e fe e de de dede deese dede de e d de x n t 910 i This sub program will make a width measurement 1 920 t It will also report the mean and standard deviations 1 930 FRR RAR E E E ES E EEES ESEESE EEEE EEEE EEE EEEE EEEE EEEE EEEIEE EEEE 940 CLEAR SCREEN 950 PRINT Measuring Waveform and Reporting Results 960 REAL R 1 12 970 dee dede le defe efe ide de dee e dee dee de dede de e e e e e e e ede de e de dedo eode de e e de de dede e e ee ede e ede e d e 980 Normally when making measurements they should be preceeded 990 by a DIGITIZE But because I have the scope setup like I 1000 want it from previous sub programs and I will be using the l 1010 t statistics I will not use the DIGITIZE command 1020 ERR de de dece e e de deca dee e e e e e ee le de e de de hehe e de dede e fe de de dee de e de de ie debe de dede de de d dede KY 1030 OUTPUT Scope measure source channell 1040 PRINTER IS 701 1050 FOR C 1 TO 4 1060 OUTPUT Scope run 1070 MAT R 0 1080 OUTPUT Scope measure statistics j INT C 3 1090 OUTPUT Scope measure sendvalid C MOD 2 1100 OUTPUT Scope measure statistics 1110 ENTER Scope St 1120 OUTPUT Scope measure sendvalid 1130 ENTER Scope Sv 1140 OUTPUT Scope measure pwidth 1150 OUTPUT CRT Measuring for 20 seconds to get good stats 1160 WAIT 20 t Give the measurements a chan
76. e Functions within a Subsystem 5 11 Common Commands within a Subsystem 5 12 Instruction Terminator 5 13 6 Programming Conventions Data Flow 6 3 Truncation Rule 6 5 The Command Tree 6 6 Infinity Representation 6 11 Sequential and Overlapped Commands 6 11 Response Generation 6 11 EO 6 11 7 Example Programs Example Programs 7 2 Digitize Example Program 7 3 Measurement Example Program 7 11 Results Measurement Example 7 18 Learn String Example Program 7 22 Service Request Example Program 7 27 Configuration Example Program 7 31 Limit Test Example Program 7 32 Contents 3 Contents Part 2 HP 54710 HP 54720 HP IB Command Reference 8 Common Commands CLS Clear Status 8 5 ESE Event Status Enable 8 6 ESR Event Status Register 8 8 IDN Identification Number 8 10 LRN Learn 8 11 OPC Operation Complete 8 12 OPT Option 8 13 RCL Recall 8 14 RST Reset 8 15 SAV Save 8 20 SRE Service Request Enable 8 21 STB Status Byte 8 23 TRG Trigger 8 25 TST Test 8 26 WAI Wait to Continue 8 27 9 Root Level Commands Status Reporting Data Structures 9 7 AER Arm Event Register 9 10 AUToscale 9 11 BLANk 9 13 CDISplay 9 14 DiGitize 9 15 ERASe 9 17 HEEN 9 18 HER 9 19 LER Local Event Register 9 20 LTEE 9 21 LTER 9 22 MENU 9 23 MERGe 9 24 MODel 9 25 Contents 4 Contents MTEE 9 26 MTER 9 27 OPEE 9 28 OPER 9 29 PRINt 9 30 RECall SETup 9 31
77. e Message Available bit bit 4 If there are no other messages in the Output Queue bit 4 MAV can be cleared as a result of reading the response to the STB command If bit 4 weight 16 and bit 5 weight 32 are set the program prints the sum of the two weights Since these bits were not enabled to generate an SRQ bit 6 weight 64 is not set 4 8 HP 54710 and HP 54720 Programmer s Reference Status Reporting Status Byte Register Example 1 The following example uses the STB query to read the contents of the oscilloscopes Status Byte Register when none of the register s summary bits are enabled to generate an SRQ interrupt 10 OUTPUT 707 SYSTEM HEADER OFF STB ifurn headers off 20 ENTER 707 Result Place result in a numeric variable 30 PRINT Result iPrint the result 40 End The next program prints 112 and clears bit 6 RQS of the Status Byte Register The difference in the decimal value between this example and the previous one is the value of bit 6 weight 64 Bit 6 is set when the first enabled summary bit is set and is cleared when the Status Byte Register is read by the serial poll command Example 2 The following example uses the HP BASIC serial poll SPOLL command to read the contents of the oscilloscopes Status Byte Register 10 Result SPOLL 707 20 PRINT Result 30 END Serial polling is the preferred method to read the contents of the Status Byte Register because it resets bit 6 and allows the
78. e command 12 22 STB Status Byte 8 23 to 8 24 STDDev in MEASure HISTogram command 19 49 to 19 50 STOP 9 35 Storage and retrieval 14 2 STORe 9 36 14 6 Store SCReen command 27 18 28 44 STRing 15 29 String Variable Example 1 18 String variables 1 18 string quoted 15 19 strings alphanumeric 1 11 Structure of commands 1 4 SUBTract 16 29 Suffix Multiplier 3 9 suffix multipliers 1 11 suffix multipliers in program data 5 8 Suffix Unit 3 10 Suffix units 3 10 summary bits 4 8 SWAVeform 28 62 to 28 63 SWAVeform in Limit TESt command 27 37 to 27 38 SWEep 22 49 switch mainframe calibration protect 12 3 plug in calibration protect 12 4 Syntax Diagram Common Commands 8 3 example 3 6 Marker Subsystem 18 3 to 18 4 Syntax diagrams Hardcopy Subsystem 17 3 to 17 4 IEEE 488 2 3 5 Syntax Diagrams definition 3 5 to 3 7 syntax error 30 4 syntax for programming 5 2 Syntax Overview 3 8 to 3 10 System Commands 10 2 DATE 10 4 DSP 10 5 to 10 6 ERRor 10 7 to 10 9 HEADer 10 10 KEY 10 11 to 10 16 LONGform 10 17 to 10 18 SETup 10 19 to 10 20 TIME 10 21 to 10 22 System Commands Syntax Diagram 10 3 system controller retuming control to 2 8 SYStem DISPlay and masking 15 21 SYSTEM SETUP and LRN 8 11 Index T talk listen mode 2 5 Talker code and capability 2 4 talker unaddressing 2 8 Talking to the Instrument 1 3 TDELta 18 9 TDLY and DTIMe 22 15 TEDGe
79. e instrument interrogates the required function and places the answer in its output queue The answer remains in the output queue until it is read or another command is issued When read the answer is transmitted across the bus to the designated listener typically a controller For example the query TIMEBASE RANGE places the current time base setting in the output queue Sending another command or query before reading the result of a query causes the output queue to be cleared and the current response to be lost This also generates an error in the error queue Figure 5 6 E I Simple Command a Compound Command Www Quary Syntax Queries can be used to find out how the instrument is currently configured They are also used to get results of rneasurements made by the oscilloscope with the query actually activating the measurement HP 54710 and HP 54720 5 7 Programmer s Reference Programming Syntax Program Data Program Data Program data are used to clarify the meaning of a command or query They provide necessary information such as whether a function should be on or off which waveform is to be displayed and more Spaces and Commas A space separates the header from the data When there is more than one data parameter the data parameters are separated by commas Character Program Data Character program data is used to convey parameter information as alpha or alphanumeric strings The available m
80. earn String Example Program PRINT B to exit INPUT A SELECT UPC A CASE 1 2 3 ENTER Path VAL A Set iread data from disk IF Set 1 1 i THEN tHave good data 1 Add command header to setup string and send entire string to scope OUTPUT Scope USING K SYSTEM SETUP Set ELSE CLEAR SCREEN PRINT Received bad data no string entered END IF CASE E Done 1 END SELECT UNTIL Done DEALLOCATE Set ASSIGN Path TO SUBEND 1 DEF FNStsize i IThe setup string size can varry dependant upon operating system trevision Must read the header to determine the proper lengths The format of the data is Nx X lt setup data string Then I tadd 5 for the bdat file management headers i COM Io Scope Hpib DIM Paign 1 INTEGER Length Cnt L ON TIMEOUT Hpib 3 CALL Tout tSet the bus timeout so if there is no bad data can t find ithe sign we will stop and let the operator knov OUTPUT Scope SYSTEM SETUP tQuery scope for the setup string Cnt REPEAT ENTER Scope USING A Psign tEnter a character at a time until find the sign It tindicates the beginning of the block header Cnt Cnt 1 IFN must keep track of the number of characters before the tsign for cases where the system headers are ON HP 54710 and HP 54720 7 25 Programmer s Reference 1770 1780 1790 1800 1810 1820 1830 1840 1850 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 1960 1970 Example Pro
81. ed to clarify the meaning of the instruction HP 64710 and HP 54720 1 5 Programmer s Reference Introduction to Programming instruction Header Instruction Header The instruction header is one or more mnemonics separated by colons that represent the operation to be performed by the instrument The command tree in figure 5 1 illustrates how all the mnemonics can be joined together to form a complete header see the Programming Conventions chapter The example in figure 1 1 is a command Queries are indicated by adding a question mark to the end of the header Many instructions can be used as either commands or queries depending on whether or not you have included the question mark The command and query forms of an instruction usually have different program data Many queries do not use any program data White Space Separator White space is used to separate the instruction header from the program data If the instruction does not require any program data parameters you do not need to include any white space In this manual white space is defined as one or more spaces ASCII defines a space to be character 32 in decimal Program Data Program data are used to clarify the meaning of the command or query They provide necessary information such as whether a function should be on or off or which waveform is to be displayed Each instruction s syntax definition shows the program data as well as the values they accept T
82. edede ede de ee det n CL AR SCREEN PRINT This example program will setup and measure the cal PRINT signal from the 54721A in the ET mode PRINT PRINT It measures the Positive Pulse Width with Statistics PRINT Then uses the RESULTS to report over the HPIB PRINT PRINT The report from the RESULTS varies depending on the status PRINT of STATISTICS ON OFF and SENDValid ON OFF PRINT PRINT This program will print the results for each of the cases PRINT PRINT The program assumes that the system is configured such that PRINT PRINT HP IB interface is at address 7 PRINT Scope is at address 7 PRINT A 54721A is installed into slots 1 amp 2 PRINT Printer at 701 PRINT 7 18 HP 54710 and HP 54720 Programmer s Reference Exampie Programs Results Measurement Example 420 PRINT If these addresses are incorrect break program and set addresses 430 PRINT as needed in the ASSIGN statements 440 PRINT 450 PRINT PRESS continue to run program 460 PAUSE 470 CLEAR SCREEN 480 SUBEND 490 1 500 SUB Initscope 8Scope 510 etd dee e de ee ee ee e ee ee ede de hee e e e e e e e ee de dee de dede de f dn ie dede defe dece eee dede ede deo sehe 520 i This sub program initializes the I O and scope 1 530 deseo tee de dede dede e eee e i b e e e e e e ee e de e de eoe dede d i e e e e e e e de de e dede ede de e de de en de 540 ASSIGN Scope TO 707 550 CLEAR Scope iclear HP IB in
83. ee dede de EE E PRINT Connect the HP 54721A Calibrator Output to the Input PRINT of the 54721A PRINT PRA EAA dedo ede de ded dede de oed e de dee jo dede dede ede EEES EEEE d e ddp n PRINT PRINT Press continue when ready to continue PAUSE CLEAR SCREEN OUTPUT Scope channell display on t t Turn on the calibrator signal on the 21 plug in OUTPUT Scope channell output on OUTPUT 8Scope acquire mode ETIME OUTPUT Scope autoscale OUTPUT Scope display persistence infinite i This completes the first setup FTE26 OUTPUT f Scope menu acquire PRINT Waiting 5 seconds for Autoscale to complete and to PRINT acquire a waveform WAIT 5 CLEAR SCREEN PRINT The displayed waveform on the 54720A is the true PRINT representation of the signal PRINT 7 12 HP 54710 and HP 54720 Programmer s Reference 870 880 890 900 910 920 930 940 950 960 970 980 990 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 1310 Example Programs Measurement Example Program PRINT The HP 54720A is in equivelent time mode PRINT Sampling rate is 500 MSa S PRINT Analog Bandwidth is 1 1 GHz PRINT PRINT Press Continue to Continue Save the True Waveform to a Pixel memory for later comparison PAUSE CLEAR SCREEN OUTPUT Scope pmemoryl
84. ely dependent on the programming language Throughout this manual HP 9000 Series 200 300 BASIC 5 0 is used in the examples of individual commands If you are using other languages you will need to find the equivalents of HP BASIC commands like OUTPUT ENTER and CLEAR in order to convert the examples The instructions listed in this manual are always shown between quotes in the example programs 1 4 HP 64710 and HP 54720 Programmer s Reference Introduction to Programming Device Address Device Address The location where the device address must be specified is also dependent on the programming language you are using In some languages this may be specified outside the output command In HP BASIC this is always specified after the keyword OUTPUT The examples in this manual assume the oscilloscope is at device address 707 When writing programs the address varies according to how the bus is configured Instructions Instructions both commands and queries normally appear as a string embedded in a statement of your host language such as BASIC Pascal or C The only time a parameter is not meant to be expressed as a string is when the instruction s syntax definition specifies block data such as learnstring There are only a few instructions that use block data Instructions are composed of two main parts The header which specifies the command or query to be sent The program data which provide additional information need
85. en the captive screws on both ends of the HP IB cable to avoid accidently disconnecting the cable during operation Up to fifteen HP IB compatible instruments including a controller can be interconnected in a system by stacking piggy backing connectors This allows the instruments to be connected in virtually any configuration desired as long as there is a path from the controller to every device operating on the bus Avoid stacking more than three or four cables on any one connector Multiple connectors produce leverage that can damage a connector mounting HP IB Default Startup Conditions The foliowing default HP IB conditions are established during power up HP IB local mode is active Localiockout is cleared The Request Service RQS bit in the status byte register is set to zero Allevent registers the Standard Event Status Enable Register Service Request Enable Register and the Status Byte Register are cleared HP 64710 and HP 54720 2 3 Programmer s Reference Table 2 1 Interface Functions interface Capabilities Interface Capabilities The interface capabilities of this oscilloscope as defined by IEEE 488 1 are listed in the following table Interface Capabilities Code Interface Function SH1 Source Handshake AHI Acceptor Handshake T5 Talker la Listener SRI Service Request RLI Remote Local PP1 Parallel Poll DCI Device Clear Dri Device Trigger co Controller 2 Driver Elect
86. ent Register Limit Test Register Histogram Register Mask Register Loco Event Register Limit Test Enable Register Histogram Enable Reg ster Mask Enobie Register Error Queue Key Queue User Event Register Operation Stotus Register Standard Event Status Register Status Reporting Overview Block Diagram The status reporting structure consists of the registers in figure 4 1 Trigger Event Register Mask Operation Status Enable Register Output Queue Mask Standard Event Status Enable Register Message Queue Status Reporting Service Request Enable Register Status Service Byte Register Request Generation Service Request SR Interrupt 54700809 to Controller Table 4 1 is a list of the bit definitions for the bit in the status reporting data structure HP 54710 and HP 54720 Programmer s Reference Table 4 1 Status Reporting Status Reporting Bit Definition Bit Description Definition PON Power On indicates power is turned on URG User Request indicates whether a front panel key has been pressed CME Command Error indicates whether the parser detected an error EXE Execution Error Indicates whether a parameter was out of range or inconsistent with the current settings DDE Device Dependent Error Indicates whether the device was unable to complete an operation for device depen
87. er Standard Event Status Enable Register To make it possible for any of the Standard Event Status Register SESR bits to be able to generate a summary bit first enable the bit Enable the bit by using the ESE Event Status Enable common command to set the corresponding bit in the Standard Event Status Enable Register Set bits are read with the ESE query For example suppose your application requires an interrupt whenever any type of error occurs The error related bits in the Standard Event Status Register are bits 2 through 5 The sum of the decimal weights of these bits is 60 Therefore you can enable any of these bits to generate the summary bit by sending OUTPUT 707 ESE 60 Whenever an error occurs it sets one of these bits in the Standard Event Status Register Because the bits are all enabled a summary bit is generated to set bit 5 ESB in the Status Byte Register If bit 5 ESB in the Status Byte Register is enabled via the SRE command an SRQ service request interrupt is sent to the external computer Standard Event Status Register bits that are not enabled still respond to their corresponding conditions that is thay are set if the corresponding event occurs However because they are not enabled they do not generate a summary bit to the Status Byte Register 4 12 HP 54710 and HP 54720 Programmer s Reference Status Reporting User Event Register UER User Event Register UER This
88. eration may be aborted by sending a Device Clear over the bus CLEAR 707 1 16 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Receiving Information from the Instrument Receiving Information from the Instrument After receiving a query command header followed by a question mark the instrument interrogates the requested function and places the answer in its output queue The answer remains in the output queue until it is read or another command is issued When read the answer is transmitted across the interface to the designated listener typically a controller The input statement for receiving a response message from an instrument s output queue typically has two parameters the device address and a format specification for handling the response message For example to read the result of the query command CHANNEL1 COUPLING you would execute the HP BASIC statement ENTER device address Setting Where device address represents the address of your device This would enter the current setting for the channel one coupling in the string variable Setting All results for queries sent in a program message must be read before another program message is sent For example when you send the query MEASURE RISETIME you must follow that query with an input statement In HP BASIC this is usually done with an ENTER statement Sending another command before reading the result of the query causes the
89. erting functions 16 21 K K 10 20 K and DATA 24 15 KEY 10 11 to 10 16 Key Queue 4 17 L languge for programming examples 1 2 LASerjet HARDcopy DEVice 17 9 LCL Local Event Register 4 13 Learn LRN 8 11 learn string 8 11 leamstring block data 1 5 LENGth 17 13 LER 9 20 LEVel in TRIGger command 22 30 LF HF reject input 13 8 13 16 Limit Test Commands 27 2 Limit Test Event Register 4 14 Limit Test Register LTER 4 14 LINE 15 19 linefeed 1 12 List of Error Messages 30 6 to 30 10 Listener code and capability 2 4 listeners unaddressing all 2 8 LLIMit in Limit TESt command 27 11 LOAD 14 5 Local Event Register LCL 4 13 Local Lockout LLO 2 7 local jockout default 2 3 S lacalinode 2 7 local mode default 2 3 lockout mode default 2 3 LOGic and STATe 22 41 Long form 1 10 long form instructions 5 4 LONG and Format 24 18 long form headers 1 10 LONGform 10 17 to 10 18 low pass filter internal 13 5 lower test limt 27 11 lower case headers 1 10 Lowercase 1 10 lowpass filter BWLimit 23 3 LRN Learn 8 11 10 20 LSBFirst and BYTeorder 24 9 LTEE 9 21 L TER Limit Test Register 4 14 LTER 9 22 LTESt Commands 27 41 FAIL 27 9 LLIMit 27 11 NMFound 27 12 RUN 27 14 SOURce 21 17 SSCReen 27 18 SSUMmary 27 30 SWAVeform 27 37 TEST 27 39 LTESt in MENU command 9 23 luminosity 15 25 M MIS in MEASure HISTogram command
90. es 28 26 COUNt WAVeforms 28 27 MASK DEFine 28 28 POLYgon DEFine 28 30 RUMode 28 32 SCALe DEFault 28 35 SCALe SOURce 28 36 SCALe X1 28 38 SCALe XDELta 28 40 SCALe Yl 28 42 SCALe Y2 28 43 SSCReen 28 44 SSCReen DDISk 28 46 SSCReen DDISk BACKground 28 47 SSCReen DDISk MEDia 28 48 SSCReen DDISk PFORmat 28 49 SSCReen DPRinter 28 50 SSCReen DPRinter ADDRess 28 51 SSCReen DPRinter BACKground 28 52 SSCReen DPRinter MEDia 28 53 SSCReen DPRinter PFORmat 28 54 SSCReen DPRinter PORT 28 55 SSUMmary 28 56 Contents 16 29 30 31 Contents SSUMmary ADDRess 28 58 SSUMmary MEDia 28 59 SSUMmary PFORmat 28 60 SSUMmary PORT 28 61 SWAVeform 28 62 TEST 28 64 Histogram Subsystem Histogram Commands 29 2 Histograms and the Database 29 3 AXIS 29 6 MODE 29 7 RUNTil 29 8 SCALe 29 9 SCALe OFFSet 29 10 SCALe RANGe 29 12 SCALe SCALe 29 14 SCALe TYPE 29 16 WINDow SOURce 29 17 WINDow XlPosition 29 18 WINDow X2Position 29 19 WINDow YlPosition 29 20 WINDow Y2Position 29 21 Error Messages Error Queue 30 8 Error Numbers 30 4 Command Error 30 4 Execution Error 30 5 Device or Oscilloscope Specific Error 30 5 Query Error 30 6 List of Error Messages 30 6 Algorithms Contents 17 Contents errr crveirere eA RCC ZN NM ULM LU MMMMMM ME ELM c E c df Contents 18 Part 1 1 Introduction to Programming 2 Interface Functions 3 Message Communication and System Functions 4 Status Reporting 5 Programming
91. ffset and YRANge 25 6 21 4 TVOLt 19 78 to 19 79 vertical range for FFT 26 9 TMAX 19 74 to 19 75 two wide plug in vertical scaling and functions 16 3 TMIN 19 76 to 19 77 calibration 12 5 vertical scaling and YRANge 25 6 top base and DEFine 19 14 TYPE 11 16 to 11 18 vertical units 13 23 TOPBase and DEFine 19 15 TYPE 24 26 to 24 27 video inverse 15 18 TRACKING MODE 18 23 types of program data 1 10 VIEW 9 40 21 10 24 28 to 24 29 transferring waveform data Waveform VIEW and BLANK 9 13 Commands 24 2 U VLOWer 19 86 transmission mode and FORMat 24 17 UEE 9 38 VMAX 19 87 to 19 88 TRANsparency HARDcopy MEDia UER User Event Register 4 13 VMIDdie 19 89 17 14 UER 9 39 VMIN 19 90 to 19 91 traversal rules 6 7 ULIMit in Limit TESt command 27 41 to voltage at center screen 13 10 Tree Traversal Examples 6 10 27 42 VOLTS as vertical units 13 23 Tree Traversal Rules 6 7 unaddressing all listeners 2 8 VPP 19 92 to 19 93 TRG Trigger 8 25 UNITs 13 23 VRMS 19 94 to 19 05 TRG Trigger Event Register 4 10 ATTenuation 13 24 VSTArt 18 15 to 18 16 TRG bit 8 22 8 24 OFFSet 13 25 to 13 26 VS TOp 18 17 to 18 18 TRG bit in the status byte 4 10 units vertical 13 23 VTIMe 19 96 TRG Event Enable Register 4 4 universal untalk UNT 2 5 VTOP 19 97 to 19 98 Trigger TRG 8 25 UNKnown vertical units 13 23 VUPPer 19 99 to 19 100 Trigger TRG Status Bit 4 4 upper test limit 27 41 Trigger Commands 22 2 u
92. g 4 2 event registers default 2 3 Event Status Bit ESB 4 4 Event Status Enable ESE Status Reporting 4 12 Event Summary Bit ESB 8 6 execution error and protocol 3 4 execution errors and command errors 30 4 execution of commands and order 3 4 exponential notation 1 11 FET in WAVeform SOURce command 24 25 FFT in WMEMory SAVE command 25 4 FFTMagnitude 16 16 FILEname 17 12 filenames 14 2 filter internal low pass 13 5 filtering 11 5 FISO 6 4 flow of acquired data 6 3 to 6 4 forever mode 27 14 28 32 FORmat 14 5 15 16 24 17 to 24 18 format of commands 1 4 exponential notation in program data 5 8 FORMat and DATA 24 16 Exponents 1 11 external triggering TRIGgerN 23 2 F FACTors 17 10 FACTors HARDcopy AREA 17 6 fail modes 27 9 Fail softkey 27 9 27 12 FAIL in Limit TESt command 27 9 to 27 10 fall time measurement setup 19 3 FALLtime 19 22 to 19 23 FFEed 17 11 FFT X1Y1source 18 21 FFT X2Y2source 18 22 FFT Commands 26 2 DisPlay 26 4 FREQuency 26 5 MAGNify 26 6 MSPan 26 7 OFFSet 26 8 RANGe 26 9 RESolution 26 10 SOURCce 26 11 SPAN 26 12 WINDow 26 13 FFT window type 26 13 FFT and BLANK command 9 13 FFT and DIGitize command 9 16 FFT and DISK STORe command 14 6 FFT and DISPlay ASSign command 15 7 FFT and STORe command 9 36 FFT and VIEW command 9 40 FFT in MENU command 9 23 formatting disks 14 5 formatting query
93. g sent This is followed by the actual data Figure 5 7 E Non Zero Digit Number of Bytes X 8 bit Date 7 Terminator 4700807 Block Data Syntax For example for transmitting 500 bytes of data the syntax would be 3500 lt 500 bytes of data terminator The 3 states the number of digits that follow and the 500 states the number of bytes to be transmitted HP 64710 and HP 64720 5 9 Programmer s Reference Programming Syntax Multiple Subsystems Multiple Subsystems Semi Colon You can send multiple instructions commands and queries for different subsystems on the same line by separating each instruction with a semi colon The colon following the semi colon enables you to enter a new subsystem for example CHANNELI RANGE 0 4 TIMEBASE RANGE 1 Multiple instructions may be any combination of compound and simple p commands Figure 5 8 i Compound Command E i Simple Command Selecting Multiple Subsystems 5 10 HP 64710 and HP 54720 Programmer s Reference Programming Syntax Multiple Functions within a Subsystem Multiple Functions within a Subsystem Semi Colon To execute more than one function within the same subsystem separate each function with a semi colon For example SYSTEM LONGFORM ON HEADER ON turms the long form on and the headers on Figure 5 9 subsystem C Salecting Multiple Functions within a Subsystem HP 54710 and HP 54720 5 11 Programmer s Reference Programm
94. g the program will run and save the 920 PRINT current setup to setup memory 1 then pause and allow you to 930 PRINT change the setup When you continue the original setup will 940 PRINT be restored 950 PRINT 960 PRINT The expected configuration is 970 PRINT The scope is at address 7 980 PRINT The HPIB is at address 7 990 PRINT 1000 PRINT If the configuration is different break program and set 1010 PRINT the addresses as required using the variables Hpib and 1020 PRINT Scope Then run again 1030 PRINT 1040 PRINT Press Continue when ready to resumen operation 1050 PRINT 1060 PAUSE 1070 CLBAR SCREEN 1080 SUBEND 1090 1100 SUB Readmel 1110 PRINT 1120 PRINT The current setup has been saved in setup memory 1 1130 PRINT 1140 PRINT Change the scopes setup from the front panel When you 1150 PRINT press continue the original setup will be restored 1160 PRINT 1170 BEEP 1180 PAUSE 1190 CLEAR SCREEN 1200 SUBEND 1210 1 1220 SUB Readme2 1230 PRINT The program has ended Thanks for trying our Save 1240 PRINT and Recall setup memories 1250 PRINT 1260 PRINT Now would you have the opportunity to edit the program 1270 PRINT to generate and error and see how the interupt masking 1280 PRINT works 1290 PRINT 1300 PRINT GOODBYE ks 1310 SUBEND HP 64710 and HP 54720 7 29 Programmer s Reference 1320 1330 1340 1350 1360 1370 1380 1390 1400
95. gister default 2 3 setting bits in the Service Request Enable Register 4 10 horizontal tracking 16 17 LCL bit 4 13 lower test limit 27 11 paper length 17 13 speed of printer 17 14 Standard Event Status Enable Register bits 4 12 time and date 10 21 TRG bit 4 10 upper test limit 27 41 voltage and time markers 18 2 setting up for programming 1 13 Setting Up the Instrument 1 14 SETup 10 19 to 10 20 setup recall 8 14 SETup in MENU command 9 23 setup storing 14 6 707 1 18 Short form 1 10 short form instructions 5 4 short form of mnemonics 6 5 short form headers 1 10 simple and compound commands combining 5 10 Simple command header 1 7 Simple Command Headers 1 7 5 5 SINGle 9 34 single wide plug in calibration 12 6 sample rate 11 14 SKEW in CALibrate command 12 21 SLOPe 22 36 slope conditions and triggering 22 21 SLOPe and STATe 22 42 softkey Fail 27 9 27 12 Ignore 27 12 Samples 28 33 Waveforms 27 14 28 33 software version reading 8 10 SOURce 15 28 19 69 to 19 70 24 25 26 11 SOURCE command and measurements 19 5 source for FFT 26 11 source for Limit Test 27 17 SOURce and GLITch 22 26 SOURce and TRIGger 22 37 source and WINDow SOURce 21 15 SOURce in Limit TESt command 27 17 space between header and data 1 10 spaces and commas 1 6 Spaces and Commas in Program Data 5 8 SPAN 26 12 SPAN in FUNCtion FFT command 16 14 speed of printer 17 1
96. grams Learn String Example Program UNTIL Psign e ENTER Scope USING A Psign iNext character tells the number of digits in the header ENTER Scope USING amp Psign amp D Length iLength is the number of data values to follow before the NL ALLOCATE Temp Length 1 ENTER 6Scope USING K Temp L 74Cnt VAL Psign Length DEALLOCATE Temp RETURN L FNEND I SUB Tout Branching here says that the HPIB bus was idle for 3 seconds tThis would be cause by reaching the end of the setup data without ifinding a sign CLEAR SCREEN PRINT Bad Data query aborted BEEP PAUSE SUBEND 7 26 HP 54710 and HP 54720 Programmer s Reference 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 Example Programs Service Request Example Program Service Request Example Program RE SAVE SRQ 7XX be e d de This program sets the Event Status Enable Register and the Service Request Enable Register so that an error will cause a service request and recalls that setup It also saves a setup to a setup memory DIM Query 15 Command 15 0 9000 COM Err Hpib Scope COM s s Epib 7 CLEAR Hpib Scope 7 Saddr Hpibt100 Scope Readme ASSIGN S TO Saddr ON INTR Hpib 15 CALL Ermsg CLEAR Saddr iSets the I O address iTells computer where to go on an err
97. he section Program Data Syntax Rules in this chapter has all of the general rules about acceptable values When there is more than one data parameter they are separated by commas Spaces can be added around the commas to improve readability 1 6 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Header Types Header Types There are three types of headers e Simple Command headers e Compound Command headers e Common Command headers Simple Command Header Simple command headers contain a single mnemonic AUTOSCALE and DIGITIZE are examples of simple command headers typically used in this instrument The syntax is program mnemonic terminator When program data must be included with the simple command header for example DIGITIZE CHANT white space is added to separate the data from the header The syntax is program mnemonic separator program data terminator Compound Command Header Compound command headers are a combination of two program mnemonics The first mnemonic selects the subsystem and the second mnemonic selects the function within that subsystem The mnemonics within the compound message are separated by colons For example To execute a single function within a subsystem subsystem function separator program data terminator For example CHANNEL1 BWLIMIT ON Combining Commands in the Same Subsystem To execute more than one function
98. he tree A leading colon or a program message terminator either an NL or EOI true on the last byte places the parser at the root of the command tree A leading colon is a colon that is the first character of a program header Executing a subsystem command places you in that subsystem until a leading colon or a program message terminator is found In the command tree of figure 6 2 use the last mnemonic in the compound header as a reference point for example RANGE Then find the last colon above that mnemonic TIMEBASE That is the point where the parser resides Any command below this point can be sent within the current program message without sending the mnemonics which appear above them for example REFERENCE HP 54710 and HP 54720 6 7 Programmer s Reference Figure 6 2 Common Commande CLS ESE ESR ON eL RN OPC OPT RCL RST aSAV SRE STE a TRG TST WA Command Tree Programming Conventions The Command Tree iroot p pepe pere AER SYSters ACCasre CALibrate CHANAet DISK DiSPiay AUToscale BLANK DATE Bw nit BEST Biwi imit DELete ASSign COiSpiay DSP COMPicte FRAMe OGPiay DiRectory COLunn OGitize ERRor COUNI OUT put NPut FORMat CGRade ERASE HEADer NTerpolate PLUG OFF Set LOAD DATA HEEN KEY MOOE PROGe OUTput STORe DC Lar HER LONGform PONIS SKEW PROBE DwAVeforn LER SETup SRATe STATus PROT ection FORMat LTEE TIME TYPE RANGe GRATicule LTER SCALe INVerse MTEE
99. heme used by the controller and the instrument to communicate This includes defining when it is appropriate for devices to talk or listen and what happens when the protocol is not followed Functional Elements Before proceeding with the description of the protocol a few system components should be understood Input Buffer The input buffer of the instrument is the memory area where commands and queries are stored prior to being parsed and executed It allows a controller to send a string of commands which could take some time to execute to the instrument and then proceed to talk to another instrument while the first instrument is parsing and executing commands Output Queue The output queue of the instrument is the memory area where all output data response messages are stored until read by the controller Parser The instrument s parser is the component that interprets the commands sent to the instrument and decides what actions should be taken Parsing refers to the action taken by the parser to achieve this goal Parsing and executing of commands begins when either the instrument recognizes a lt program message terminator gt defined later in this chapter or the input buffer becomes full If you wish to send a long sequence of commands to be executed and then talk to another instrument while they are executing you should send all the commands before sending the lt program message terminator gt Protocol Overview
100. i 410 SUB Readme 7 22 HP 54710 and HP 54720 Programmer s Reference 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 Example Programs Learn String Example Program sedendo e eee de efe ee eee ee eee fede fee dei e e eee e dece e dede e de e fei de de dn dede dee dedo deo de det t nA i This sub program displays a message about the program for the i user p odd efe eden ESE LEST EEE ES de de hee e de ede a eee e e d d e e e de de e d e e de de de de dee ef de den CLEAR SCREEN PRINT This sample program will prompt the user to set up the PRINT scope in three different configurations and will store PRINT them to the computer disk Any of the three configurations PRINT may then be recalled from the disk and sent to the scope PRINT PRINT The program assumes that the system is configured such that PRINT HP IB interface is at address 7 PRINT scope is at address 7 PRINT a signal is attached to channel 1 PRINT PRINT If these addresses are incorrect break program and set addresses PRINT as needed in the Initialize in the ABSIGN statements PRINT PRINT Press CONTINUE when ready to start Scope will first autoscale PRINT on signal on channel 1 and will then prompt for user to setup PRINT scope as desired before saving configurati
101. i Parameters 764 i Passed Scope the HPIB address of the scope 765 i Internal Isc interface select code of the HPIB interface 766 1 Modified Variables Scope and 8Isc 773 i E 774 CLEAR SCREEN 780 PRINT INITIALIZE 781 Assign paths 790 ASSIGN 8Isc TO 7 Interface Select Code 7 800 ASSIGN Scope TO 707 scope address 801 Init sys t 810 CLEAR flac clear HP IB interface 820 OUTPUT 8Scope RST CLS set scope to default config 830 OUTPUT Scope AUToscale 840 OUTPUT amp Scope SYStem HEADer OFF 850 Acq setup i 890 OUTPUT Scope ACQuire COMPlete 100 POINts 500 910 OUTPUT 8Scope WAVeform FORMat BYTE SOURCe CHANneli 91i i 920 Normally WORD data would be recommended because it allows better 930 t use of the full resolution of the scope especially in ET MODE 940 t Byte data is shown because HPBasic doesn t recognize signed bytes 950 1 and requires a conversion FNBcon will do the conversion 960 i 980 CLEAR SCREEN 990 SUBEND 1000 i 1010 SUB Get_waveform Scope INTEGER Waveform REAL Preamble 1020 1 1021 t Description Get waveform digitizes the autoscaled waveform 1022 i gets wavefrom data and preamble after the operator 1023 adjusts the display to show the data as desired HP 54710 and HP 54720 7 5 Programmer s Reference 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1063 1064 1065 1066 1067 1068 1069 1070 1072 1073 1074 1075 10
102. in a learnstring 1 5 data in a program 1 6 data mode 2 5 Data Structures and Status Reporting 4 6 to 4 7 9 7 to 9 9 data transmission mode and FORMat 24 17 data multiple program 1 10 DATE 10 4 dBm offset 26 8 DCOLor 15 14 DDE bit 8 7 8 9 DECibel PROBe 23 4 decimal 10 ASCII linefeed 5 13 decimal 32 ASCII space 1 6 Decision Chart for Status Reporting 4 18 default HP IB conditions 2 3 default oscilloscope address 2 6 DEFine 19 14 to 19 17 define measure reset conditions 8 18 defining functions 16 2 Definite Length Block Response Data 1 18 5 9 DELay 21 4 to 21 5 delay values and functions 16 3 delay and WINDow DELay 21 11 DELete 14 4 deleting files 14 4 delta time and DEFine 19 14 DELTatime 19 18 to 19 19 DELTatime and DEFine 19 14 derivative of functions 16 9 DESKjet CHARDcopy DEVice 17 9 DESTination 17 8 DEVents in TRiGger command 22 8 ARM 22 9 to 22 10 EVENt 22 11 to 22 12 TRIGger 22 13 to 22 14 DEVice 17 9 device address 1 3 1 5 5 4 device addresses 2 6 device clear DCL 2 8 Device Clear code and capability 2 4 Device Dependent Error DDE Status Bit 4 4 Device Trigger code and capability 2 4 Device or Oscilloscope Specific Error 30 5 device dependent data 1 19 5 8 device specific error and protocol 3 4 DFREQuency in MEASure FFT command 19 24 DIFF 16 9 digital bandwidth limit filter 11 5 DiGitize 9 15 to 9 16 DiGitize Command
103. in the designated variable Figure 5 2 m String x Numeric Variable 54780362 HP Basic Syntax for Receiving Responses HP 64710 and HP 54720 6 3 Programmer s Reference Programming Syntax Device Address Device Address The examples in this manual assume the oscilloscope is at device address 707 In HP BASIC the address is specified after the keyword OUTPUT or ENTER In actual programs the number you use varies according to how you have configured the bus for your application Instructions Instructions can be sent to the oscilloscope in either the long form complete spelling or the short form abbreviated spelling Upper case and lower case letters may be mixed freely When receiving responses from the instrument upper case letters are used exclusively The use of the long form or short form in a response depends on the setting you last specified with the SYSTEM LONGFORM command Instructions are composed of two main parts The header which specifies the command or query to be sent The program data which provide additional information needed to clarify the meaning of the instruction 5 4 HP 54710 and HP 54720 Programmer s Reference Programming Syntax Instruction Header Instruction Header Colons The instruction header is one or more mnemonics separated by colons that represent the operation to be performed by the instrument There are three types of headers e Simple Command heade
104. ing Syntax Common Commands within a Subsystem Common Commands within a Subsystem Common commands can be received and processed by the oscilloscope whether they are sent over the bus as separate program messages or within other program messages If a subsystem has been selected and a common command is received by the oscilloscope the instrument remains in the selected subsystem For example if the program message iACQUIRE TYPB AVERAGE CLS COUNT 1024 is received by the oscilloscope the oscilloscope sets the acquire type and count then clears the status information without leaving the selected subsystem If some other type of command is received within a program message you must reenter the original subsystem after the command For example the program message ACQUIRE TYPE AVERAGE AUTOSCALE ACQUIRE COUNT 1024 sets the acquire type completes the autoscale operation then sets the acquire count In this example ACQUIRE must be sent again after the AUTOSCALE command in order to reenter the acquire subsystem and set count Figure 5 10 Subsys tem Selecting Common Commands within a Subsystem 5 12 HP 54710 and HP 54720 Programrner ss Reference Programming Syntax Instruction Terminator Instruction Terminator The instructions within the program message are executed after the instruction terminator is received The terminator may be either a New Line NL character and End Or Identify EOD asserted or
105. ing headers and alpha arguments The mnemonic is the first four characters of the keyword unless the fourth character is a vowel Then the mnemonic is the first three characters of the keyword If the length of the keyword is four characters or less this rule does not apply and the short form is the same as the long form The following table shows how the truncation rule is applied to various commands Mnemonic Truncation Long Form Short Form How The Rule is Applied RANGE RANG Short form is the first four characters of the keyword PATTERN PATT Short form is the first four characters of the keyword TIME TIME Short form is the same as the long form DELAY DEL Fourth character is a vowel short form is the first three characters HP 54710 and HP 54720 6 5 Programmer s Reference Programming Conventions The Command Tree The Command Tree The command tree in figure 6 2 shows all of the commands in this oscilloscope and the relationship of the commands to each other The IEEE 488 2 common commands are not listed as part of the command tree since they do not affect the position of the parser within the tree When a program message terminator NL linefeed ASCII decimal 10 or a leading colon is sent to the instrument the parser is set to the root of the command tree Command Types The commands in this instrument can be placed into three types Common commands root level commands and subsystem command
106. ion Complete OPC Status Bit 4 4 operation status 4 2 Operation Status Register OPR 4 13 OPR Operation Status Register 4 13 OPT Option 8 13 OPT Option 8 13 Option C OPT 8 13 Options Program Headers 1 10 order of commands and execution 3 4 Oscilloscope Data Flow 6 3 oscilloscope default address 2 6 other talk address OTA 2 5 OUTput 13 12 output buffer 1 9 Index 8 Index Output Command 1 4 output format 17 9 output queue 1 9 3 3 4 17 clearing 2 8 default condition 3 4 definition 3 3 output queue and query results 5 7 OUTPUT statement 1 3 OUTput in CALibrate command 12 18 overlapped and sequential commands 6 11 overioad protection 13 17 OVERshoot 19 53 to 19 54 P PAINtjet HARDcopy DEVice 17 9 PAPer HARDcopy MEDia 17 14 paper length setting 17 13 Parallel Poll code and capability 24 parametric measurements 19 2 Parse tree 3 7 Parse Tree example 3 7 Parser 1 18 3 3 default condition 3 4 definition 3 3 resetting 2 8 passing values across the bus 1 9 passive probes and calibration 12 8 PATTern in TRiGger command 22 33 CONDition 22 34 LOGic 22 35 PCX HARDcopy DEVice 17 9 ERASe 20 3 pixel memory storing 14 6 Plug in Calibration 12 4 PLUGin in CALibrate command CANcel 12 19 CONTinue 12 19 DONE 12 19 MEMory 12 20 STARt 12 20 TIME 12 20 POINts 11 12 to 11 13 points in an acquisition 11 12 POINts 24 19 POLarit
107. ion the array for the waveform data After data is tread in one extra byte read to clear the line feed 10 iattached to the end of the scope s output buffer i 7 6 HP 54710 and HP 54720 Programmer s Reference 1300 1310 1320 1330 1340 1370 1380 1390 1400 1410 1420 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1490 1500 1510 1520 1530 1540 1550 1551 1552 1560 1561 1562 1563 1564 1565 1590 1600 1610 1620 1630 1640 Example Programs Digitize Example Program REDIM Waveform l Length ENTER Scope USING B Waveform ENTER Scope USING K B End OUTPUT Scope WAVEFORM PREAMBLE ENTER 8Scope Preamble ELSE PRINT BAD DATA END IF SUBEND 1 SUB Save waveform 8Path INTEGER Waveform REAL Preamble e ve p Po e C po m pm m M yo Description Save waveform sends acquired data and preamble to the computor s disk It is stored in WAVESAMPLE If WAVESAMPLE already exist it will be purged then a new one created Parameters Passed Path Waveform Preamble Internal none Modified Variables none Sub programs Ertrap ON ERROR CALL Ertrap CREATE BDAT WAVESAMPLE 1 4080 ASSIGN 8Path TO WAVESAMPLE OUTPUT Path Waveform Preamble SUBEND t SUB Retrieve wave Path INTEGER Waveform REAL Preamble pe pe eo pe V e v Description Retrieve wave reads data and preamble stored in WAVESAMPLE Parameters Passed
108. ions to the proper interface The default is typically 7 for HP IB controllers Each instrument on the HP IB must have a unique instrument address between decimal 0 and 30 This instrument address is used by the controller to direct commands and communications to the proper instrument on an interface The default is typically 7 for this oscilloscope This address can be changed in the HP IB menu of the Utility menu of the oscilloscope Address 21 is usually reserved for the Computer interface Talk Listen address and should not be used as an instrument address 2 6 HP 64710 and HP 54720 Programmer s Reference Interface Functions Remote Local and Local Lockout Remote Local and Local Lockout The remote local and local lockout modes are used for various degrees of front panel control while a program is running The instrument accepts and executes bus commands while in the local mode with all front panel controls active The instrument is placed in the remote mode when the controller sets the Remote Enable REN bus control line true and addresses the instrument to listen In the remote mode all controls except the power switch and the front panel LOCAL key are entirely locked out Local control can only be restored by the controller or by pressing the front panel LOCAL key Cycling the power also restores all front panei controls local mode but this also resets certain HP IB states The Local Lockout command
109. isters or queues If the Status Byte Register is to be used with the Service Request Enable Register to set bit 6 RQS MSS and to generate an SRQ at least one of the summary bits must be enabled then set Also event bits in all other status registers must be specifically enabled to generate the summary bit that sets the associated summary bit in the Status Byte Register The Status Byte Register can be read using either the STB Common Command or the HP IB serial poll command Both commands return the decimal weighted sum of all set bits in the register The difference between the two methods is that the serial poll command reads bit 6 as the Request Service RQS bit and clears the bit which clears the SRQ interrupt The STB command reads bit 6 as the Master Summary Status MSS and does not clear the bit or have any affect on the SRQ interrupt The value returned is the total bit weights of all of the bits that are set at the present time The use of bit 6 can be confusing This bit was defined to cover all possible computer interfaces including a computer that could not do a serial poll The important point to remember is that if you are using an SRQ interrupt to an external computer the serial poll command clears bit 6 Clearing bit 6 allows the oscilloscope to generate another SRQ interrupt when another enabled event occurs No other bits in the Status Byte Register are cleared by either the STB query or the serial poll except th
110. ition Line 140 turns the grid off Using the Digitize Command The Digitize command is a macro that captures data satisfying the specifications set up by the acquire subsystem When the digitize process is complete the acquisition is stopped The captured data can then be measured by the instrument or transferred to the controller for further analysis The captured data consists of two parts the waveform data record and the preamble After changing the oscilloscope configuration the waveform buffers are cleared Before doing a measurement the Digitize command should be sent to ensure new data has been collected The DIGITIZE command can be sent without parameters for a higher throughput Refer to the DIGITIZE command in the Root Level Commands chapter for details When the DIGITIZE command is sent to an instrument the specified channel signal is digitized with the current ACQUIRE parameters To obtain waveform data you must specify the WAVEFORM parameters for the waveform data prior to sending the WAVEFORM DATA query HP 54710 and HP 54720 1 15 Programmer s Reference Introduction to Programming Using the Digitize Command The number of data points comprising a waveform varies according to the number requested in the ACQUIRE subsystem The ACQUIRE subsystem determines the number of data points type of acquisition and number of averages used by the DIGITIZE command This allows you to specify exactly what the digitized i
111. lizes the instrument to a preset state The actual commands and syntax for initializing the instrument are discussed in the chapter Common Commands Refer to your controller manual and programming language reference manual for information on initializing the interface Autoscale The AUTOSCALE feature of Hewlett Packard digitizing oscilloscopes performs a very useful function on unknown waveforms by setting up the vertical channel time base and trigger level of the instrument The syntax for the autoscale function is AUTOSCALE terminator HP 64710 and HP 64720 1 13 Programmer s Reference 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 Introduction to Programming Example Program Setting Up the Instrument A typical oscilloscope setup would set the vertical range and offset voltage the horizontal range delay time delay reference trigger mode trigger level and slope A typical example of the commands sent to the oscilloscope are CHANNEL1 PROBE 10 RANGE 16 0FFSET 1 00 terminator STIMEBASE MODE NORMAL RANGE 1R 3 DELAY 100R 6 terminator This example sets the timebase at 1 ms full scale 100 us div with delay of 100 us Vertical is set to 16 V full scale 2 V div with center of screen at 1 V and probe attenuation of 10 Example Program This program demonstrates the basic command structure used to program the oscilloscope CLEAR 707 Initialize instrument interface OU
112. loped using a 13A inatalled in slot 1 of a 54710A The HPIB card is assumed to be at interface select code 7 and Lhe scope is at address 7 Ensure all of this is correct before continuing press continue when through reading this SCREEN SUB Set scope fS i i i i t i i Description Set scope has 2 parts 1 initialize the scope and i o 2 set for RT acqires and measurement of the pulses Parameters P assed 8S Scope specific scope s address Internal Modified Variables None Part i OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT Initialize for RT to measure pulses s rst cls s sopee 256 Unmasks the Lim Tst Comp bit 65 sre 128 Unmasks the oper bit see Ltest s disp grat fram 6S blan chan2 view chani i 54710 only has 2 chan s avail S acq mode rtim srat 2E9 poin 512 S schani bwl off disp on inp dc50 offs O prob l rat scal 5 65 tim pos 10E 9 scal 2 5E 9 HP 54710 and HP 54720 7 33 Programmer s Reference Example Programs Limit Test Example Program 1150 OUTPUT S trig swe trig sour trigl lev trigi 5 1190 Part 2 Set Measurements 1200 OUTPUT 88 meag send off stat on sour chani 1201 i 1202 1 Turn off sendvalid on statistics and sets source to channel i 1203 i 1210 OUTPUT 8S meas vpp ris pwid 1220 SUBEND 1230 1240 SUB Set paths f8Scope Isc 1250 1 1260 1 Description Set
113. mands DELete 14 4 DiRectory 14 4 FORMat 14 5 LOAD 14 5 STORe 14 6 Display Commands ASSign 15 7 CGRade 15 8 CGRade LEVels 15 10 COLumn 15 11 DATA 15 12 DCOLor Default COLor 15 14 DWAVeform Draw WAVeform 15 15 FORMat 15 16 GRATicule 15 17 INVerse 15 18 LINE 15 19 MASK 15 20 PERSistence 15 22 Contents 7 16 Contents ROW 15 23 SCOLor 15 24 SOURce 15 28 STRing 15 29 TEXT 15 30 Function Commands ADD 16 8 DiFFerentiate 16 9 DISPlay 16 10 DIVide 16 11 FFT FREQuency 16 12 FFT MAGNify 16 12 FFT MSPan 16 13 FFT RESolution 16 13 FFT SPAN 16 14 FFT WINDow 16 14 FFTMagnitude 16 16 HORizontal 16 17 HORizontal POSition 16 18 HORizontal RANGe 16 19 INTegrate 16 20 INVert 16 21 MAGNify 16 22 MAXimum 16 23 MINimum 16 24 MULTiply 16 25 OFFSet 16 26 ONLY 16 27 RANGe 16 28 SUBTract 16 29 VERSus 16 30 VERTical 16 31 VERTical OFFSet 16 32 VERTical RANGe 16 33 Contents 8 17 Contents Hardcopy Commands ADDRess 17 5 AREA 17 6 BACKground 17 7 DESTination 17 8 DEVice 17 9 FACTors 17 10 FFEed Form FEed 17 11 FILEname 17 12 LENGth 17 13 MEDia 17 14 18 Marker Commands 19 CURSor 18 6 MEASurement READout 18 7 MODE 18 8 TDELta 18 9 TSTArt 18 10 TSTOp 18 12 VDELta 18 14 VSTArt 18 15 VSTOp 18 17 XlPosition 18 19 X2Position 18 20 XlYlsource 18 21 X2Y2source 18 22 XDELta 18 23 YiPosition 18 24 Y2Position 18 25 YDELta 18 26 Measure Commands DEFine 19 14 DELT
114. mation from the Instrument 1 17 Receiving Responses 5 3 RESults 19 61 to 19 64 retrieval and storage 14 2 LTER Limit Test Event Register 9 22 MENU 9 23 MERGe 9 24 MTEE Mask Test Event Enable 9 26 MTER Mask Test Event Register 9 27 OPEE Operation Status Event Enable 9 28 OPER Operation Status Register 9 29 PRINt 9 30 RECall 9 31 RUN 9 32 SINGIe 9 34 STOP 9 35 STORe 9 36 TER Trigger Event Register 9 37 UEE User Event Enable 9 38 UER User Event Register 9 39 Root Level Commands Syntax Diagram 9 3 ROW 15 23 RQC Request Control Status Bit 4 4 RQC bit 8 7 8 9 RQS Request Service default 2 3 RQS Request Service Status Bit 4 4 RQS and STB 8 23 RQS MSS bit 8 24 RST Reset 8 15 to 8 19 15 21 RTIMe 11 11 rule of truncation 6 5 rules of traversal 6 7 RUN 9 32 28 32 to 28 34 RUN and GET commands relationship 2 8 RUN in Limit TESt command 27 14 to returning control to system controller 2 8 27 16 rise time measurement setup 19 3 RiSetime 19 65 to 19 66 RMS voltage and VRMS 19 94 Root Level Commands 9 2 9 33 9 40 AER 9 10 AU Toscale 9 11 BLANK 9 13 CDiSplay 9 14 DiGitize 9 15 ERASe 9 17 RUNTII in HISTogram command 29 8 S Sample RATe 11 14 to 11 15 sample rate and bandwidth limit 11 5 sample rate and number of points 11 12 Samples softkey 28 33 sampling mode 11 11 saturation 15 25 Satus Reporting Decision Chart 4
115. mber 8 10 IEEE 488 1 3 2 IEEE 488 1 and IEEE 488 2 relationship 8 2 IEEE 488 1 definitions for the interface 2 2 IEEE 488 2 3 2 Standard 1 2 Standard Status Data Structure Model 4 2 IEEE 488 2 compliance 3 2 IEEE 488 2 conformity 1 2 IEBE 488 2 syntax diagrams defined 3 8 Ignore softkey 27 12 image specifier K 10 20 image specifiers and DATA 24 15 image specifiers and PREamble 24 21 impedance input 13 8 13 16 individual commands language 1 2 Infinity Representation 6 11 Initialization 1 13 event status 4 2 INPut 13 8 to 13 9 input buffer 3 3 clearing 2 8 default condition 3 4 input coupling and COUPling 24 13 Instruction Header 1 6 5 5 to 5 6 Instruction headers 1 6 Instruction Terminator 5 13 to 5 14 Instructions 1 4 5 4 instrument address 2 6 Instrument Status 1 20 integer definition 1 11 integer in syntax definition 5 8 INTegrate 16 20 Interface Capabilities 2 4 interface clear IFC 2 8 interface clear message IFC 2 5 Interface Functions 2 2 Interface Select Code 2 6 interface initializing 1 13 internal low pass filter 13 5 internal lowpass filter BWLimit 23 3 INTerpolate 11 10 INTERPOLATE acquisition type 11 16 Index 6 INTerpolate and acquisition completion 11 6 interpolator and data flow 6 4 interpreting commands parser 3 3 interrupted query 1 9 introduction to Programming 1 2 INVerse 15 18 inverse video 15 18 INVert 16 21 inv
116. n factors 12 4 Index 4 index embedded commands 5 12 Embedded strings 1 3 1 5 1 12 5 8 Embedded Strings in Program Data 5 8 Enable Register 8 4 End Of String EOS 1 12 End Of Text EOT 1 12 End Or Identify O 1 12 Example Program 1 14 Example Program in initialization 1 14 Example Programs 7 2 exceptions to protocol 3 4 EXE bit 8 7 8 9 executing DIGITIZE 11 2 Execution Error 30 5 End Or Identify EOI as terminator 5 13 Execution Error EXE Status Bit 4 4 ENGlish HARDcopy LENGth 17 18 ensemble count and type 11 9 EO End Or Identify 1 12 EO and IEEE 488 2 6 11 to 6 12 EOS End Of String 1 12 EOT End Of Text 1 12 EPSon HARDcopy DEVice 17 9 equipment for calibration 12 3 equivalent time mode 11 11 equivalent time mode and data flow 6 4 ERASe 9 17 20 3 E error query interrupt 1 9 error in measurements 19 3 Error Messages 30 2 Error Messages table 30 7 Error Numbers 30 4 Error Queue 30 3 error queue and query results 5 7 error queue overflow 30 3 Error Queue and Status Reporting 4 16 ERRor 10 7 to 10 9 errors exceptions to protocol 3 4 ESB Event Status Bit 4 4 ESB Event Summary Bit 8 6 ESB bit 8 22 8 24 ESE Event Status Enable 8 6 to 8 7 ESE 8 6 ESR Event Status Register 8 8 to 8 9 ESR Standard Event Status Register 4 1 ETIMe 11 11 Event Delay Triggering mode 22 8 event monitorin
117. nemonics for program data are listed with the individual commands in this manual Numeric Program Data With numeric program data you have the option of using exponential notation or using suffix multipliers to indicate a numeric value The following numbers are all equal 28 0 28E2 280E 1 28000m 0 028K 28E 3K When a syntax definition specifies that a number is an integer that means the number should be whole without any fractional part or decimal point Embedded Strings Embedded strings contain groups of alphanumeric characters that are treated as a unit of data by the oscilloscope For example the line of text written to the advisory line of the oscilloscope with the SYSTEM DSP command Embedded strings may be delimited with either single or double quotes These strings are case sensitive and spaces act as legal characters just like any other character 5 8 HP 54710 and HP 54720 Programmer s Reference Programming Syntax Program Data Block Data Definite length block response data block data allows any type of device dependent data to be transmitted over the bus as a series of 8 bit binary data bytes This is particularly useful for sending large quantities of data or 8 bit extended ASCII codes The syntax is a pound sign followed by a non zero digit representing the number of digits in the decimal integer After the non zero digit is a decimal integer that states the number of 8 bit data bytes bein
118. next enabled event that occurs to generate a new SRO interrupt HP 54710 and HP 54720 4 9 Programmer s Reference Example Status Reporting Service Request Enable Register Service Request Enable Register Setting the Service Request Enable Register bits enable corresponding bits in the Status Byte Register These enabled bits can then set RQS and MSS bit 6 in the Status Byte Register Bits are set in the Service Request Enable Register using the SRE command and the bits that are set are read with the SRE query Refer to figure 4 2 The following example sets bit 4 MAV and bit 5 ESB in the Service Request Enable Register OUTPUT 707 SRE 48 This example uses the parameter 48 to enable the oscilloscope to generate an SRQ interrupt under the following conditions When one or more bytes in the Output Queue set bit 4 MAV When an enabled event in the Standard Event Status Register generates a summary bit that sets bit 5 ESB Trigger Event Register TRG This register sets the TRG bit in the status byte when a trigger event occurs The TRG event register stays set until it is cleared by reading the register or using the CLS command If your application needs to detect multiple triggers the TRG event register must be cleared after each one If you are using the Service Request to interrupt a program or controller operation when the trigger bit is set then you must clear the event register afte
119. nformation contains The following program example shows a typical setup OUTPUT 707 ACQUIRE TYPE AVERAGE terminator OUTPUT 707 ACQUIRE COMPLETB 100 terminator OUTPUT 707 WAVEFORM SOURCE CHANNEL1 lt terminator gt OUTPUT 707 WAVBFORM FORMAT BYTE terminator OUTPUT 707 ACQUIRE COUNT 8 lt terminator gt OUTPUT 707 ACQUIRE POINTS 500 terminator OUTPUT 707 DIGITIZE CHANNELl1 terminator OUTPUT 707 WAVEFORM DATA terminator This setup places the instrument into the averaged mode with eight averages This means that when the DIGITIZE command is received the command will execute until the signal has been averaged at least eight times After receiving the WAVEFORM DAT A query the instrument will start passing the waveform information when addressed to talk Digitized waveforms are passed from the instrument to the controller by sending a numerical representation of each digitized point The format of the numerical representation is controlled with the WAVEFORM FORMAT command and may be selected as BYTE WORD or ASCII The easiest method of entering a digitized waveform depends on data structures available formatting and I O capabilities You must scale the integers to determine the voltage value of each point These integers are passed starting with the leftmost point on the instrument s display For more information refer to chapter 18 Waveform Subsystem When using HP IB a digitize op
120. ntainer for one command The program message unit s are separated by a semicolon program message is terminated by a NL new line The recognition of the program message terminator or lt PMT gt by the parser serves as a signal for the parser to begin execution of commands The lt PMT gt also affects instrument command tree traversal Multiple data parameters are separated by a comma The first data parameter is separated from the header with one or more spaces The header MACHINE1 ASSIGN 2 3 is an example of a compound header It places the parser in the machine subsystem until the lt NL gt is encountered Acolon preceding the command header returns you to the top of the parser tree 3 8 HP 54710 and HP 54720 Programmer s Reference Table 3 1 Message Communication and System Functions Syntax Overview Upper Lower Case Equivalence Upper and lower case letters are equivalent The mnemonic SINGLE has the same semantics as the mnemonic single white space white space is defined to be one or more characters from the ASCII set of 0 32 decimal excluding 10 decimal NL white space is used by several instrument listening components of the syntax It is usually optional and can be used to increase the readability of a program Suffix Multiplier The suffix multipliers that the instrument will accept are shown in table 3 1 suffix mult Value Mnemonic 1E18 EX 1E15 PE
121. on 18 19 X1Yisource 18 21 X2Position 18 20 18 25 X2Y2source 18 22 Waveform Memory Commands 25 2 25 4 XDELta 18 23 DISPlay 25 4 XOFFset 25 5 XRANge 25 5 YOFFset 25 6 YRANge 25 6 waveform memory and DATA 24 14 waveform reset conditions 8 18 Waveform softkey 27 14 28 33 waveform type and COUNt 24 12 waveform type and TYPE 24 26 waveform types and COMPlete 24 11 Waveform View Parameters 24 29 waveform storing 14 6 WAVEFORM COUNT and COMPlete PEN lt WAVEform SOURce and DATA 24 14 WHITe HARDceopy BACKground 17 7 White space 1 6 3 9 White Space Separator 1 6 WIDth and GLITch 22 27 WINDow 26 13 to 26 14 window type for FFT 26 13 WINDow and VIEW 21 10 24 28 WINDow in FUNCtion FFT command 16 14 to 16 15 WINDow in HISTogram command SOURce 29 17 X1Position 29 18 WINDow DELay 21 11 to 21 12 WINDow POSition 21 13 WINDow RANGe 21 14 WINDow SOURce 21 15 to 21 16 WORD and FORMat 24 17 writing quoted strings 15 19 writing text to the screen 15 29 ue Vis x axis duration and XRANge 24 33 x axis controlling 21 2 X vs Y 16 30 x axis offset and XOFFset 25 5 x axis range and XRANge 25 5 x axis units and XUNits 24 35 XDISplay 24 30 XINCrement 24 31 XOFFset 25 5 XORigin 24 32 XRANge 25 5 XRANge 24 33 XREFerence 24 34 XUNits 24 35 Y Y axis control 13 2 Y 1Position 18 24 YDELta 18 26 YDISplay 24 36 YiNCrement 24 37
122. ons in computer PRINT PAUSE CLEAR SCREEN SUBEND SUB Get learnstr Length p sede ded deed de ee ode de dee dede de dedo ede ee ee e sl ee e d de de e de de de de dee dee e e ee dc x f X t This sub program will get the learn string from the 547XX t and place it in SET Then it will create a BDAT file called JSETUPS which holds 3 records If this file is i already created it will be PURGED p dede ne e eee e de ee e e ede e de e dede e de deo e e d ee ce efe e ede e de de ehe de ie de de e dede de d COM Io Scope Hpib ON ERROR CALL Ertrap CREATE BDAT JSETUPS 3 Length Icreate 3 files for 3 different setups ALLOCATE Set Length temp variable to hold string ASSIGN Path TO JSETUPS topen file FOR I 1 TO 3 CLEAR SCREEN LOCAL amp Scope PRINT PLEASE HAVE SETUP 1I READY AND PRESS RETURN INPUT A OUTPUT amp Scope SYSTEM SETUP query learnstring from scope HP 54710 and HP 54720 7 23 Programmer s Reference 870 880 890 00 910 920 930 940 950 960 970 980 990 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 1310 Example Programs Learn String Example Program ENTER scope USING K Set iread learn string from scope IF Set 1 1 e i THEN OUTPUT Path I Set istore setup string to disk ELSE CLEAR SCREEN PRINT Received bad
123. or OUTPUT S ESE 60 SRE 32 CLS ESE XX seta the Event Status Enable Regiser 32 gt CME or Command Error 16 gt EXE or Execution Error 8 gt DDE or Device Dependent Error vM m o m nio mie le ilie CHE HD AM me sien 4r Ah Him Hes io vi Mb dC Mb Aib dp NO Hc MR Mn m fl ium m ih OD Um SRE XX sets the Service Request Enable Register 32 gt ESB or Event Status Bit ENABLE INTR Hpib 2 Saveset Sav i OUTPUT 8S Saveset WAIT i LOCAL Saddr Readmel OUTPUT S Recallset LOCAL Saddr Readme2 END H SUB Ermsg COM S s 1 1 t t 4 gt QYB or Query Error t i i i Recaliset e RCL 1 iAllows the HPIB to interupt the computer IThis command is missing the parameter 1 tThis recalls setup 1 Send the command causes CME until the 1 is added tRecalls setup 1 Error Trap HP 64710 and HP 64720 7 27 Programmer s Reference 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 Example Programs Service Request Example Program COM Err Hpib Scope DIM E 50 PRINT An error occured Sp SPOLL 707 IF BIT Sp 6 THEN Testing bit 6 will tell us if the scope is the source of the interupt OUTPUT S ESR Reads then clears the Standard Event Status Register ENTER 8 J rq type J Call to the SRQ in
124. output buffer to be cleared and the current response to be lost This also causes an error to be placed in the error queue Executing an input statement before sending a query causes the controller to wait indefinitely The format specification for handling response messages is dependent on both the controller and the programming language HP 54710 and HP 54720 1 17 Programmer s Reference Introduction to Programming String Variable Example String Variable Example The output of the instrument may be numeric or character data depending on what is queried Refer to the specific commands for the formats and types of data returned from queries For the example programs assume that the device being programmed is at device address 707 The actual address varies according to how you have configured the bus for your own application In HP BASIC 5 0 string variables are case sensitive and must be expressed exactly the same each time they are used The following example shows the data being returned to a string variable 10 DIM Rang 30 20 OUTPUT 707 CHANNEL1 RANGE 30 ENTER 707 Rang 40 PRINT Rang 50 END After running this program the controller displays 8 00000E 01 In this example the oscilloscope is set to 100 mV division given this output value Numeric Variable Example The following example shows the data being returned to a numeric variable 10 OUTPUT 707 CHANNEL1 RANGE 20 ENTER 707 Rang 30 PRI
125. pape Quiva Averaging r oH H f Function Memories Channel Hamora iNon voict amp e Oscilloscope Data Flow HP 64710 and HP 54720 6 3 Prograramer s Reference Programming Conventions Data Flow The digitizer samples the applied signal and converts it to a digital signal The FISO holds the data until the system bus is ready for the data The output of the FISO is raw data and it is used as an address to the calibration read through table cal table The cal table automatically applies the calibration factors to the raw data so that the output of the cal table is calibrated data In the real time sampling mode the calibrated data is stored in the channel memories before any of the postprocessing is performed Postprocessing includes turning on or off the digital bandwidth limit filter or the interpolator calculating functions storing data to the waveform memories transferring data over the HP IB bus or transferring data to and from the disk Notice that the measurements are performed on the real time data after it has gone through postprocessing Therefore you can make measurements on the data and you can turn on or off digital bandwidth limit or interpolation without having to reacquire the data This is important because the real time sampling mode is primarily used on events that happen either once or infrequently and reacquiring the data may not be one of your options Also turning on interpolation
126. pper case headers 1 10 WwW DEVent 22 8 upper case letters and responses 1 1 W and DATA 24 15 D TIMe 22 15 Upper Lower Case Equivalence 3 9 WAI Wait to Continue 8 27 to 8 28 EDGe 22 21 Uppercase 1 10 Wait to Continue WAI 8 27 to 8 28 GLITch 22 24 URQ User Request Bit 8 6 WATTS as vertical units 13 23 HOLDoff 22 28 URQ bit 8 7 8 9 Waveform Commands 24 2 24 8 HYSTeresis 22 29 User Event Register UER 4 13 BYTeorder 24 9 LEVel 22 30 User Request URQ Status Bit 4 4 COMPlete 24 11 MODE 22 31 User Request Bit URQ 8 6 FORMat 24 17 PATtern 22 33 User Defined Measurements 19 3 POINts 24 19 SLOPe 22 36 Using the Digitize Command 1 15 to 1 16 PREamble 24 20 SOURce 22 37 USR bit 8 22 8 24 TYPE 24 26 STATE 22 38 Utility menu for addessing 2 5 VIEW 24 28 STV 22 43 to 22 48 utility reset conditions 8 19 XDISplay 24 30 SWEep 22 49 UTILity in MENU command 9 23 XINCrement 24 31 UDTV 22 50 to 22 56 XORigin 24 32 Trigger Event Register TRG 4 10 y XRANge 24 33 trigger hysteresis 22 29 VAMPlitude 19 80 to 19 81 XREFerence 24 34 trigger reset conditions 8 16 VAVerage 19 82 to 19 83 YDISplay 24 36 TriggerN Commands 23 2 to 23 3 VBASe 19 84 to 19 85 YINCrement 24 37 PROBe 23 4 VDELta 18 14 YORigin 24 38 Index 14 Index exrewerrerrrrrrerit OAs a ernie MM MM ii A HH A A cd YRANge 24 39 YREFerence 24 40 YUNits 24 41 Waveform Data and Preamble 24 3 XiPositi
127. r each time it has been set 4 10 HP 54710 and HP 54720 Programmer s Reference Example Status Reporting Standard Event Status Register Standard Event Status Register The Standard Event Status Register SESR monitors the following oscilloscope status events PON Power On e URQ User Request CME Command Error EXE Execution Error DDE Device Dependent Error QYE Query Error RQC Request Control and OPC Operation Complete When one of these events occur the event sets the corresponding bit in the register If the bits are enabled in the Standard Event Status Enable Register the bits set in this register generate a summary bit to set bit 5 ESB in the Status Byte Register The contents of the Standard Event Status Register can be read and the register cleared by sending the ESR query The value returned is the total bit weights of all of the bits that are set at the present time The following example uses the ESR query to read the contents of the Standard Event Status Register 10 OUTPUT 707 SYSTEM HEADER OFF iTurn headers off 20 OUTPUT 707 ESR 30 ENTER 707 Result Place result in a numeric variable 40 PRINT Result iPrint the result 50 End If bit 4 weight 16 and bit 5 weight 32 are set the program prints the sum of the two weights HP 54710 and HP 54720 4 11 Programmer s Reference Example Status Reporting Standard Event Status Enable Regist
128. r indicates instrumentis armed and ready for tigger 4 4 HP 54710 and HP 54720 Programmer s Reference Status Reporting Status Reporting Data Structures Status Reporting Data Structures Figure 4 2 brings together the different status reporting data structures mentioned in this chapter and shows how they work together To make it possible for any of the Standard Event Status Register bits to generate a summary bit the bits must be enabled These bits are enabled by using the ESE common command to set the corresponding bit in the Standard Event Status Enable Register To generate a service request SRQ interrupt to an external controller at least one bit in the Status Byte Register must be enabled These bits are enabled by using the SRE common command to set the corresponding bit in the Service Request Enable Register These enabled bits can then set RQS and MSS bit 6 in the Status Byte Register HP 54710 and HP 54720 4 5 Programmer s Reference Status Reporting Status Reporting Data Structures Figure 4 2 ng 7 Te Ja es E oe reaa ov n ciuem este aces e Set by HEEN ven n Ssgietar Read by MEEN UA retary ete ej LTER f Pani iat Set by LTEE Regieter Rsod by LTEE Rend b Li xe Eyen FAIL COMP Mosk Tes Set by MTEE Resistor Read by MTEE peste hy ER aga KIKIKI pet ttt tts Omen KEKI AKE Onset lon ma atl cd el el a cE mp ps EEA EE A I EES LLL SE E Set by orte Ggerati
129. ram calls V convert and H convert 1900 1910 ALLOCATE REAL Hdata 1 Preamble 3 1920 ALLOCATE REAL Vdata 1 Preamble 3 1930 CALL V convert Waveform Preamble Vdata 1940 CALL H convert Hdata Preamble 1950 VrangemPreamble 14 1960 SrangesPreamble 12 1970 OffgetePreamble 15 1980 VninesOffset Vrange 2 1990 VmaxeVrange 2 40ffset 2000 Hnin Preamble 13 2010 Hmaxe Hmin Srange 2020 GCLEAR linitialize graphics 2030 CLEAR SCREEN 2040 GINIT 2050 GRAPHICS ON 2060 VIEWPORT 0 130 35 100 2070 WINDOW Hmin Hmax Vmin Vmax 2080 FRAME 7 8 HP 54710 and HP 54720 Programmer s Reference 2090 2100 2110 2120 2130 2140 Example Programs Digitize Example Program PEN 4 MOVE Hdata 1 Vdata 1 FOR I 1 TO Preamble 3 tplot data points DRAW Hdata I Vdata I NEXT I PRINT TABXY 0 18 Vertical Vrange 8 V div TAB 50 Offset Offset V 2150 2160 2170 2180 2190 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2260 2270 2280 2290 2300 2310 2311 2312 2313 2314 2315 2316 2350 2360 2370 2380 2390 2400 2410 2420 2430 2440 2450 PRINT TABXY 0 19 Timee Srange 10 s div DEALLOCATE Hdata DEALLOCATE Vdata SUBEND H DEF FNBCOn INTEGER B Description FNBcon takes the signed byte value from the scope and converts it to a positive integer of the proper value Parameters Passed B Internal Orparam value to OR with the passed value B when the MSB is set
130. rograms Results Measurement Example Results Measurement Example RESU_7XX Operation of SENDValid amp STATistics on RESULTS E fefetededeo de defe dece ede i de de ede de ede dede de e dede de e dee e e fed a fede e fede dedo de e e de jede de de o de ede dede e je de de de dede ee de pss he k t Main Program Rev 1 18 4Wk4h dee dede deee dee e J sese sede dedede dede dede de dede ede dedo de dee dede defe de dee de e de dee je dee de dee dei de de de dede de de ec de de dee ie je de de de ee dede dee dede Readme Initscope 8Scope True rep Scope Measure 8Scope PRINT End of Program Results are on your printer BEEP 15 2 Jc fede de dede dede dn dae e dee e e e e de de de de de e de dee ee ed fe de dc de e de de de de e de de fe de ee de fe e dee dee e END re End of Main Program RRR EEE RENE E ERE REE REERE EERE EREREREREERRERER EERE EES i e de dede dee ede e ede dee dede de de d eoe de de dede oe de e e dede dede de dede fe dede ede de de dee de defe dee e defe KEW I i Begin Sub Programs 1 Jede de tedeededese dede dede eee e feed dede dee edet dede dee dee edes dee e e de de de SUB Readme Jefe deed de der de de dede e ee e defe e e e de ee e de e t de de dee de fefe de sede je feo dede ede de dede fe de e de ede dede dee e de t This sub program writes user program information to the screen deed de de eee de oe dee e de fe ee e e e ede e f de de de de de de fe dede de dee fede oe fede de fei
131. ronics 2 4 Capability Fuli Capability Full Capability Basic Talker Serial Poll Talk Only Mode Unaddress if Listen Address MLA Basic Listener Unaddresses if Talk Address MTA Full Capability Com jit Capability Remote Configuration Full Capability Full Capability No Capability Tri State 1 MB SEC MAX HP 54710 and HP 54720 Programmer s Reference Interface Functions Command and Data Concepts Command and Data Concepts The HP IB has two modes of operation command mode and data mode The bus is in the command mode when the Attention ATN control line is true The command mode is used to send talk and listen addresses and various bus commands such as group execute trigger GET The bus is in the data mode when the ATN line is false The data mode is used to convey device dependent messages across the bus The device dependent messages include all of the oscilloscope specific commands queries and responses found in this manual including instrument status information Addressing The oscilloscope is always in the addressed talk listen mode from the HP IB menu of the front panel of the oscilloscope The HP IB menu is selected by pressing the Utility key on the front panel then selecting the HP TB softkey Addressed mode is used when the instrument operates in conjunction with a controller When the instrument is in the addressed mode the following is true Each device on the HP IB resides at a particul
132. rs Compound Command headers Common Command headers Simple Command Headers Simple command headers contain a single mnemonic AUTOSCALE and DIGITIZE are examples of simple command headers typically used in this oscilloscope Figure 5 3 Simple Command Header 547008503 Simple Command Syntax HP 54710 and HP 54720 5 5 Programmer s Reference i Figure 5 4 Subsystem E Programming Syntax instruction Header Compound Command Headers Compound command headers are a combination of two or more program mnemonics The first mnemonic selects the subsystem and the last mnemonic selects the function within the sybsystem Additional mnemonics may appear between the subsystem mnemonic and the function mnemonic when there are additional levels within the subsystem that must be transversed The mnemonics within the compound header are separated by colons An example of a compound header is SYSTEM LONGFORM Compound Command Syntax Figure 5 5 Common Command Header Common Command Headers Common command headers control IEEE 488 2 functions within the instrument such as clearing the status CLS No space or separator is allowed between the asterisk and the command header 54700805 Common Command Syntax 5 6 HP 64710 and HP 64720 Programmer s Reference Programming Syntax Queries Queries Headers immediately followed by a question mark are queries After receiving a query th
133. s Common commands are commands defined by IEEE 488 2 and control some functions that are common to all IEEE 488 2 instruments These commands are independent of the tree and do not affect the position of the parser within the tree RST is an example of a common command Root level commands control many of the basic functions of the instrument These commands reside at the root of the command tree They are always parsable if they occur at the beginning of a program message or are preceded by a colon Unlike common commands root level commands place the parser back at the root of the command tree AUTOSCALE is an example of a root level command Subsystem commands are grouped together under a common node of the command tree such as the TIMEBASE commands Only one subsystem may be selected at a given time When the instrument is initially turned on the command parser is set to the root of the command tree and no subsystem is selected 6 6 HP 54710 and HP 54720 Programmer s Reference Tree Traversai Rules Programming Conventions The Command Tree Tree Traversal Rules Command headers are created by traversing down the command tree A legal command header from the command tree in figure 6 2 would be TIMEBASE RANGE This is referred to as a compound header A compound header is a header made up of two or more mnemonics separated by colons The mnemonic created contains no spaces The following rules apply to traversing t
134. s PROBe 23 4 AUToscale 9 11 to 9 12 Autoscale during initialization 1 13 availability and reliability of measured data 4 2 AVERAGE acquisition type 11 16 buffered responses 6 11 bus activity halting 2 8 Bus Commands 2 8 bus management issues 2 2 bus mode local 2 7 BWDeskjet HARDcopy DEVice 17 9 BWLimit 13 8 to 13 6 23 3 BWLimit command 11 5 BWPaintjet HARDcopy DEVice 17 9 BYTE and FORMat 24 17 BYTeorder 24 9 to 24 10 BYTeorder and DATA 24 16 calculating functions and data flow 6 4 CALe Y1 28 42 Calibration Commands 12 2 12 9 AVERage and acquisition completion 11 6 OQUTput 12 18 AVERage and count 11 9 AXIS in HISTogram command 29 6 B BACKground 17 7 BACKground and SSCReen 28 50 BANDpass 24 8 bandwidth limit filter 11 5 bandwidth limit data flow 6 4 bandwidth limits BANDpass 24 8 basic command structure 1 14 basic operations 1 2 Best Accuracy Calibration Level 12 6 to 12 7 BEST in CALibrate command CANcel 12 12 CONTinue 12 12 DATA 12 12 advisory line reading and writing to 10 2 STARt 12 13 AER 9 10 algebraic sum of functions 16 8 ALL and VIEW 24 28 alphanumeric characters in an embedded string 1 12 alphanumeric strings 1 11 lt AMASK CReate 28 14 J AMASk SOURce 28 15 to 28 16 AMASK UNITs 28 17 to 28 18 AMASK XDELta 28 19 to 28 20 AMASK YDELta 28 21 to 28 22 AMPS as vertical units 13 23 STATus 12 13 Bit
135. s sent the response is usually read in using the ENTER statement Messages are placed on the bus using an output command and passing the device address program message and terminator Passing the device address ensures that the program message is sent to the correct interface and instrument The following HP BASIC OUTPUT statement sends a command that sets the bandwidth limit of channel 1 to on OUTPUT device address CHANNEL1 BWLIMIT ON terminator The device address represents the address of the device being programmed Each of the other parts of the above statement are explained in the following pages HP 54710 and HP 54720 1 3 Programmer s Reference Introduction to Programming Program Syntax Program Syntax To program the instrument remotely you must have an understanding of the command format and structure expected by the instrument The IEEE 488 2 syntax rules govern how individual elements such as headers separators program data and terminators may be grouped together to form complete instructions Syntax definitions are also given to show how query responses are formatted Figure 1 1 shows the main syntactical parts of a typical program statement Figure 1 1 PROGRAM MESSAGE UNIT OUTPUT XXX CHANNEL 1 BWLIMIT ON OUTPUT COMMAND DEVICE ADDRESS INSTRUCTION HEADER SEPARATOR PROGRAM DATA 546400802 Program Statement Syntax Output Command The output command is entir
136. scope tinitialize interface and scope 120 Length FNStsize tfind setup string size 130 Get learnstr Length tsave 3 configurations on disk 140 Recall learnstr Length tselect amp recall 1 of 3 setups 150 PRINT 160 BEEP 15 1 170 PRINT program done 186 ERR A RR e e dede de eode e dee eode e eee e e de de e oh e e e fee de ee ee de de e feo he dede dee de e de dede e ex 190 i End of Main Programs 200 E ode e e eee eee eee e e e e de de ed de ee de de eve dede deed dete e t e d ede f ey 210 END 220 efe dede v cde tee dee de de dede eee eec eoe e de de dede fe dede de ecd d e de d dede e e dede ded d 230 i Begin Sub Programs 240 dede eof de e e ede de ede e de de dee e dee o dee fede e de ee e de ee e ede de Fe ode edd de de e de e de d e dee N n 250 SUB Initscope 260 s ekede do dede ede dee eee ede e do e efe e ce e d e le f de ed dee de de de d f de de d e d de 270 t This sub program initializes the INTERFACE AND SCOPE 280 E Vtech dede dede dede he eee de de de fe de o e e e e e e he e e ede e de fe e dece e ee de de de dn de de e e d d n A 290 COM Io 8Scope Hpib 300 Hpib 7 310 Scope 7 320 ASSIGN Scope TO Hpib 100 Scope scope address 330 CLEAR Hpib tclear HPIB interface 340 OUTPUT Scope RST iset acope to default config 350 OUTPUT Scope AUTOSCALE IAUTOSCALE 360 OUTPUT Scope SYST HEAD OFF 370 OUTPUT Scope OPC twait for scope to finish auto 380 ENTER Scope Opc 390 SUBEND 400
137. surement are PRINT Result state R 9 M Interpret the Result State Value PRINT The current values is R 8 Ex 8 PRINT The state value is R 9 It means M PRINT The minimum value is R 10 Ex 10 PRINT The maximum value is R 11 Ex 11 PRINT The average value is R 12 Ex 12 PRINT The standard deviation is R 13 Ex 13 PRINT The number of measurements is R 14 Ex 14 PRINT PRINT Press continue when ready to continue PAUSE CLEAR SCREEN OUTPUT Scope run SUBEND SUB Rt 2g Scope Jj eee de dece de dede de jefe de e e e dede dee dede e ee e ede oe de fe de de ede de dee defe deo ee dede de ede dede n 7 14 HP 54710 and HP 54720 Programmer s Reference 1770 1780 1750 1800 1810 1820 1830 1840 1850 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 1960 1970 1980 1990 2000 2010 2020 2030 2040 2050 2060 2070 2080 2090 2100 2110 2120 2130 2140 2150 2160 2170 2180 2190 2200 2210 Example Programs Measurement Example Program 1 This sub program is just like Rt 4g except it samples at 2 GSa s k p dede de dedededesidetidededesk eso ede fefe de ide dede die deede dede ede dede ETETE e EEEE E CLEAR SCREEN PRINT Setup Scope for 2 GSa Sec OUTPUT Scope acquire srate 2E 9 OUTPUT Scope acquire interpolate on PRINT PRINT When ready to make the measurements press continue PAUSE CLEAR SCREEN SUBEND i SUB Eng N A
138. te Register is set The Operation Status Register is read and cleared with the OPER query The register output is enabled or disabled using the mask value supplied with the OPEE command HP 54710 and HP 54720 4 13 Programmer s Reference Status Reporting Limit Test Event Register LTER Limit Test Event Register LTER Bit 0 COMP of the Limit Test Event Register is set when the Limit Test completes The Limit Test completion criteria are set by the LTESt RUN command Bit 1 FAIL of the Limit Test Event Register is set when the Limit Test fails Failure criteria for the Limit Test are defined by the LTESt F AIL command The Limit Test Event Register is read and cleared with the LTER query When either the COMP or FAIL bits are set they in turn set the LTEST bit bit 8 of the Operation Status Register You can mask the COMP and FAIL bits thus preventing them from setting the LTEST bit by defining a mask using the LTEE command Enable Mask Value Block COMP and FAIL 0 Enable COMP block FAIL 1 Enable FAIL block COMP 1 Enable COMP and FAIL 3 Mask Test Event Register Bit 0 CCOMP of the Mask Test Event Register is set when the Mask Test completes The Mask Test completion criteria are set by the MTESt RUMode command Bit 1 FAIL of the Mask Test Event Register is set when the Mask Test fails This will occur whenever any sample is recorded within any polygon defined in the mask The Mask Test Event Register is read
139. terface 560 OUTPUT 8Scope clis 570 OUTPUT Scope RST reset scope to default config 580 OUTPUT Scope SYSTEM HEADER OFF 1turn off header 590 CLEAR SCREEN 600 SUBEND 610 1 620 SUB True rep Scope 630 ESR de dece eine de he e ede dece e cfe de ALES ERE ES fe e dede de de ede de ode ECE SER SRE ELSE CSRS ERE TSS OB 640 This sets up the scope to look at the calibration signal of 650 t the 54721A in the ET equivalen time mode 1 660 Je eee ee ee efe e ee e e ede efe ee de fe oe ede e e ee e o e e e e e dede e de e e de d de e e de deed d xx 670 PRINT Connect the HP 54721A Calibrator Output to the Input 680 PRINT of the 54721A ed 690 PRINT 700 PRINT Press continue when ready to continue 710 PAUSE 720 CLEAR SCREEN 730 OUTPUT Scope channell display on 740 p t Turn on the calibrator signal on the 21 plug in 750 OUTPUT Scope channell output on 760 OUTPUT Scope acquire mode etine 770 OUTPUT Scope autoscale 780 OUTPUT Scope display persistence infinite 790 WAIT 5 800 PRINT The displayed waveform on the 54720A is the true 810 PRINT representation of the 54721A cal signal 820 PRINT 830 PRINT The HP 54720A is in equivelent time mode 840 PRINT Sampling rate is 500 MSa S 850 PRINT Analog Bandwidth is 1 1 GHz 860 PRINT HP 54710 and HP 54720 7 19 Programmers Reference Example Programs Results Measurement Example 870 SUBEND 880 i 890 SUB Measure Scop
140. terpreter subprogram Done 0 REPEAT 1 Read the Error Queue to determine the specific error Repeat reading until the Queue is empty Bach time the queue is read the error will be reported or the message THERE ARE NO MORE ERRORS will be returned OUTPUT S SYSTEM ERROR STRING ENTER 8S E IF E 1 1 0 THEN PRINT THERE ARE NO MORE ERRORS OUTPUT S CLS iClears all event registers and queues except ithe output queue ENABLE INTR Hpib 2 Done 1 Readme ELSE PRINT E END IF UNTIL Done ELSE CLEAR SCREEN PRINT An interupt on the HPIB has occured but it is not the PRINT scope Please clear the other source of interupt before PRINT restarting this program PAUSE END IF SUBEND i SUB Readme PRINT This program sets the Event Status Enable Register and the PRINT Service Request Enable Register so that an error will cause PRINT a service request PRINT PRINT The second function of this program is to save and then recall PRINT the current scope setup to and from setup memory 1 However PRINT there is a bug in this program The save command is missing a PRINT parameter It needs a l after the space or SAV 1 7 28 HP 54710 and HP 54720 Programmer s Reference Example Programs Service Request Example Program 870 PRINT i 880 PRINT After you have seen how the SRQ s work you may edit line 280 890 PRINT to save the setup 900 PRINT 910 PRINT Once you have fixed the bu
141. to string variables each response is separated by a semicolon For example the response of the query TIMEBASE RANGE DELAY would be range value delay value Use the following program message to read the query ATIMEBASE RANGE DELAY into multiple numeric variables ENTER 707 Result1 Result2 HP 54710 and HP 54720 1 19 Programmer s Reference Introduction to Programming Instrument Status Instrument Status Status registers track the current status of the instrument By checking the instrument status you can find out whether an operation has been completed whether the instrument is receiving triggers and more The chapter on Status Reporting explains how to check the status of the instrument 1 20 HP 54710 and HP 54720 Programmer s Reference Interface Functions Interface Functions The interface functions deal with general bus management issues as well as messages which can be sent over the bus as bus commands In general these functions are defined by IEEE 488 1 2 2 HP 54710 and HP 54720 Programmer s Reference CAUTION Interface Functions HP 1B interface Connector HP IB Interface Connector The oscilloscope is equipped with an HP IB interface connector on the rear panel This allows direct connection to an HP IB compatible printer or external controller An external HP IB compatible device can be connected to the oscilloscope by installing an HP IB cable between the two units Finger tight
142. ue 5 7 Question mark 1 9 queue output 1 9 quoted strings 15 19 quotes with embedded strings 1 12 QYE bit 8 7 8 9 R REFerence 21 8 Register Standard Event Status Enable 4 12 register save recall 8 14 8 20 Registers Histogram Event 4 15 Limit Test Event 4 14 Mask Test Event 4 14 reliability and availability of measured data 4 2 Remote Local code and capability 2 4 remote programming basics 1 2 Remote Local and Local Lockout 2 7 remote to local transition 15 21 REN line 2 7 repeatability of measurements 6 4 representation of infinity 6 11 reprogrammed EEPROM and calibration 12 4 Request Control RQC Status Bit 4 4 Request Service RQS default 2 3 Request Service RQS Status Bit 4 4 Reset RS 1 8 15 to 8 19 resetting the parser 2 8 RESolution 26 10 RESolution in FUNCtion FFT command 16 13 Response data 1 19 Response Generation 6 11 responses buffered 6 11 RANGe 13 19 to 13 20 16 28 21 7 26 9 result state code and SENDvalid 19 68 range and WINDow RANGe 21 14 RATio PROBe 23 4 RAW acquisition type 11 16 RAW and acquisition completion 11 6 raw data and FISO 6 4 RCL Recall 8 14 real number definition 1 11 real time data and data flow 6 4 real time mode 11 11 real time mode and data flow 6 4 real time mode and interpolation 11 10 lt RECall 9 31 Recall RCL 8 14 Receiving Common Commands 8 4 Receiving Infor
143. until it is read or another command is issued When read the answer is transmitted across the bus to the designated listener typically a controller For example the query TIMEBASE RANGE places the current time base setting in the output queue In HP BASIC the controller input statement ENTER lt device address gt Range passes the value across the bus to the controller and places it in the variable Range Query commands are used to find out how the instrument is currently configured They are also used to get results of measurements made by the instrument For example the command MEASURE RISETIME instructs the instrument to measure the rise time of your waveform and place the result in the output queue The output queue must be read before the next program message is sent For example when you send the query MEASURE RISETIME you must follow that query with an input statement In HP BASIC this is usually done with an ENTER statement immediately followed by a variable name This statement reads the result of the query and places the result in a specified variable Sending another command or query before reading the result of a query causes the output buffer to be cleared and the current response to be lost This also generates a query interrupted error in the error queue HP 54710 and HP 54720 1 9 Programmer s Reference Introduction to Programming Program Header Options Program Header Options Progr
144. us 8 5 9 37 CME bit 8 7 8 9 colon in syntax 5 10 Colons 5 5 i COLumn 15 11 Combining Commands in the Same Subsystem 1 7 my combining compound and simple commands 1 12 5 10 combining long and short form headers 1 10 Command ESE 8 6 ADD 16 8 20 3 ADDRess 17 5 AMASk CReate 28 14 AMASKk SOURce 28 15 AMASK UNITS 28 17 AMASk XDELta 28 19 AMASk YDELta 28 21 AREA 17 6 ASSign 15 7 AUToscale 9 1 BACKground 17 7 BWLimit 11 5 13 5 23 3 BYTeorder 24 9 CLEar 20 3 Clear Status 8 5 CLS 8 5 COLumn 15 8 15 11 COMPlete 11 6 COUNE 11 9 DATA 15 12 24 14 DCOior 15 14 DEFine 19 14 DELay 21 4 DELete 14 4 DELTatime 19 18 DESTination 17 8 DEVents 22 8 DEVice 17 8 DIFF 16 9 DiGitize 1 15 DISPlay 13 7 16 10 20 3 25 4 26 4 Divide 16 11 DTIMe 22 15 DUTycycle 19 20 DWAVeform 15 15 EDGe 22 21 ERASe 20 3 Event Status Enable 8 6 to 8 7 FACTors 17 10 FAIL 27 9 29 17 FALLtime 19 22 FFEed 17 11 FFTMagnitude 16 16 FILEname 17 12 FORmat 14 5 15 16 24 17 FREQuency 19 29 26 5 GLITch 22 24 22 43 22 50 GRATicule 15 17 HOLDoff 22 28 HORizontal 16 17 HYSTeresis 22 29 INPut 13 8 INTegrate 16 20 INTerpolate 11 10 INVerse 15 18 INVert 16 21 LENGth 17 13 LEVel 22 30 LINE 15 19 LLIMit 27 11 29 18 to 29 19 LOAD 14 5 MAGNify 16 22 26 6 MASK 15 20 MASK DEFine 28 28 MAXimum 16 23 MEASurement READout 18 7 MEDia 17 14 M
145. within the same subsystem a semi colon is used to separate the functions subsystem function separator data function separator data terminator For example CHANNEL1 COUPLING DC BWLIMIT ON HP 54710 and HP 54720 1 7 Programmer s Reference Introduction to Programming Duplicate Mnemonics Common Command Header Common command headers control IEEE 488 2 functions within the instrument such as clear status Their syntax is lt command header gt lt terminator gt No space or separator is allowed between the asterisk and the command header CLS is an example of a common command header Duplicate Mnemonics Identical function mnemonics can be used for more than one subsystem For example the function mnemonic RANGE may be used to change the vertical range or to change the horizontal range CHANNELI1 RANGE 4 sets the vertical range of channel 1 to 0 4 volts full scale TIMEBASE RANGE 1 sets the horizontal time base to 1 second full scale CHANNEL and TIMEBASE are subsystem selectors and determine which range is being modified 1 8 HP 54710 and HP 54720 Programmer s Reference Introduction to Programming Query Headers Query Headers Command headers immediately followed by a question mark are queries After receiving a query the instrument interrogates the requested function and places the answer in its output queue The answer remains in the output queue
146. y and GLITch 22 25 POLYgon DEFine 28 30 to 28 31 PON bit 8 7 8 9 PORT and SSCReen 27 24 28 50 PORT and SSUMmary 27 30 28 56 POSition 21 6 position and WINDow POSition 21 13 postprocessing and data flow 6 4 pound sign f and block data 1 19 Power On PON Status Bit 4 4 power up condition of HP IB 2 3 PP in MEASure HISTogram command 19 46 to 19 47 PREamble 24 20 to 24 24 PREamble and DATA 24 16 PREShoot 19 57 to 19 58 PRINt 9 30 PRINt in MENU command 9 23 printing specific screen data 17 6 PEAK in MEASure HISTogram command printing the screen 17 2 19 44 to 19 45 peak to peak voltage and VPP 19 92 PROBe 13 13 to 13 14 23 4 probe attenuation factor 12 8 PEAKI1 in MEASure FFT command 19 26 Probe Calibration 12 8 12 10 to 12 11 PEAK2 in MEASure FFT command 19 27PROBe in CHANnel command pending commands clearing 2 8 PERiod 19 55 to 19 56 period measurement setup 19 3 PERsistence 15 22 PFORmat and SSCReen 27 24 28 50 PFORmat and SSUMmary 27 30 28 56 pixel memory and data flow 6 4 Pixel Memory Commands 20 2 20 4 ADD 20 3 CLEar 20 3 DISPlay 20 3 CALibrate 13 15 Program Data 1 6 1 10 5 8 to 5 9 program data in syntax 1 4 Program Data Syntax Rules 1 10 program data types 1 10 program data within instruction 1 5 Program example 1 14 Program Header Options 1 10 Program Message Terminator 1 12 Program Overview initialization example 1 15
Download Pdf Manuals
Related Search
Related Contents
Archos JBM 20 User's Manual SMART Board 600 and D600 Series Interactive Whiteboard FA-505 取扱説明書 [PDF:4.08MB] Logitec MO デュプリケータ ユーザーズガイド 目次 取扱説明書(4.2MB) User Manual Copyright © All rights reserved.
Failed to retrieve file