Home

Programmer Manual TDS 340A, TDS 360 & TDS 380 Digital Real

image

Contents

1. een 2 21 Table 2 18 Vertical commands eee 2 21 Table 2 19 Waveform commands eee 2 25 Table 2 20 Commands that affect BUSY response 2 40 Table 2 21 Offset ranges all channels 2 46 Table 2 22 DATa and WFMPre parameter settings 2 64 Table 2223 XY format pairs cc cee eee 2 75 Table 2 24 Horizontal delay time resolution 2 103 Table 2 25 Commands that generate an Operation Complete message eee 2 130 Table 2 26 Additional WFMPre commands 2 178 TDS 340A TDS 360 amp TDS 380 Programmer Manual Table of Contents Table 3 1 Table 3 2 Table 3 3 Table 3 4 Table 3 5 Table 3 6 Table 3 7 Table 3 8 Table 3 9 Table C 1 Table D 1 SESR bit functions eee SBR bit functions eene No event messages Command error messages CME Bit 5 Execution error messages EXE Bit 4 Device error messages DDE Bit 3 System event messages Execution warning messages EXE Bit 4 Internal warning messages Standard interface messages Factory initialization defaults TDS 340A TDS 360 amp TDS 380 Programmer Manual Table of Contents vi TDS 340A TDS 360 amp TDS 380 Programmer Manual ae if General Safety Summary Injury Precautions Use Proper Power Cord Avoid
2. 00 eh 2 15 Measurement Commands 0 0 cee eee eee rere 2 16 Miscellaneous Commands 00 cee eee eee ee 2 18 RS 232 Commands eer EE eG OG Wee E A e pe Ae 2 19 Save and Recall Commands slseleeeeeeeeeeeee eee 2 19 Status and Error Commands llsleeeeeeeeeeee eee 2 20 Trigger Commands EA cece eee n 2 20 Vertical Commands 2 0 cece ee ect eee teens 2 21 Waveform Commands 0 0 c ccc cee cette n 2 22 Command Descriptions 00 cece cece cece eee ence nn 2 27 TDS 340A TDS 360 amp TDS 380 Programmer Manual i Table of Contents Status and Events Examples Appendices Glossary and Index Registers coo ERDCPRUIGULUbLCPRNC UU ERE D ER PRIME pO LUeRENSS 3 1 QUEUES c 3 5 Event Handling Sequence 0 0 cee eee eee 3 6 Synchronization Methods 0 0 cece eee eee 3 7 MESSABESe ccueibbegebRETUMEUD UBBRRSPUWEE CERE S uer onebiuuebebeeb ens 3 12 Programming Examples eeeeeee enhn 4 1 GPIB Ex ampl s 5b uber EB E EUER MU UE END 4 2 RS 232 Examples itachi a poe athe thea ha SERRE Sh aN 4 6 Appendix A ASCII amp GPIB Code Chart 0000 00000 A 1 Appendix B Reserved Words 0 sce eee nauraen B 1 Appendix C Interface Specifications lleeeeeeeeeee C 1 Appendix D Factory Initialization Settings lesse ess D 1 TDS 340A TDS 360
3. 2 133 Command Descriptions RS232 CONTROI DCD The oscilloscope accepts but ignores this command Group Miscellaneous Related Commands RS232 HARDFLAGGING RS232 PARITY RS232 SOFTFLAGGING RS232 STOPBITS RS232 Syntax RS232 CONTROl DCD OFF 0 RS232 DCD Arguments OFF or 0 turn off DCD monitoring Examples RS232 CONTRO1 DCD OFF turns off DCD monitoring This is essentially a no op since DCD monitoring is always off 2 134 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 CONTROI RTS Sets or queries the state of RS232 hard flagging This command performs the same function as RS232 HARDFlagging Group Miscellaneous Related Commands RS232 HARDFLAGGING RS232 SOFTFLAGGING RS232 STOPBITS RS232 Syntax RS232 CONTrol RTS ON RFR IBFull RS232 CONTrol RTS Arguments ON asserts RTS Request to Send lt RFR gt enables hard flagging lt IBFul1 gt enables hard flagging Examples RS232 CONTrol RTS RFR enables hard flagging TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 135 Command Descriptions RS232 HARDFlagging 2 136 Group Related Commands Syntax Arguments Examples Sets or queries the state of RS232 hard flagging When hard flagging is enabled the oscilloscope sends data as long as CTS Clear To Send is asserted When receiving data the oscilloscope asserts RTS Request To Send until the input buffer is almost
4. lt QString gt is the name of the alias you want to remove Using ALIas DELEte without specifying an alias causes an execution error lt QString gt must be a previously defined alias ALIAS DELETE SETUP1 deletes the alias named SETUPI ALlas DELEte ALL No Query Form Group Syntax Examples 2 36 Deletes all existing aliases Alias ALIas DELEte ALL ALIAS DELETE ALL deletes all aliases TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax ALlas DELEte NAMe No Query Form Group Syntax Arguments Examples ALlas STATE Group Syntax Arguments Examples Removes a specified alias This command is identical to ALIas DELEte Alias ALIas DELEte NAMe lt QString gt lt QString gt is the name of the alias to remove Using ALIas DELEte NAMe without specifying an alias causes an execution error QString must be a previously defined alias ALIAS DELETE NAME STARTUP deletes the alias named STARTUP Turns aliases on or off This command is identical to the ALIas command Alias ALIas STATE OFF ON NR1 ALIas STATE OFF or lt NR1 gt 0 turns alias expansion off If a defined alias is sent when ALIas STATE is OFF a command error 102 will be generated ON or lt NR1 gt 0 turns alias expansion on When the oscilloscope receives a defined alias it substitutes the specified command sequence for the alias and executes it ALIAS STATE OFF turns th
5. AMPLi tude is the high value minus the low value BURst is the time from the first MidRef crossing to the last MidRef crossing CMEan is the arithmetic mean over one cycle CRMs is the true Root Mean Square value over one cycle FALL is the time that it takes for the falling edge of a pulse to fall from a HighRef value to a LowRef value FREQuency is the reciprocal of the period measured in Hertz HIGH is the 100 reference level LOW is the 0 reference level MAX imum is the highest amplitude MEAN is the arithmetic mean over the entire waveform MINImum is the lowest amplitude NDUTy is the ratio of the negative pulse width to the signal period expressed as a percentage NOVershoot is the negative overshoot expressed as Low Minimum NOVershoot 100 x Avipltde NWIdth is the distance time between MidRef usually 5096 amplitude points of a negative pulse PDUTy is the ratio of the positive pulse width to the signal period expressed as a percentage TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions Examples PERIod is the time in seconds it takes for one complete signal cycle to happen PK2pk is the absolute difference between the maximum and minimum amplitude POVershoot is the positive overshoot expressed as Maximum High POVershoot 100 x Amal PWIdth is the distance time between MidRef usually 50 amplitude points of a positive pulse RISe is
6. Calibration and Diagnostic CALibrate INTERNal CALibrate STATUS PASS indicates that the last adjustment sequence completed without any errors detected FAIL indicates that the last adjustment sequence did not complete successfully or completed with errors CALibrate STATUS might return CALIBRATE STATUS FAIL if oscilloscope calibration did not pass TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CH lt x gt Query Only Returns the vertical parameters Because CH lt x gt SCAle and CH x VOLts are identical only CH lt x gt SCAle is returned Group Vertical Syntax CH lt x gt Examples CH1 might return the string CH1 SCALE 1 0E 2 POSITION 0 0E0 OFFSET 0 0E0 COUPLING DC BANDWIDTH FULL for channel 1 CH x BANdwidth Sets or queries the bandwidth setting of the specified channel This is equivalent to setting Bandwidth in the Vertical menu Group Vertical Syntax CH lt x gt BANdwidth TWEnty FULI CH x BANdwi dth Arguments TWEnty sets the channel bandwidth to 20 MHz FULT sets the channel bandwidth to the full bandwidth of the oscilloscope Examples CH2 BANDWIDTH TWENTY sets the bandwidth of channel 2 to 20 MHz CH1 BANDWIDTH might return FULL which indicates that there is no bandwidth limiting on channel 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 43 Command Syntax CH lt x gt COUPling Sets or queries the input attenuator coupling s
7. Group Syntax Arguments Examples Positions the waveform horizontally on the display This is used for both main and delayed time bases This command is equivalent to adjusting the front panel HORIZONTAL POSITION knob Horizontal HORizontal POSition NR3 HORizontal POSition lt NR3 gt is from 0 to 99 9 and is the percent of the waveform that is displayed left of the center graticule HORIZONTAL POSITION 10 sets the horizontal position of the waveform such that 10 of the waveform is to the left of screen center HORizontal RECOrdlength Group Syntax Arguments Examples Sets the number of data points that are acquired for each record You can only set the record length to 1000 This command is here for compatibility with other TDS series scopes Horizontal HORizontal RECOrdlength NRI HORizontal RECOrdlength lt NR1 gt is 1000 HORIZONTAL RECORDLENGTH 1000 specifies that 1000 data points will be acquired for each record HORIZONTAL RECORDLENGTH returns 1000 as the number of data points per record TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 105 Command Descriptions HORizontal REF lt x gt Sets or queries the reference waveform position lock Group Horizontal Syntax X HORizontal REF x LOCk INDEpendent HORi zontal REF lt x gt Arguments LOCk locks the horizontal position of the reference waveform to the active waveforms INDEpendent unlocks the horizo
8. Previous element s may be repeated Comment Command and Query Structure Commands consist of set commands and query commands usually simply called commands and queries Commands modify oscilloscope settings or tell the oscilloscope to perform a specific action Queries cause the oscilloscope to return data and information about its status Most commands have both a set form and a query form The query form of the command is the same as the set form but with a question mark on the end For example the set command ACQui re MODe has a query form ACQui re MODe Not all commands have both a set and a query form some commands are set only and some are query only TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 1 Command Syntax A command message is a command or query name followed by any information the oscilloscope needs to execute the command or query Command messages consist of five different element types defined in Table 2 2 and shown in the example in Figure 2 1 Table 2 2 Command message elements Symbol lt Header gt Meaning The basic command name If the header ends with a question mark the command is a query The header may begin with a colon character if the command is concatenated with other commands the beginning colon is required The beginning colon can never be used with command headers beginning with a star Mnemoni c Argument Comma A header sub functi
9. telephone modem the cable may be wired as a null No modem instead of a modem The oscilloscope error log displays There is a baud rate mismatch between the Framing errors oscilloscope and the personal computer There is a data bits mismatch between the oscilloscope and the personal computer The oscilloscope expects 8 bit data There is a parity mismatch between the oscilloscope and the personal computer The oscilloscope error log displays There is a parity mismatch between the oscilloscope Parity errors and the personal computer The oscilloscope error log displays Flagging is not being used correctly by the Overrun errors oscilloscope orthe personal computer they are using different types of flagging TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 11 Getting Started Table 1 4 RS 232 troubleshooting Cont Symptom Transmissions are incomplete or the oscilloscope does not process all commands from the personal computer Possible Causes Flagging is not being used correctly by the oscilloscope or the personal computer they are using different types of flagging There is an EOL terminator mismatch between the oscilloscope and the personal computer The oscilloscope error log displays Waiting for Q Yes Soft flagging is being used and transmissions stop The oscilloscope error log displays CTS Low and the oscilloscope is using hard flagging The oscilloscope is using soft flagg
10. Commands can specify the reference waveform to use as a mnemonic in the header Symbol REF lt x gt Meaning A reference waveform specifier lt x gt is either 1 or 2 In some commands you can specify a waveform regardless of whether it is a channel waveform a math waveform or a reference waveform Specify these as follows Symbol Meaning lt wfm gt Can be CH lt x gt MATH MATHI or REF lt x gt TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 7 Command Syntax Argument Types Numeric Arguments Quoted String Arguments 2 8 A command argument can be in one of several forms Each command description describes the argument types to use with that command Many oscilloscope commands require numeric arguments The syntax shows the format that the oscilloscope returns in response to a query This is also the preferred format when sending the command to the oscilloscope though it will accept any of the formats This manual represents these arguments as follows Symbol Meaning lt NR1 gt Signed integer value lt NR2 gt Floating point value without an exponent lt NR3 gt Floating point value with an exponent The oscilloscope will automatically force most numeric arguments to a valid setting either by rounding or truncating when you input an invalid number unless otherwise noted in the command description Some commands accept or return data in the form of a quoted string which is simply a group
11. Examples WFM Pre BYT Or Group Related Commands Syntax Arguments Examples TDS 340A TDS 360 amp TDS 380 Programmer Manual Sets or queries the binary field data width for the first ordered waveform as specified by the DATa SOUrce command This command is equivalent to the DATa WIDth command Waveform DATa WIDth WFMPre BIT_Nr WFMPre BYT Nr NR1 WFMPre BYT Nr lt NR1 gt is the number of bytes per point and can be 1 or 2 WFMPRE BYT NR 2 specifies that there are 2 bytes per waveform data point Selects which byte of binary waveform data is transmitted first during a waveform data transfer when DATa WIDth or WFMPre BYT Nr is set to 2 Waveform DATa ENCdg WFMPre BN_Fmt WFMPre ENCdg WFMPre BYT Or LSB MSB WFMPre BYT Or LSB selects the least significant byte to be transmitted first MSB selects the most significant bye to be transmitted first WFMPRE BYT OR MSB specifies that the most significant byte in the waveform data is transferred first 2 169 Command Descriptions WFM Pre ENCdg Sets or queries the type of encoding for waveform data transferred with the CURVe command Group Waveform Related Commands DATa ENCdg WFMPre BYT Or WFMPre BN_Fmt Syntax WFMPre ENCdg ASC BIN WFMPre ENCdg Arguments ASC specifies ASCII curve data BIN specifies binary curve data Examples WFMPRE ENCDG ASC specifies that the waveform data is in ASCII format WFMPRE ENCDG
12. HORi zontal REF lt x gt Set position lock for REF waveforms HORi zontal SCAle Same as HORizontal MAIn SCAle HORi zontal SECdiv Same as HORizontal MAIn SCAle HORi zontal TRIGger Return main time base trigger position HORizontal TRIGger POSition Set main time base trigger position Measurement Commands Measurement commands control the automated measurement system Up to four automated measurements can be displayed on the screen of the oscilloscope In the commands these four measurement readouts are named MEAS x where x can be 1 2 3 or 4 In addition to the four displayed measurement readouts the measurement commands let you specify a fifth measurement IMMed The immediate measure ment has no front panel equivalent and the oscilloscope never displays immediate measurements Immediate measurements slow the waveform update rate less than displayed measurements because immediate measurements are computed only when they are requested Whether you are using displayed or immediate measurements you use the VALue query to obtain measurement results 2 16 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Several measurement commands set and query measurement parameters You can assign some parameters such as waveform sources differently for each measurement readout Other parameters such as reference levels have only one value which applies to all measurements Table 2 12 Measurement comman
13. interfaces Table 1 1 Comparison of GPIB and RS 232 interfaces Operating Attribute Cable GPIB IEEE 488 Std RS 232 9 wire Data flow control Data format Interface control Interface messages Hardware 3 wire handshake 8 bit parallel Operator low level control message Most IEE E 488 Std Flagging soft XON XOFF hard RTS CTS 8 bit serial None Device clear using a break signal TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started GPIB Requirements Table 1 1 Comparison of GPIB and RS 232 interfaces Cont Operating Attribute Interrupts reported GPIB Service requests status and event code RS 232 None must be polled for status Message termination Receive Hardware EOL software LF or both Software CR LF CRLF LFCR Message termination Transmit Hardware EOL software LF Software CR LF CRLF LFCR Timing Asynchronous Asynchronous Transmission path length 2 meters between devices 15 meters max lt meters total cabling for GPIB system Speed 200kB ytes sec 38 400 bits sec System environment Multiple devices lt 15 Single terminal point to point Setting Up GPIB Remote Communications connection The oscilloscope has a 24 pin GPIB connector on its rear panel as shown in Figure 1 1 This connector has a D type shell and conforms to IEEE Std 488 1 1987 Attach an IEEE Std 488 1 1987 GPIB cable av
14. might return DOTS indicating that the display shows individual waveform data points TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DISplay TRIGT Controls the display of the trigger indicator This is equivalent to setting the Display T Trigger Point in the Readout Options side menu The query form returns an ON 1 or an OFF 0 Group Display Syntax DISplay TRIGT OFF ON NRI DISplay TRIGT Arguments OFF or lt NR1 gt 0 removes the trigger indicator from the display lt ON gt or lt NR1 gt 0 displays a trigger indicator on each of the displayed waveforms The trigger indicator is in reverse video for the selected waveform Examples DISPLAY TRIGT ON sets the display to show trigger indicators DISPLAY TRIGT might return 1 indicating that the display shows trigger indicators TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 81 Command Descriptions ESE 2 82 Group Related Commands Syntax Arguments Examples Sets or queries the bits in the Event Status Enable Register ESER The ESER prevents events from being reported to the Status Byte Register STB For a more detailed discussion of the use of these registers see page 3 1 Status and Error CLS DESE ESR EVENT EVMsg SRE STB ESE NR1 ESE lt NR1 gt is a value in the range from 0 through 255 The binary bits of the ESER are set according to this value The
15. 141 SA1 161 SA17 0001 SOH DC1 1 A Q q 1 1 u 7 21 3 31 49 41 65 51 81 61 97 71 113 2 22 42 LA2 62 Lats 102 TA2 122 TA18 142 sa2 162 SA18 0010 STX DC2 a 2 B R b r 2 2 12 18 22 34 32 50 42 66 52 82 62 98 72 114 3 23 43 LA3 63 LA19 103 TA3 123 TA19 143 SA3 163 SA19 0 0 11 ETX DC3 3 C S C S 3 31 23 19 23 35 33 51 43 67 53 83 63 99 73 115 4 spc 24 DCL 44 LM 64 LA20 104 TM 124 TA20 144 SM 164 SA20 0100 EOT DC4 4 D T d t 4 4 14 20 24 36 34 52 44 68 54 84 64 100 74 116 5 PPC 25 PPU 45 LA5 65 LA21 105 TAS 125 TA21 145 SA5 165 SA21 0101 ENQ NAK 5 E U e u 5 5 15 n 25 37 35 53 45 69 55 85 65 101 75 117 6 26 46 Las 66 LA22 106 TAG 126 TA22 146 SA6 166 SA22 0110 ACK SYN amp 6 F V f V 6 6 16 22 26 38 36 54 46 70 56 86 66 102 76 118 7 21 47 LA7 67 LA23 107 TA7 127 TA23 147 SA7 167 SA23 0 1 11 BEL ETB 7 G W g w 7 D u 233 27 39 37 55 47 n s 87 67 103 77 119 10 GET 30 SPE 50 Las 70 LA24 110 Tas 130 TA24 150 sas 170 SA24 1000 BS CAN 8 H X h x 8 8 18 24 28 40 38 56 48 72 58 88 68 104 78 120 1 Te 31 SPD 51 Lag 71 LA25 111 Tag 131 TA25 151 SA9 171 SA25 1001 HT EM 9 l Y i y 9 9 19 25 29 4 39 57 49 73 5 89 69 105 79 121 5 12 32 52 LA10 72 LA26 112 TA10 132 TA26 SA26 1010 LF SUB J Z z A 10 1A 26 2A 42 3A 58 4
16. MEASUrement GATi ng Arguments ON or 1 turns on measurement gating OFF or 0 turns off measurement gating Examples MEASUREMENT GATING ON MEASUREMENT GATING might return MEASUREMENT GATING 1 if measurement gating is turned on 2 112 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions MEASUrement IMMed Query Only Group Syntax Examples Returns all immediate measurement setup parameters Measurement MEASUrement IMMed MEASUREMENT IMMED might return MEASUREMENT IMMED TYPE PERIOD UNITS s SOURCE1 CHI MEASUrement IMMed SOURCE 1 Group Syntax Arguments Examples Sets or queries the source for all immediate measurements Measurement MEASUrement IMMed SOURCE 1 CH x MATH MATH1 REF lt x gt MEASUrement IMMed SOURCE 1 CH lt x gt is an input channel MATH1 is the math waveform REF lt x gt is a reference waveform MEASUREMENT IMMED SOURCE MATH1 specifies MATHI as the immediate measurement source TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 113 Command Descriptions MEASUrement IMMed TYPe 2 114 Group Syntax Arguments Specifies the immediate measurement Measurement MEASUrement IMMed TYPe AMPLitude BURst CMEan CRMs FALL FREQuency HIGH LOW MAXimum MEAN MINImum NDUTy NOVershoot NWIdth PDUTy PERIod PK2pk POVershoot PWIdth RISe RMS MEASUrement IMMed TYPe
17. TDS 360 amp TDS 380 Programmer Manual Command Descriptions MEASUrement MEAS lt x gt SOURCE 1 Sets or queries the source for all single channel measurements Group Measurement Syntax MEASUrement MEAS lt x gt SOURCE 1 CH lt x gt MATH MATH1 REF lt x gt MEASUrement MEAS x SOURCE 1 Arguments CH x is an input channel MATHI1 is the math waveform REF lt x gt is a reference waveform Examples MEASUREMENT MEAS2 SOURCE1 MATHI specifies MATHI as the measurement 2 source MEASUrement MEAS lt x gt STATE Controls the measurement system The source specified by MEASUre ment MEAS lt x gt SOUrcel must be selected for the measurement to be displayed The source is selected using the SELect CONTROI command Group Measurement Syntax MEASUrement MEAS lt x gt STATE OFF ON lt NR1 gt MEASUrement MEAS lt x gt STATE Arguments OFF or lt NR1 gt 0 turns measurements off You can also turn the state off by deselecting the source ON or lt NR1 gt 0 turns measurements on Examples MEASUREMENT MEAS1 STATE ON turns measurement defined as MEASI on MEASUREMENT MEASA STATE returns either 0 or 1 indicating the state of MEASA TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 117 Command Descriptions MEASUrement MEAS lt x gt TYPe 2 118 Group Syntax Arguments Sets or queries the measurement type for the measurement specified by lt x gt This is
18. TDS 380 Programmer Manual Status and Events Table 3 3 No event messages Code Message 0 No events to report queue empty 1 No events to report new events pending ESR Table 3 4 shows the error messages generated by improper command syntax Check that the command is properly formed and that it follows the rules in the Command Syntax chapter starting on page 2 1 Table 3 4 Command error messages CME Bit 5 Code Message 100 Command error 102 Syntax error 103 Invalid separator 104 Data type error 105 GET not allowed 108 Parameter not allowed 110 Command header error 111 Header separator error 112 Program mnemonic too long 113 Undefined header 161 Invalid block data indefinite length blocks are not allowed over the RS 232 Table 3 5 lists the errors that are detected during execution of a command In these error messages you should read macro as alias Table 3 5 Execution error messages EXE Bit 4 Code Message 200 Execution error 201 Invalid while in local 210 Trigger error 211 Trigger ignored 212 Arm ignored 220 Parameter error TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 13 Status and Events Table 3 5 Execution error messages EXE Bit 4 Cont Code Message 221 Settings conflict 222 Data out of range 223 Too much data 224 Illegal parameter value 230 Data corrupt or stale 240 Hardware
19. This format is useful when transferring data to IBM compatible PCs SRPbinary is the same as RPBinary except that the byte order is swapped meaning that the least significant byte is transferred first This format is useful when transferring data to IBM compatible PCs TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 63 Command Descriptions Examples DATa SOUrce 2 64 Group Syntax Arguments Examples Table 2 22 DATa and WFMPre parameter settings WFMPre Settings DATa ENCdg Setting ENCdg BN_Fmt BYT_Or ASCIi ASC N A N A RIBinary BIN RI MSB RPBinary BIN RP MSB SRIbinary BIN RI LSB SRPbinary BIN RP LSB DATA ENCDG RPBINARY sets the data encoding format to be positive integer where the most significant byte is transferred first DATA ENCDG might return SRPBINARY for the format of the waveform data Sets or queries the location of the waveform data that is transferred from the oscilloscope by CURVe The source data is always transferred in a predefined order regardless of the order they are specified using this command The predefined order is CH1 CH2 MATH MATHI REFI REF2 Waveform DATa SOUrce lt wfm gt lt Comma gt lt wfm gt DATa SOUrce lt wfm gt is the source of the waveform data that is transferred from the oscillo scope to the controller DATA SOURCE REF2 CH2 MATH1 CH1 specifies that four waveforms will be transferred in the next CURVE query The order
20. This instrument belongs to me in the user protected data area PUD might return 221Property of Company X RCL No Query Form Restores the state of the oscilloscope from a copy of its settings stored in memory The settings are stored using the SAV command This command is equivalent to RECAII SETUp and performs the same function as the Recall Saved Setup item in the front panel Save Recall menu Group Save and Recall Related Commands FACtory LRN RECAII SETUp RST SAV SAVe SETUp Syntax RCL NRI Arguments lt NR1 gt is a value in the range from 1 to 10 and specifies a setup storage location Using an out of range value causes an execution error 222 Data out of range Examples RCL 3 restores the oscilloscope from a copy of the settings stored in memory location 3 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 129 Command Descriptions RECAII SETUp No Query Form 2 130 Group Related Commands Syntax Arguments Examples Restores a stored or factory front panel setup of the oscilloscope This command is equivalent to selecting Recall Saved Setup or Recall Factory Setup in the Save Recall menu NOTE TDS 300 Series oscilloscope setup files are not compatible with TDS 400 TDS 500 TDS 600 TDS 700 or TDS 800 Series oscilloscopes setup files Refer to Setup and Waveform File Formats on page D 2 for more information Save and Recall FACtory RCL RST SAV SAVe
21. VALUE 5 0E 7 TRIG GER MAIN VIDEO FIELD FIELD1 SCAN RATEI 2 154 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TRIGger MAIn Group Syntax Arguments Examples Sets the main trigger level and returns the current main trigger parameters Trigger TRIGger MAIn SETLevel TRIGger MAIn SETLevel sets the main trigger level to half way between the MIN and MAX amplitudes of the trigger source input This is equivalent to pressing the front panel SET LEVEL TO 50 button TRIGGER MAIN SETLEVEL sets the main trigger level mid way between MAX and MIN TRIGger MAIn EDGE Query Only Group Syntax Examples Returns the trigger coupling source and slope for the main edge trigger Trigger TRIGger MAIn EDGE TRIGGER MAIN EDGE might return SOURCE CH1 COUPLING DC SLOPE RISE TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 155 Command Descriptions TRIGger MAIn EDGE COUPling Group Syntax Arguments Examples Sets or queries the type of coupling for the main edge trigger This is equivalent to setting Coupling in the Trigger menu Trigger TRIGger MAIn EDGE COUPling AC DC HFRej LFRej NOISErej TRIGger MAIn EDGE COUP1 ing AC selects AC trigger coupling DC selects DC trigger coupling HFRej coupling removes the high frequency components of the DC signal LFRej coupling removes the low frequency components of the AC signal NOISErej selects DC low s
22. amp TDS 380 Programmer Manual Table of Contents List of Figures Figure 1 1 Location of RS 232 and GPIB connectors 1 2 Figure 1 2 How to stack GPIB connectors e 1 4 Figure 1 3 Typical GPIB network configurations 1 4 Figure 1 4 Selecting the GPIB address in the GPIB configuration side men 22 260 e enr e er Esna EEE ep er e mr end 1 5 Figure 1 5 The RS 232 connector pin assignments 1 6 Figure 1 6 RS 232 parameter settings eese 1 7 Figure 1 7 RS 232 Hardcopy menu eee 1 13 Figure 1 8 Connecting to the PROBE COMP signal 1 14 Figure 2 1 Command message elements eee 2 2 Figure 2 2 Block argument example eese 2 10 Figure 3 1 The Standard Event Status Register SESR 3 2 Figure 3 2 The Status Byte Register SBR 3 2 Figure 3 3 The Device Event Status Enable Register DESER 3 3 Figure 3 4 The Event Status Enable Register ESER 3 4 Figure 3 5 The Service Request Enable Register SRER 3 4 Figure 3 6 Status and event handling process 3 6 Figure 3 7 Command processing without using synchronization 3 8 Figure 3 8 Processing sequence with synchronization 3 8 Figure 4 1 Equipment needed to run the GPIB and RS 232 example programs eeeeeeeeee ehh Hh hn ntn 4 1 TDS 340
23. might return BIN indicating that the waveform data is in binary format 2 170 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFM_Pre PT_Fmt No Query Form Group Syntax Arguments Examples Selects the point format of the waveform data for the first ordered waveform as specified by the DATa SOUrce command Waveform WFMPre PT Fmt ENV Y ENV specifies that the waveform is transmitted as maximum and minimum point pairs Only y values are explicitly transmitted Absolute coordinates are given by X 0 XINcr n PT_Off Y max YZEro YMUIt Yn YOFf Y YZEro YMUIt y YOFf min Y specifies a normal waveform where one ASCII or binary data point is transmitted for each point in the waveform record Only y values are explicitly transmitted Absolute coordinates are given by X 0 XINcr n PT Off Y YZEro YMUIt y YOFf WFMPRE PT ENV sets the waveform data point format to enveloped TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 171 Command Descriptions WFM_Pre PT_Off No Query Form Group Related Commands Syntax Arguments Examples Specifies the trigger point within the waveform record for the reference waveform specified by the DATa DESTination command Waveform HORizontal TRIGger POsition WFMPre PT Off NR1 lt NR1 gt 0 to the record length 1000 and is the position of the trigger point rel
24. with the CURVe command Since DATa DESTination and DATa TARget are equivalent only DATa DESTination is returned by the DATa query Group Waveform Related Commands CURVE WAVFrm Syntax DATa INIT SNAp DATa Arguments INIT initializes the waveform data parameters to their factory defaults SNAp sets DATa STARt and DATa STOP to match the current vertical bar cursor positions Examples DATA SNAP assigns DATA START and DATA STOP to the current position of the vertical bar cursors DATA might return the string DATA ENCDG RPBINARY DESTINATION REF4 SOURCE REF2 START 1 STOP 500 WIDTH 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 61 Command Descriptions DATa DESTination Sets or queries the reference memory location for storing waveform data that is transferred into the oscilloscope by the CURVe command This command is identical to the DATa TARget command Group Waveform Syntax DATa DESTination REF lt x gt DATa DESTination Arguments REF lt x gt is the reference memory location where the waveform will be stored Examples DATA DESTINATION REF1 stores incoming waveform data in reference memory 1 DATA DESTINATION might return REF2 as the reference memory location that is currently selected 2 62 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DATa ENCdg Sets or queries the format of the waveform data This command is equivalent to setting WFMPre ENCdg WFMP
25. 0 02 x the delayed time base setting When the horizontal delay mode is main only or intensified use the main timebase setting When the horizontal delay mode is delayed only use the delay timebase setting 10 us Slower than 10 us HORIZONTAL DELAY TIME 2 0E 3 sets the delay time between the main and delayed time base to 2 ms HORizontal DELay TIMe RUNSAfter Group Related Commands Syntax Arguments Examples Sets or queries the delay time to wait after the main trigger before the delayed time base begins This is equivalent to setting Delayed Runs After Main in the Horizontal Time Base side menu This command is equivalent to the HORizontal DELay TIMe command Horizontal HORizontal DELay MODe HORizontal DELay TIMe HORi zontal DELay TIMe RUNSAfter lt NR3 gt HORi zontal DELay TIMe RUNSAfter lt NR3 gt see HORizontal DELay TIMe HORIZONTAL DELAY TIME RUNSAFTER 2 0E 3 sets the delay time between the main and delayed time base to 2 ms TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 101 Command Descriptions HORizontal FlTtoscreen Group Syntax Arguments Examples Setup horizontal waveform compress operation This command is equivalent to setting Fit To Screen in the Horizontal menu Waveform compress lets you fit a captured waveform to the visible screen Horizontal HORizontal FITtoscreen NRI OFF ON HORizontal FITtoscreen NR1 indicates OFF if it s a
26. 350 acquisitions took place since an AC QUIRE STATE RUN command was executed TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 29 Command Syntax ACQuire NUMAVg 2 30 Group Related Commands Syntax Arguments Examples Sets the number of waveform acquisitions that make up an averaged waveform This is equivalent to setting the Average count in the Acquisition Mode side menu Acquisition ACQuire MODe ACQuire NUMAVg lt NR1 gt ACQuire NUMAVg lt NR1 gt is the number of waveform acquisitions from 2 to 256 ACQUIRE NUMAVG 10 specifies that an averaged waveform will show the result of combining 10 separately acquired waveforms ACQUIRE NUMAVG might return 75 indicating that there are 75 acquisitions specified for averaging TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax ACQuire NUMENv Group Related Commands Syntax Arguments Examples Sets the number of waveform acquisitions that make up an envelope waveform This is equivalent to setting the Envelope count in the Acquisition Mode side menu Acquisition ACQuire MODe ACQuire NUMENv lt NR1 gt INFInite ACQuire NUMENv lt NR1 gt 0 is the number of waveform acquisitions from 2 to 256 The envelope will restart after the specified number of envelopes have been acquired or when the ACQuire STATE RUN command is sent INFInite or lt NR1 gt 0 specifies continuous enveloping NOTE If you set
27. CONTROL might return CH1 as the selected waveform Returns a string listing the oscilloscope settings except for the calibration values You can use this string to return the oscilloscope to the state it was in when you sent SET This command is identical to the LRN command Miscellaneous HEADer LRN VERBos SET NOTE The SET query always returns a string with command headers regardless of the setting of the HEADer command This is because the returned string is intended to be useable as a command string that can sent back to the oscilloscope The VERBos command can still be used to specify whether the returned headers should be abbreviated or full length SET a partial return string may look like this ACQUIRE STOPAFTER RUNSTOP STATE 1 MODE SAMPLE NUMENV 8 NUMAVG 16 HEADER 1 VERBOS 1 ALIAS STATE 0 DISPLAY FORMAT YT STYLE VECTORS PERSISTENCE 500 0E 3 GRATICULE FULL TRIGT 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions SRE Group Related Commands Syntax Arguments Examples Service Request Enable sets and queries the bits in the Service Request Enable Register SRER For a complete discussion of the use of these registers see page 3 1 Status and Error CLS DESE ESE ESR EVENT EVMSg FACtory PSC STB SRE NR1 SRE lt NR1 gt is a value in the range from 0 to 255 The binary bits of the SRER are set according to this value Using
28. CURVE lt space gt 110 109 110 110 109 107 109 107 106 105 103 100 97 90 84 80 Binary Data Binary data can be represented by signed integer or positive integer values The range of the values depends on the byte width specified When the byte width is one signed integer data ranges from 128 to 127 and positive integer values range from 0 to 255 When the byte width is two the values range from 32768 to 32767 The defined binary formats also specify the order in which the bytes are transferred giving a total of four binary formats RIBinary RPBinary SRIbina ry and SRPbinary RIBinary is a signed integer when the most significant byte is transferred first and RPBinary is a positive integer when the most significant byte is transferred first SRIbinary and SRPbinary correspond to RIBinary and RPBinary respectively but use a swapped byte order when the least significant byte is transferred first The byte order is ignored when DATa WIDth is set to 1 Waveform Data record You can transfer multiple points for each waveform record You can transfer a Lengths portion of the waveform or you can transfer the entire record The DATa STARt and DATa STOP commands let you specify the first and last data points of the waveform record When transferring data into the oscilloscope you must specify the location of the first data point within the waveform record For example when DATa STARt is set to 1 data points will be stored
29. DELay SECdiv HORizontal DELay TIMe HORizontal DELay HORIZONTAL DELAY might return the delay parameters HORIZONTAL DELAY MODE RUNSAF TER SCALE 1 0E 6 TIME RUNSAFTER 1 6E 8 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HORizontal DELay MODe Included for compatibility purposes only Group Horizontal Syntax X HORizontal DELay MODe RUNSAfter HORizontal DELay MODe Arguments RUNSAfter specifies that the delayed time base runs a user specified amount of delay time after the main trigger event HORizontal DELay SCAle Sets the time per division for the delayed time base This is equivalent to setting SCALE for the delayed time base Group Horizontal Related Commands HORizontal DELay SECdiv Syntax HORizontal DELay SCAle lt NR3 gt HORi zontal DELay SCAle Arguments lt NR3 gt is the time per division The range is 5 ns TDS 340A 2 5 ns TDS 360 or 2 5 ns TDS 380 to 5 s in a 1 2 5 sequence Values that are not in a 1 2 5 sequence are set to the closest valid value If the delayed time base scale is set slower than the main time base scale both the main and delayed time base scales are set to the delay scale value Examples HORIZONTAL DELAY SCALE 2 0E 6 sets the delay scale to 2 us per division HORIZONTAL DELAY SCALE 9 0E 6 sets the delay scale to 10 us per division Since 9 us is not a valid value within the 1 2 5 sequence it is automatically set to the closest valid v
30. Description Startor terminate hard copy Set query filename to which to send hard copy data Hard copy output format Hard copy orientation Hard copy port for output Horizontal Commands Horizontal commands control the oscilloscope time bases You can set the time per division or time per point of both the main and delayed time bases Table 2 11 Horizontal commands Header Description HORi zontal Return horizontal settings HORi zontal DELay Return delay time base settings HORi zontal DELay MODe Set delay time base mode HORi zontal DELay SCAle Set delay time base time division HORi zontal DELay SECdiv Same as HORizontal DELay SCAle HORi zontal DELay TIMe Set delay time TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 15 Command Syntax Table 2 11 Horizontal commands Cont Header Description HORi zontal DELay TIMe Return delay time parameters HORi zontal DELay TIMe Set query time delay between main trigger and delayed RUNSAfter time base HORi zontal FITtoscreen Set query horizontal 2X magnify HORi zontal MAIn Return time division of main time base HORi zontal MAIn SCAle Set main time base time division HORi zontal MAIn SECdiv Same as HOR izontal MAIn S CAle HORi zontal MODe Tum delay time base on or off HORizontal POSition Set portion of waveform to display HORi zontal RECOrdlength Return number of points in waveform record always 1000 points
31. EVENT EVENT might return the response EVENT 110 showing that there was an error in a command header TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 83 Command Descriptions EVMsg Query Only Removes from the Event Queue a single event code associated with the results of the last ESR read and returns the event code along with an explanatory message A more detailed discussion of event handling begins on page 3 1 Group Status and Error Related Commands ALLEv CLS DESE ESE ESR EVENT SRE STB Syntax EVMsg Returns The event code and message in the following format Event Code gt lt Comma gt lt QString gt lt Event Code gt lt Comma gt lt QString gt lt QString gt lt Message gt lt Command gt where lt Command gt is the command that caused the error and may be returned when a command error is detected by the oscilloscope As much of the command as possible is returned without exceeding the 60 character limit of the lt Message gt and lt Command gt strings combined The command string is right justified Examples EVMSG might return the message EVMSG 110 Command header error 2 84 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions EVQty Query Only Returns the number of event codes that are in the Event Queue This is useful when using ALLEv since it lets you know exactly how many events will be returned Group Status and Error Related
32. Electric Overload Avoid Electric Shock Ground the Product Do Not Operate Without Covers Use Proper Fuse Do Not Operate in Wet Damp Conditions Do Not Operate in an Explosive Atmosphere Review the following safety precautions to avoid injury and prevent damage to this product or any products connected to it To avoid potential hazards use the product only as specified Only qualified personnel should perform service procedures To avoid fire hazard use only the power cord specified for this product To avoid electric shock or fire hazard do not apply a voltage to a terminal that is outside the range specified for that terminal To avoid injury or loss of life do not connect or disconnect probes or test leads while they are connected to a voltage source This product is grounded through the grounding conductor of the power cord To avoid electric shock the grounding conductor must be connected to earth ground Before making connections to the input or output terminals of the product ensure that the product is properly grounded To avoid electric shock or fire hazard do not operate this product with covers or panels removed To avoid fire hazard use only the fuse type and rating specified for this product To avoid electric shock do not operate this product in wet or damp conditions To avoid injury or fire hazard do not operate this product in an explosive atmosphere TDS 340A TDS 360 amp TDS 380 Progra
33. FACtory command does not alter the following items m The state of the RS 232 or GPIB interface m Calibration data that affects device specifications W Protected user data W Stored settings W Stored waveforms or data m The current password if implemented m Hard copy parameters TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 Query Only Group Related Commands Syntax Arguments Examples RS232 BAUd Group Related Commands Syntax Arguments Examples TDS 340A TDS 360 amp TDS 380 Programmer Manual Queries the RS232 settings Miscellaneous RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 SOFT FLAGGING RS232 STOPBITS RS232 None RS232 might return RS232 BAUD 9600 MODE RAW PACE XON PARITY NONE SBITS 2 CONTROL RTS RFR RS232 TRANSMIT TERMINATOR LF DELAY 0 0 Sets or queries the RS 232 interface transmission speed If no flow control flagging is used commands may be received faster than the oscilloscope can process them Also if another command is sent immediately after this command without waiting for the baud rate to be programmed the first couple of characters may be lost Miscellaneous RS232 HARDFLAGGING RS232 PARITY RS232 SOFTFLAGGING RS232 STOPBITS RS232 RS232 BAUd NR1 RS232 BAUd NR1 where NR1 can be 300 600 1200 2400 4800 9600 19200 or 38400 RS232 BAUD 9600 sets the transmission rate to 9600 baud
34. GPIB Only Enable the OPC bit in the Device Event Status Enable Register DESER and the Event Status Enable Register ESER using the DESE and ESE commands Also enable service requests by setting the ESB bit in the Service Request Enable Register SRER using the SRE command When the operation is complete a Service Request is generated The same command sequence using the OPC command for synchronization looks like this Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE Enable the status registers DESE 1 ESE 1 SRE 32 Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Wait until the acquisition is complete before taking the measurement OPC Program can now do different tasks such as talk to other devices The SRQ when it comes interrupts those tasks and returns control to this task Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE This technique is more efficient but requires more sophisticated programming TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 11 Status and Events Using the OPC Query Messages 3 12 OPC places a 1 in the Output Queue once an operation is complete A time out could occur if you try to read the output queue before there is any data in it The same command sequence using
35. GRAticule CROSSHair specifies a frame and cross hairs only FRAme specifies just a frame FUL specifies a frame a grid and cross hairs GRId specifies a frame and grid only DISPLAY GRATICULE FRAME sets the graticule type to display the frame only DISPLAY GRATICULE returns FULL when all graticule elements grid frame and cross hairs are selected DiSplay INTENSITy Query Only Group Syntax Examples 2 76 Returns the current intensity settings for different parts of the display Display DISplay INTENSITy DISPLAY INTENSITY might return DISPLAY INTENSITY OVERALL 85 WAVEFORM BRI TEXT DIM CONTRAST 150 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DiSplay INTENSITy CONTRast Group Related Commands Syntax Arguments Examples Sets the intensity of the intensified zone on a waveform It also sets the intensity of BRIGHT versus DIM This command is equivalent to setting Contrast in the Display Intensity side menu Display HORizontal MODe DISplay INTENSITy CONTRast lt NR1 gt DISplay INTENSITy CONTRast lt NR1 gt ranges from 100 to 250 DISPLAY INTENSITY CONTRAST 140 sets the intensity of the intensified portion of a waveform and other bright parts of the display to 140 of normal DiSplay INTENSITy OVERAII Group Syntax Arguments Examples Sets the intensity of the entire display This command is equivalent to setting Overall in
36. HARDFLAGGING RS232 SOFTFLAGGING RS232 STOPBITS RS232 RS232 PRESet None RS232 PRESET sets RS232 parameters to the default values TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 139 Command Descriptions RS232 SBITS Sets or queries the number of transmission stop bits sent with each character to identify the end of data for that character This command performs the same function as RS232 STOPBits Group Miscellaneous Related Commands RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 SOFT FLAGGING RS232 Syntax RS232 SBITS lt NR1 gt RS232 SBITS Arguments lt NR1 gt where lt NR1 gt can either be 1 or 2 Examples RS232 SBITS 1 sets the number of stop bits to 1 2 140 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 SOFTFlagging Sets or queries the input and output soft flagging over the RS 232 port After receiving an XOFF DC3 the oscilloscope sends two or less characters The oscilloscope sends an XOFF character when its input buffer is running out of space After sending an XOFF character it can receive at least 20 more bytes The oscilloscope begins transmitting data again when it receives an XON DC1 character It sends XON when its input buffer has an acceptable number of free bytes When soft flagging is enabled and binary data is transferred data transmission will lock up if the data contains XOFF or XON characters Group Miscellan
37. Low Ref 90 and 0 V units 10 and 0 V units Measure Mid Ref 50 and 0 V units Ref ufm lock Locked Saved setups No change Saved waveforms No change Vertical bandwidth both channels Full Vertical coupling both channels DC Vertical offset both channels 0v Vertical position both channels 0 div Vertical volts div both channels 100 mV div Video trigger on Field Video trigger scan rate 15 20kHz Setup and Waveform File Formats D 2 TDS 300 Series setup and waveform files are not compatible with TDS 400 TDS 500 TDS 600 TDS 700 or TDS 800 Series setup or waveform files The TDS 300 Series oscilloscopes write information in Tek Codes and Formats ASCID structure while the other TDS Series oscilloscopes write information in Smalltalk data structures TDS 340A TDS 360 amp TDS 380 Programmer Manual _ IE Glossary ASCII Acronym for the American Standard Code for Information Interchange Controllers transmit commands to the digitizing oscilloscope using ASCII character encoding Address A 7 bit code that identifies an instrument on the communication bus The digitizing oscilloscope must have a unique address for the controller to recognize and transmit commands to it Backus Naur Form BNF A standard notation system for command syntax diagrams The syntax diagrams in this manual use BNF notation Controller A computer or other device that sends commands to and acce
38. MAIn HOLdoff Query Only Group Syntax Examples Returns the main trigger holdoff value Trigger TRIGger MAIn HOLdoff TRIGGER MAIN HOLDOFF might return TRIGGER MAIN HOLDOFF VALUE 5 0E 7 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 157 Command Descriptions TRIGger MAIn HOLdoff VALue Group Syntax Arguments Examples TRiGger MAIn LEVel Group Syntax Arguments Examples 2 158 Sets or queries the main trigger holdoff value Trigger TRIGger MAIn HOLdoff VALue lt NR3 gt TRIGger MAIn HOLdoff VALue lt NR3 gt is the holdoff from 500 ns to 10 s TRIGGER MAIN HOLDOFF VALUE 10 sets the holdoff value to 10 s Sets the main trigger level This command is equivalent to adjusting the front panel TRIGGER LEVEL knob Trigger TRIGger MAIn LEVel ECL TTL lt NR3 gt TRIGger MAIn LEVel ECL specifies a preset ECL level of 1 3 V TTL specifies a preset TTL level of 1 4 V lt NR3 gt specifies the main trigger level in volts TRIGGER MAIN LEVEL might return 1 4 indicating that the main edge trigger is set to 1 4 V TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TRIGger MAIn MODe Group Syntax Arguments Examples TRIGger MAIn TYPe Group Syntax Arguments Examples Sets or queries the main trigger mode Trigger TRIGger MAIn MODe AUTO NORMal TRIGger MAIn MODe AUTO generates a trigger if a trigge
39. METHod Sets or queries the method used to calculate the 0 and 100 reference level This is equivalent to setting the High Low Setup in the Measure menu Group Measurement Syntax MEASUrement METHod HIStogram MINMax MEASUrement METHod Arguments HIStogram sets the high and low waveform levels statistically using a histogram algorithm MINMax sets the high and low waveform levels to MAX and MIN respectively Examples MEASUREMENT METHOD HISTOGRAM 2 120 specifies that the high and low reference levels are set statistically MEASUREMENT METHOD returns MINMAX when the reference levels are set to MIN and MAX TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions MEASUrement REFLevel Query Only Group Syntax Returns the measurement reference levels in percent and absolute terms Measurement MEASUrement REFLevel MEASUrement REFLevel ABSolute HIGH Group Syntax Arguments Examples Sets or queries the high reference level and is the 100 reference level when MEASUrement REFLevel METHod is set to ABSolute This command is equivalent to setting the Reference Levels in the Measure menu Measurement MEASUrement REFLevel ABSolute HIGH lt NR3 gt MEASUrement REFLevel ABSolute HIGH lt NR3 gt is the high reference level in vertical units The default is 0 0 MEASUREMENT REFLEVEL ABSOLUTE HIGH 1 71 sets the high reference level to 1 71 V TDS 340A TDS 360
40. Part Number Cable Type Use 012 1379 00 9 pin female to 9 pin female PC AT or laptop null modem 012 1380 00 9 pin female to 25 pin female Old style PC with 25 pin con null modem nector 012 1298 00 9 pin female to 25 pin male Serial printers such as an HP null modem Deskjetand Sun workstations 012 1241 00 9 pin female to 25 pin male Telephone modem modem TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started Follow these guidelines when connecting the oscilloscope to another RS 232 device m Do not connect the output line of one DTE device to the output line of another DTE device m Connect the signal ground of the oscilloscope to the signal ground of the external device m Connect the chassis ground of the oscilloscope to the chassis ground of the external device Setting the RS 232 To set the RS 232 parameters do the following steps from the oscilloscope front Parameters panel After these parameters are set the RS 232 interface is ready to operate 1 Press the UTILITY button to display the Utility menu 2 Press the System main menu button until I O is selected in the pop up menu 3 Press the RS 232 main menu button to display the RS 232 side menu see Figure 1 6 UN Tek Run 100kS s Sample Baud Rate 9600 E RS 232 Configuration Baud Rate 9600 Hard Flagging al off E Soft Flagging on Set R5 232 Parameters To Defaul
41. Programmer Manual
42. SETUp TEKSecure RECATI SETUp FACtory lt NR1 gt lt QString gt FACtory selects the factory setup This is the same as the FACtory command lt NR1 gt is a value in the range from 1 to 10 and specifies a setup storage location Using an out of range value causes an execution error 222 Data out of range lt QString gt is the name of a file that contains setup information RECALL SETUP FACTORY recalls the front panel setup to its factory defaults TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RECAII WAVEform No Query Form Group Syntax Arguments Examples REM No Query Form Group Syntax Arguments Examples Recalls a stored waveform into a reference location NOTE TDS 300 Series oscilloscope waveform files are not compatible with TDS 400 TDS 500 TDS 600 TDS 700 or TDS 800 Series oscilloscopes waveform files Refer to Setup and Waveform File Formats on page D 2 for more information Save and Recall RECATI WAVEform lt QString gt REF lt x gt lt QString gt is a quoted string that defines the file name and path Input the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will recall the waveform from the default directory filename stands for a filename of up to 8 characters followed by a period and any 3 character extensi
43. Sets the number of bytes per data point in the waveform transferred using the CURVe command Waveform CURVe WFMPre BIT_Nr WFMPre BYT Nr DATa WIDth lt NR1 gt DATa WIDth lt NR1 gt 1 specifies that there is 1 byte 8 bits per point This format is useful when the acquisition mode is set to SAMple EN Velope or PEAKdetect If used for AVErage the low order byte is not transmitted lt NR1 gt 2 specifies that there are 2 bytes 16 bits per point This format is useful for AVErage waveforms If used for EN Velope PEAKdetect or SAMple the least significant byte is always zero If DATA WIDTH is set to 2 the block is twice as long as when it is 1 The length or number of bytes in the block can be calculated by DATA STOP DATA START 1 DATA WIDTH If DATA START and or DATA STOP extend beyond the limits of the waveform the number of bytes will be less DATA WIDth 1 sets the data width to 1 byte per data point for CURVe data TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DATE Group Related Commands Syntax Arguments Examples Sets or queries the date that the oscilloscope can display Miscellaneous DISplay CLOCk TIMe DATE lt QString gt DATE lt QString gt is a date in the form yyyy mm dd mm refers to a two digit month number from 01 to 12 dd refers to a two digit day number in the month yyyy refers to a four digit year number There must a dash aft
44. Up RS 232 Remote Communications Connecting to an RS 232 1 6 Device The TDS 300 Series oscilloscope has a 9 pin D type shell RS 232 connector located on the left side of the rear panel as shown in Figure 1 1 The RS 232 interface provides a point to point connection between the oscilloscope and equipment such as a computer or terminal This section tells how to connect and set up the oscilloscope for communication over the RS 232 interface The RS 232 standard defines two device types Data Terminal Equipment DTE and Data Communications Equipment DCE The TDS 300 Series oscilloscope is a DTE device In standard usage DTE devices have a male connector and DCE devices have a female connector You should use a straight through female to male cable of less than 50 feet for a local DTE to DCE connection Figure 1 5 shows the 9 pin connector with its pin number assignments 1 No connection 2 Receive data RxD input 3 Transmit data TxD output 4 Data terminal ready DTR output 5 Signal ground GND 6 Data set ready DSR input 7 Request to send RTS output 8 Clear to send CTS input 9 No connection Figure 1 5 The RS 232 connector pin assignments In terms of the connector and the way the oscilloscope uses the signal lines the oscilloscope behaves just like a PC AT COM port Table 1 2 lists cables you can use to connect the oscilloscope to other devices Table 1 2 RS 232 adapter cables Tektronix
45. Vertical Syntax SELect Examples SELECT might return SELECT CH1 1 CH2 0 MATHI O REF1 0 REF2 0 CONTROL CH1 SELect lt wfm gt Controls the display and selection of waveforms There can be up to five waveforms displayed at one time but only one waveform can be selected at a time The selected waveform is the waveform that was most recently turned on This command is equivalent to pressing a front panel channel button CH 1 CH 2 MATH REF 1 or REF 2 lt wfm gt can be CH lt x gt MATH 1 or REF lt x gt Group Vertical Syntax SELect wfm OFF ON NRI SELect wfm Arguments OFF or NR1 0 turns off the display of the specified waveform ON or lt NR1 gt 0 turns on the display of the specified waveform The waveform also becomes the selected waveform Examples SELECT CH2 ON turns the channel 2 display on and selects channel 2 SELECT REF 1 returns either 0 or 1 indicating whether the REF1 waveform is displayed TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 149 Command Descriptions SELect CONTROI Group Syntax Arguments Examples SET Query Only 2 150 Group Related Commands Syntax Examples Sets or queries the waveform that is currently measured and adjusted by the cursor and vertical commands Vertical SELect CONTRO lt wfm gt SELect CONTROT wfm is CH lt x gt MATHI or REF lt x gt and is the selected waveform SELECT
46. an out of range value causes an execution error The power on default for SRER is 0 if PSC is 1 If PSC is 0 the SRER maintains its value through a power cycle SRE 48 sets the bits in the SRER to 00110000 binary SRE might return a value of 32 showing that the bits in the SRER have the binary value 00100000 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 151 Command Descriptions STB Query Only Read Status Byte query returns the contents of the Status Byte Register SBR using the Master Summary Status MSS bit For a complete discussion of the use of these registers see page 3 1 Group Status and Error Related Commands CLS DESE ESE ESR EVENT EVMSg FACtory SRE Syntax STB Returns NRI Examples STB might return the value 96 showing that the SBR contains the binary value 01100000 TEKSecure Initializes both waveform and setup memories This overwrites any previously stored data it nulls all waveform reference memory and puts all setups in the factory init state It then verifies that the waveform and setup memory are in the desired state and displays a pass or a fail notifier on completion Group X Miscellaneous Syntax TEKSecure 2 152 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TIMe Group Related Commands Syntax Arguments Examples Sets or queries the time that the oscilloscope can display Miscellaneous DATE D
47. by this command LOCk ALL locks the front panel controls TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 109 Command Descriptions LRN Query Only Returns a string listing the oscilloscope settings except for configuration information for the calibration values You can use this string to return the oscilloscope to the state it was in when you sent LRN Group Miscellaneous Related Commands HEADer SET VERBose Syntax LRN NOTE LRN always returns a string including command headers regardless of the setting of the HEADer command This is because the returned string is intended to be sent back to the oscilloscope as a command string The VERBose command can still be used normally to specify whether the returned headers should be abbreviated Examples LRN a partial response might look like this ACQUIRE STATE 1 MODE SAMPLE NUMENV 10 NUMAVG 16 STOPAFTER RUNSTOP COUNT 1 HEADER 1 VERBOSE 1 CURSOR FUNCTION OFF VBARS UNITS SECONDS POSITION1 1 00E 6 POSITION2 9 00E 6 SELECT CURSOR1 MATH1 Query Only Returns the definition for the math waveform Group Vertical Syntax MATH1 2 110 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions MATH1 DEFINE Allows the user to define a new waveform using a mathematical expression Group Vertical Syntax MATH1 DEFINE lt QString gt Arguments lt QString gt contains the mathematical expression The expression c
48. event Reading an event removes it from the queue Before reading an event from the Event Queue you must use ESR to read the summary of the event from the SESR This makes the events summarized by ESR available to EVENT and EVMSG and empties the SESR Reading the SESR erases any events that were summarized by previous ESR reads but not read from the Event Queue Events that follow an ESR read are put in the Event Queue but are not available until ESR is used again TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 5 Status and Events Event Handling Sequence Device Event Status Enable Register DESER Read using DESE Write using DESE Standard Event Status Register SESR Read using ESR Cannot be written Event Status Enable Register ESER Read using ESE Write using ESE Status Byte Register SBR Read using STB Cannot be written Service Request Enable Register SRER Read using SRE Write using SRE a N 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE ROC OPC L Not 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Event Event Event 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE ROC OPC Byte x J Byte Byte Y 6 6 i bd 7 RQS 5 4 3 2 1 0 6
49. for compatibil ity purposes NOTE These commands do not support a query form and all information is ignored Table 2 26 Additional WFMPre commands Command Argument Description WFMPre NR_PT NRI Number of waveform points WFMPre WFId Waveform identifier WFMPre XUNi t QString Horizontal units WFMPre XMUTt lt NR3 gt Horizontal X axis scale factor WFMPre XOFf Horizontal X axis offset WFMPre XZEro lt NR3 gt Horizontal X axis origin offset WFMPre YUNit lt QString gt Vertical units WFMPre ZMUIt lt NR3 gt Z axis scale factor WFMPre ZOFf lt NR3 gt Z axis offset WFMPre ZUNi t Z axis units WFMPre ZZEro lt NR3 gt Z axis origin offset NOTE When returning WFMPRE lt wfm gt information from the oscilloscope lt wfm gt specifies the waveform source CH lt x gt MATH or REF lt x gt The source must also be set using the DAta SOUrce command When sending WFMPRE lt wfm gt information to the oscilloscope the lt wfm gt specification is ignored and the reference location specified by DATa DESTination is used instead TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre lt wfm gt Query Only Group Syntax Returns Returns the waveform formatting data for the waveform specified by the DATa SOUrce command Channel and math waveforms must be displayed before they can be queried Querying an invalid reference waveform generates an
50. is included in the error log in the Diag System of the Utility menu You can use the RS232 Line Snapshot entry of the error log to help establish an RS 232 connection The snapshot reports whether the oscilloscope is waiting to receive a control Q yes no the state of the hardware CTS line high low and whether characters have been received yes no Use the following statements to help you interpret the status reported in the error log m If soft flagging is on and if Waiting For Q is Yes the oscilloscope must receive an XON character before it will transmit any more data m If hard flagging is on and CTS is Low the oscilloscope will not transmit any data m If hard flagging is off you should ignore the value of CTS since the oscilloscope ignores it m If Chars Revd is Yes the oscilloscope has received at least one character since the last power on The RS232 Errors line of the error log lists the number of parity framing and overrun errors since the last power on Checking Command Status If you want to check the status of each command sent you can append a STB query after every command and read the response string TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started RS 232 Troubleshooting If the oscilloscope and the personal computer or printer have trouble communi cating use the following steps to correct the problem 1 Verify that you are using the correct RS 232 cable Determine whethe
51. of ASCII characters enclosed by a single quote or double quote For example this is a quoted string Symbol Meaning lt QString gt Quoted string of ASCII text Follow these rules when you use quoted strings m A quoted string can include any character defined in the 7 bit ASCII character set See Appendix A W Use the same type of quote character to open and close the string this is a valid string m You can mix quotation marks within a string as long as you follow the previous rule this is an acceptable string TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax W You can include a quote character within a string simply by repeating the quote For example here is a mark m Strings can have upper or lower case characters W You cannot terminate a quoted string with the END message before the closing delimiter m A carriage return or line feed embedded in a quoted string does not terminate the string but is treated as just another character in the string m The maximum length of a quoted string returned from a query is 1000 characters Here are some invalid strings Invalid string argument quotes are not of the same type test EOI termination character is embedded in the string Block Arguments Several oscilloscope commands use a block argument form Symbol Meaning lt NZDi g gt A non zero digit character in the range 1 9 lt Dig gt A digit character in the
52. range 0 9 lt DChar gt A character with the hex equivalent of 00 through FF hexadecimal 0 through 255 decimal Block A block of data bytes defined as Blocks lt NZDig gt lt Dig gt lt Dig gt lt DChar gt 0 lt DChar gt lt terminator gt NZDi g gt specifies the number of Dig elements that follow Taken together the Dig elements form a decimal integer that specifies how many lt DChar gt elements follow 0 means that the Block is an indefinite length block The terminator ends the block You should not use indefinite length blocks with RS 232 because there is no way to include a terminator character as a lt DChar gt character The first occurrence of a terminator character signals the end of the block and any subsequent lt DChar gt characters will be interpreted as a syntax error TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 9 Command Syntax 2 10 With the GPIB the EOI line signals the last byte Figure 2 2 shows an example of a block argument Block argument A C ALIas DEFINE SETUp1 f231AUTOSet EXEcute SELect REF1 Block header N S pecifies data length Specifies number of length digits that follow Figure 2 2 Block argument example TDS 340A TDS 360 amp TDS 380 Programmer Manual Bep V Command Groups This section lists commands by functional groups The following section Co
53. reference level is set to 95 of HIGH MEASUrement REFLevel PERCent LOW Group Syntax Arguments Examples 2 124 Sets or queries the percent relative to LOW that is used to calculate the low reference level when MEASUrement REFLevel METHod is set to PERCent This command is equivalent to setting the Reference Levels in the Measure menu Measurement MEASUrement REFLevel PERCent LOW lt NR3 gt MEASUrement REFLevel PERCent LOW lt NR3 gt ranges from 0 to 100 and is the low reference level The default is 10 MEASUREMENT REFLEVEL PERCENT LOW might return 15 meaning that the low reference level is 15 of LOW TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions MEASUrement REFLevel PERCent MID Sets or queries the percent relative to MID that is used to calculate the mid reference level when MEASUrement REFLevel METHod is set to PERCent This command is equivalent to setting the Reference Levels in the Measure menu Group Measurement Syntax X MEASUrement REFLevel PERCent MID lt NR3 gt MEASUrement REFLevel PERCent MID Arguments lt NR3 gt ranges from 0 to 100 and is the mid reference level The default is 50 Examples MEASUREMENT REFLEVEL PERCENT MID 60 specifies that the mid reference level is set to 60 of MID NEWpass No Query Form Changes the password that enables access to password protected data The PASSWord command must be successfull
54. results in more bus traffic If the corresponding status registers are enabled the OPC command sets the OPC bit in the Standard Event Status Register SESR when an operation is complete You can use this command in conjunction with either a serial poll or service request handler to achieve synchronization Serial Poll Method GPIB Only Enable the OPC bit in the Device Event Status Enable Register DESER and the Event Status Enable Register ESER using the DESE and ESE commands When the operation is complete the OPC bit in the Standard Event Status Register SESR is enabled and the Event Status Bit ESB in the Status Byte Register is enabled The same command sequence using the OPC command for synchronization with serial polling looks like this Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE Enable the status registers DESE 1 ESE 1 SRE 0 Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Wait until the acquisition is complete before taking the measurement OPC While serial poll 0 keep looping TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE This technique requires less bus traffic than did looping on BUSY Service Request Method
55. sending data Miscellaneous RS232 HARDFLAGGING RS232 SOFTFLAGGING RS232 STOPBITS RS232 RS232 TRANsmit DELay NRI RS232 TRANsmi t DELay lt NR1 gt the delay value from 0 s to 60 s RS232 TRANsmit DELay 0 sets the transmit delay to O s TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 143 Command Descriptions RS232 TRANsmit TERMinator Group Related Commands Syntax Arguments Examples 2 144 Sets or queries the end of line EOL terminator When transmitting the oscilloscope appends the terminator to the end of each message When receiving the oscilloscope accepts all four terminators regardless of the currently selected terminator When a combination of multiple characters is selected CRLF or LFCR the oscilloscope interprets the first character as the terminator it treats the second character as a null command CR represents an ASCII carriage return character OxOD and LF represents an ASCII linefeed character 0x0A Miscellaneous RS232 HARDFLAGGING RS232 SOFTFLAGGING RS232 STOPBITS RS232 RS232 TRANsmit TERMinator CR LF CRLf LFCr RS232 TRANsmi t TERMi nator CR selects the carriage return character as the EOL terminator lt LF gt selects the line feed character as the EOL terminator lt CRLf gt selects the carriage return and line feed characters as the EOL terminator lt LFCr gt selects the line feed and carriage return characters as the EOL te
56. starting with the first point in the record and when DATa STARt is set to 500 data will be stored starting at the 500 point in the record DATa STOP will be ignored when transferring data into the oscillo scope as the oscilloscope will stop reading data when there is no more data to read or when the record length has been reached When transferring data from the oscilloscope you must specify the first and last data points in the waveform record Setting DATa STARt to 1 and DATa STOP to 1000 always returns the entire waveform TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 23 Command Syntax Waveform Data Locations and Memory Allocation Waveform Preamble Scaling Waveform Data Transferring Waveform Data from the Oscilloscope 2 24 The DATa SOUrce command specifies the location of the data when transferring waveforms from the oscilloscope You can transfer multiple waveforms at one time by specifying more than one source You can transfer only one waveform to the oscilloscope at a time Waveforms sent to the oscilloscope are always stored in one of the two reference memory locations You specify the reference memory location with the DATa DESTina tion command The waveform should be 1000 data points in length NOTE The oscilloscope accepts waveforms that are lt 1000 data points long The oscilloscope will truncate waveforms larger than 1000 data points Each waveform that is transferred has an associated w
57. such as input coupling volts division time division acquisition mode and record length The WFMPre lt wfm gt WFId command is ignored on input Waveform WFMPre lt wfm gt WFId lt QString gt WFMPre wfm WFId lt QString gt is the waveform identifier string TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 177 Command Descriptions WFMPre lt wfm gt XINecr Sets or queries the horizontal sampling interval of the specified waveform The command and query form ignores the lt wfm gt parameter instead the instrument uses the reference location specified by DATa DESTination command Group Waveform Syntax WFMPre wfm XINcr lt NR3 gt WFMPre wfm XINcr Arguments lt NR3 gt is the sampling interval WFMPre lt wfm gt XUNit Sets or queries the horizontal X axis units of the waveform data Group Waveform Syntax WFMPre lt wfm gt XUNit lt QString gt WFMPre lt wfm gt XINcr Arguments lt QString gt is s for seconds or Hz for Hertz Examples WFMPRE CHl XUNIT returns s indicating that the horizontal units for channel 1 are seconds 2 178 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre lt wfm gt YMUIt Group Syntax Arguments WFMPre lt wfm gt YOFf Group Syntax Arguments Sets or queries the vertical scale factor in YUNit s per digitizing level The command and query form ignores the lt wfm gt parameter ins
58. that the data will be transferred is CH1 CH2 MATHI and REF2 DATA SOURCE might return REF1 indicating the source for the waveform data that is transferred using CURVE TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DATa STARt Group Related Commands Syntax Arguments Examples Sets or queries the starting data point for waveform transfer This command allows for the transfer of partial waveforms to and from the oscilloscope Waveform CURVe DATa SNAp DATa STOP DATa STARt lt NR1 gt DATa STARt lt NR1 gt ranges from 1 to the record length and is the first data point that will be transferred Data is transferred from lt NR1 gt to DATa STOP or the record length whichever is less If lt NR1 gt is greater than the record length then the oscilloscope transfers data until it reaches the record length When DATa STOP is less than DATa STARt the values are swapped internally for CURVe DATA START 10 specifies that the waveform transfer will begin with data point 10 DATA START might return 214 as the first waveform data point that will be transferred TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 65 Command Descriptions DATa STOP Group Related Commands Syntax Arguments Examples 2 66 Sets or queries the last data point that will be transferred when using CURVe This lets you transfer partial waveforms to the controller When using the CURVe co
59. the acquisition system to single sequence envelope mode and set the number of envelopes to infinity the oscilloscope will envelope a maximum of 257 acquisitions ACQUIRE NUMENV 10 specifies that an enveloped waveform will show the result of combining 10 separately acquired waveforms ACQUIRE NUMENV might return 0 indicating that acquisitions are acquired infinitely for enveloped waveforms TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 31 Command Syntax ACQuire STATE Starts or stops acquisitions This is the equivalent of pressing the front panel RUN STOP button If ACQuire STOPAfter is set to SEQuence other signal events may also stop acquisition Group Acquisition Related Commands ACQuire NUMACq ACQuire STOPAfter Syntax ACQuire STATE OFF ON RUN STOP NR1 ACQuire STATE Arguments OFF or STOP or lt NR1 gt 0 stops acquisitions ON or RUN or lt NR1 gt 0 starts acquisition and display of waveforms If the command was issued in the middle of an acquisition sequence for instance averaging or enveloping RUN restarts the sequence discarding any data accumulated before the STOP It also resets the number of acquisitions Examples ACQUIRE STATE RUN starts acquisition of waveform data and resets the number of acquisitions count NUMACQ to zero ACQUIRE STATE returns either 0 or 1 depending on whether the acquisition system is running 2 32 TDS 340A TDS 360 amp TDS 380 Program
60. the base of the command tree Queries Queries cause the oscilloscope to return information about its status or settings Queries have the structure m Header m lt Header gt lt Space gt lt Argument gt lt Comma gt lt Argument gt You can specify a query command at any level within the command tree unless otherwise noted These branch queries return information about all the mnemon ics below the specified branch or level For example DISplay INTENSITy CON trast returns the intensity of the intensified zone of a waveform while DISplay INTENSITy returns the intensity settings of all parts of the display Headers in Query You can control whether the oscilloscope returns headers as part of the query Responses response Use the HEADer command to control this feature If header is on the oscilloscope returns command headers as part of the query and formats the query response as a valid set command When header is off the oscilloscope sends back only the values in the response This may make it easier to parse and extract the information from the response Table 2 3 shows the difference in responses Table 2 3 Comparison of header off and on responses Query Header Off Response Header On Responses CURSor VBArs 1 064E 3 CURSor VBArs DELTa 1 064E 3 DELTa ACQuire 16 ACQUIRE NUMAVG 16 NUMAVg TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 3 Command Syntax Clearing the Oscilloscope Com
61. the oscillo scope GETWFM reads a waveform from an oscilloscope and stores its time and voltage values in a file TL a talker listener program The example programs diskette contains programs written in Microsoft QuickBASIC 4 5 Executable versions of the programs are in the PROGRAMS directory Source versions are in the SOURCES directory Within this directory the QuickB ASIC programs are in the Q BASIC subdirectory A README file in each directory explains how to build executable code from the source files provided NOTE The programs you compile in the Sources directory may require extra steps or changes to get them to work with your system Compiling and Linking Your Example QuickBASIC Programs To make an executable for any of the following files perform the following 1 Install QuickBASIC 2 Connect the oscilloscope to the COM2 port of the personal computer Set the oscilloscope RS 232 parameters to the default values 3 Copy the files from the examples diskette to your hard disk You might also create a special directory to store them For example if the current drive is hard disk C you want to store the examples in drive C and the examples diskette is in drive B type mkdir examples cd examples copy b rs232 q basic TDS 340A TDS 360 amp TDS 380 Programmer Manual Programming Examples 4 Perform the following two steps for example programs a Compile the programs using the followi
62. the time in seconds it takes for one complete signal cycle to happen PK2pk is the absolute difference between the maximum and minimum amplitude POVershoot is the positive overshoot expressed as Maximum High POVershoot 100 X Aplitide PWIdth is the distance time between MidRef usually 5096 amplitude points of a positive pulse RISe is the time that it takes for the leading edge of a pulse to rise from a low reference value to a high reference value RMS is the true Root Mean Square value MEASUREMENT MEAS3 TYPE RMS specifies MEAS3 to calculate the Root Mean Square value MEASUrement MEAS lt x gt UNIts Query Only Group Syntax Returns Examples Returns the units for the measurement specified by MEASUre ment MEAS lt x gt TYPe Measurement MEASUrement MEAS lt x gt UNIts lt QString gt returns V for volts VV for volts squared dB for decibels s for seconds Hz for Hertz or for percent MEASUREMENT MEAS3 UNITS might return indicating the units for Measurement 3 are percent TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 119 Command Descriptions MEASUrement MEAS lt x gt VALue Query Only Returns the value that has been calculated for the measurement specified by lt x gt NOTE This value is a display value and will be updated every 1 3 second Group Measurement Syntax MEASUrement MEAS x VALue Returns NR3 MEASUrement
63. 11 WAVEform SAV SAVe SETUp Recall saved oscilloscope setting Recall saved waveform from file Save oscilloscope setting Save oscilloscope setting SAVe WAVEform SAVe WAVEform FILEFormat TDS 340A TDS 360 amp TDS 380 Programmer Manual Save waveform Save waveform to specified file format 2 19 Command Syntax Status and Error Commands Trigger Commands 2 20 Table 2 16 lists the status and error commands the oscilloscope supports These commands let you determine the status of the oscilloscope Several commands and queries used with the oscilloscope are common to all devices on the GPIB bus These commands and queries are defined by IEEE Std 488 2 1987 and Tek Standard Codes and Formats 1989 and begin with an asterisk character Table 2 16 Status and error commands Header Description ALLEv Return all events BUSY Return scope busy events CLS Clear device DESE Device event status enable ESE Event status enable ESR Return standard event status register EVENT Return event code EVMsg Return event code and message EVQty Return number of events in queue OPC Operation complete PSC Power on status clear SRE Service request enable STB Read status byte WAI Waitto continue Trigger commands control all aspects of oscilloscope triggering You can set the main trigger to one of two modes edge and video The default mode is Edge triggering Edge triggering lets you acq
64. 8 Execution warning messages EXE Bit 4 Code Message 500 Execution warning 510 String data too long truncated 525 Parameter underrange 526 Parameter overrange 521 Parameter rounded 528 Parameter out of range 530 Data stop stop Values swapped internally 531 Data stop record length Curve truncated 532 Curve data too long Curve truncated 540 Measurement warning 541 Measurement warning Low signal amplitude 542 Measurement warning Unstable histogram 543 Measurement warning Low resolution 544 Measurement warning Uncertain edge TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 17 Status and Events Table 3 8 Execution warning messages EXE Bit 4 Cont Code Message 545 Measurement warning Invalid in minmax 546 Measurement warning Need 3 edges 547 Measurement warning Clipping positive negative 548 Measurement warning Clipping positive 549 Measurement warning Clipping negative Table 3 9 shows internal errors that indicate an internal fault in the oscilloscope Table 3 9 Internal warning messages Code 600 Message Internal warning TDS 340A TDS 360 amp TDS 380 Programmer Manual a ers Programming Examples The example programs illustrate methods you can use to control the oscilloscope from the GPIB or RS 232 interface The diskettes that come with this manual contain listings for these programs The programs run on a PC compatible system
65. 8 Vertical commands Header CH lt x gt CH lt x gt BANdwidth CH lt x gt COUP1 ing Description Return vertical parameters Channel bandwidth Channel coupling CH lt x gt INVert Invert channel CH x 0FFSet CH lt x gt POSition TDS 340A TDS 360 amp TDS 380 Programmer Manual Channel offset Channel position 2 21 Command Syntax Waveform Commands 2 22 Waveform Data Commands Table 2 18 Vertical commands Cont Header Description CH x PRObe Return channel probe attentuation CH lt x gt SCAle Channel volts or dB per division CH lt x gt VOLts Same as CH lt x gt SCAle EXT PRObe Return external trigger attenuation factor MATH1 Return math waveform definition MATH1 DEFINE Math waveform definition SELect Return selected waveform SELect wfm Setselected waveform SELect CONTRO Set query the channel affected by the front panel controls ZOOM VERTical POSition Set query the vertical position of math and reference waveforms ZOOM VERTi cal SCALEe Set query the vertical expansion or compression factor Waveform commands let you transfer waveform data points to and from the oscilloscope Waveform data points are a collection of values that define a waveform One data value usually represents one data point in the waveform record When working with enveloped waveforms each data value is either the min or max of a max min pair Before you can transfer wavefor
66. A 2 56 CURSOR VBARS 2 57 CURSOR VBARS DELTA 2 57 CURSOR VBARS POSITION lt x gt 2 58 CURSOR VBARS SELECT 2 59 CURSOR VBARS UNITS 2 59 Index 2 Cursor position command mnemonic 2 6 CURVE 2 60 D DATA 2 61 DATA DESTINATION 2 62 DATA ENCDG 2 63 DATA SOURCE 2 64 DATA START 2 65 DATA STOP 2 66 DATA TARGET 2 67 DATA WIDTH 2 68 DATE 2 69 DCL C 2 DDT 2 70 DESE command 2 71 3 3 DESER register 2 71 2 128 3 3 Device Clear 2 4 C 2 DIAG RESULT FLAG 2 72 DIAG RESULT LOG 2 72 DIAG SELECT ALL 2 73 DIAG STATE 2 73 Display command group 2 74 Display commands CLEARMENU 2 49 DISPLAY 2 74 DISPLAY CLOCK 2 74 DISPLAY DATE TIME See DISPLAY CLOCK DISPLAY FORMAT 2 75 DISPLAY GRATICULE 2 76 DISPLAY INTENSITY 2 76 DISPLAY INTENSITY CONTRAST 2 77 DISPLAY INTENSITY OVERALL 2 77 DISPLAY INTENSITY TEXT 2 78 DISPLAY INTENSITY WAVEFORM 2 78 DISPLAY PERSISTENCE 2 79 DISPLAY STYLE 2 80 DISPLAY TRIGT 2 87 E End or Identify Glossary 1 EOI Glossary 1 EOM Glossary 1 EOM end of message 2 6 Error message programming interface 3 12 ESE 2 82 3 4 ESER register 2 82 2 126 3 4 ESR 2 83 ESR query 3 7 Event handling 3 3 6 TDS 340A TDS 360 amp TDS 380 Programmer Manual Index Event query 2 83 2 84 Event queue 2 83 2 84 3 5 EVENT 2 83 EVMSG 2 84 EVQTY 2 85 Example programs 4 F FACTORY 2 86
67. A TDS 360 amp TDS 380 Programmer Manual Table of Contents List of Tables Table 1 1 Comparison of GPIB and RS 232 interfaces 1 2 Table 1 2 RS 232 adapter cables eere 1 6 Table 1 3 RS 232 default settings Le 1 9 Table 1 4 RS 232 troubleshooting eee 1 11 Table 1 5 Comparison of programming and front panel models 1 13 Table 2 1 BNF symbols and meanings 2 1 Table 2 2 Command message elements 2 2 Table 2 3 Comparison of header off and on responses 2 3 Table 2 4 Acquisition commands eene 2 11 Table 2 5 Alias commands cece cece cece ewe eee nnn 2 12 Table 2 6 Calibrating and diagnostic commands 2 12 Table 2 7 Cursor commands cece cece cece rece e sees 2 13 Table 2 8 Display commands eee 2 14 Table 2 9 File system commands eene 2 14 Table 2 10 Hard copy commands eene 2 15 Table 2 11 Horizontal commands eee 2 15 Table 2 12 Measurement commands eee 2 17 Table 2 13 Miscellaneous commands eese 2 18 Table 2 14 RS 232 commands eee 2 19 Table 2 15 Save and recall commands 2 19 Table 2 16 Status and error commands 2 20 Table 2 17 Trigger commands
68. A 74 5A 90 122 13 33 53 LAT 73 LA27 113 TAN 133 TA27 SA27 10 11 VT ESC K B 11 18 27 28 43 3B 59 4B 75 58 91 123 14 34 54 LA12 74 LA28 114 TA12 134 TA28 SA28 1100 FF FS L i c 12 1C 28 2C 44 3C 60 4C 76 5C 92 124 15 35 55 LA13 75 LA29 115 TA13 135 TA29 SA29 1101 CR GS M D 13 1D 29 2D 45 3D 61 4D 77 sb 93 125 16 36 56 LA14 76 LA30 116 Ta14 136 TA30 SA30 1110 SO RS gt N A E 14 1E 30 2 46 3t 62 4 78 5E 94 7E 126 17 37 57 LAt5 77 UNL 17 TAB 137 UNT 17 111 1 SI US l 0 RUBOUT F 15 1F a 2F 47 3F 63 4F 79 sr 95 p CB ES ADDRESSED UNIVERSAL LISTEN TALK SECONDARY ADDRESSES COMMANDS COMMANDS ADDRESSES ADDRESS OR COMMANDS KEY el fF PPC GPIB code with ATN assorted Tektr ra ieee hex gt t 5 sd den IEEE STD 488 1 1987 ISO STD 646 2973 TDS 340A TDS 360 amp TDS 380 Programmer Manual A 1 Appendix A ASCII amp GPIB Code Chart A 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual P er Appendix B Reserved Words The following is a list of the reserved words of the digitizing oscilloscope Do not use these words for aliases The list starts on the next page TDS 340A TDS 360 amp TDS 380 Programmer Manual B 1 Appendix B Reserved Words CAL CLS DDT ESE ESR D IST LR OPC PSC PUD RCL RST S AV SRE STB TRG TST WAI ABOrt ABSolute AC ACQuire ACCUMDots ACCU
69. BARS SELECT returns CURSOR1 when the first vertical bar cursor is the active cursor Sets or queries the units for the vertical bar cursors This is equivalent to setting Time Units in the Cursor menu Note that if the current waveform is an FFT the oscilloscope will display units as Hertz even if you specified seconds Cursor CURSor VBArs DELTa CURSor VBArs POSITION lt x gt CURSor VBArs UNIts SECOnds HERtz CURSor VBArs UNIts CURSOR VBARS UNITS SECONDS sets the units for the vertical bar cursors to seconds CURSOR VBARS UNITS returns HERTZ when the vertical bar cursor units are Hertz TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 59 Command Descriptions CURVe 2 60 Group Related Commands Syntax Arguments Examples Transfers waveform data to and from the oscilloscope in binary or ASCII format Each waveform that is transferred has an associated waveform preamble that contains information such as data format and scale Refer to the WFMPre command starting on page 2 167 for information about the waveform preamble The data format is specified by the DATa ENCdg and DATa WIDTH commands The CURVe query transfers data from the oscilloscope The data source is specified by the DATa SOUrce command If more than one source is specified a comma separated list of data blocks is returned The first and last data points that are transferred are specified by the DATa STARt and DATa STOP command
70. C to the oscilloscope and that the PC is executing a terminal emulator program such as a Microsoft Windows Terminal for RS 232 or National Instrument s ibic program for GPIB Be sure to set the communication settings in the terminal emulator program to match those of the oscilloscope Refer to Section 4 for more information on setting up a GPIB card 1 Connect the oscilloscope probe to the channel 1 input BNC Attach the probe tip and reference lead to the PROBE COMP connectors just above and to the left of the channel 1 BNC The PROBE COMP signal is a square wave with a frequency of 1 kHz Figure 1 8 shows how to hook up the probe to the oscilloscope FORCE TRIGGER DER 300V S 400V pk Cari IN EXT TRIG Figure 1 8 Connecting to the PROBE COMP signal 2 Press the ON OFF button to turn on the oscilloscope After a few seconds you should see a window with the message Power On self check PASSED 3 Press the CLEAR MENU button to begin operation 4 From your PC send the query ID The oscilloscope responds with its identification string ID TEK TDS 340 CF 91 1CT FV v1 00 or similar TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started 5 Send the command FACTory to reset the oscilloscope to the factory default settings The factory default state is described in Appendix D Factory Setup 6 Send the command AUTOSet EXECute to have
71. Command 2 2 Command terminator 2 6 Handling 3 7 Table of program messages 3 12 Miscellaneous LOCK 2 709 Miscellaneous command group 2 8 Miscellaneous commands AUTOSET 2 39 DATE 2 69 DDT 2 70 FACTORY 2 66 HDR 2 97 HEADER 2 97 IDN 2 108 LRN 2 110 NEWPASS 2 125 PASSWORD 2 127 Index 4 PUD 2 129 REM 2 131 SET 2 750 TEKSECURE 2 52 TIME 2 153 TRG 2 154 UNLOCK 2 64 VERBOS 2 165 Mnemonic command 2 2 N NEWPASS 2 125 Numeric command argument 2 8 O OPC 2 126 Operation complete command 2 726 Operation complete wait 2 66 Output queue 3 5 P Parallel poll C 2 PASSWORD 2 127 POSITION lt x gt command mnemonic 2 6 Power on status clear command 2 28 PPC C 2 PPD C 2 PPE C 2 PPU C 2 Printers Connecting 1 6 Programming examples 4 Programming model 1 13 PSC 2 128 PSC command 3 4 PUD 2 29 Q Query Header in query response 2 97 2 165 Query command 2 7 Queue Event 3 5 Output 3 5 QuickBASIC Glossary 1 QuickC Glossary 2 Quoted string command argument 2 6 TDS 340A TDS 360 amp TDS 380 Programmer Manual Index R RCL 2 129 Recall setting command 2 129 RECALL SETUP 2 130 RECALL WAVEFORM 2 131 Reference waveform command mnemonic 2 7 REF lt x gt command mnemonic 2 7 Register DESER 2 71 2 128 3 3 ESER 2 82 2 126 3 4 SBR 2 152 3 2 SESR 2 50 2 83 2 126 3 1 SR
72. Commands ALLEv EVENT EVMsg Syntax EVQty Returns NRI Examples EVQTY might return 3 as the number of event codes in the Event Queue TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 85 Command Descriptions EXT PRObe Query Only Returns the attenuation factor of the probe that is attached to the external trigger connector Group Vertical Syntax EXT PRObe Returns lt NR3 gt Examples EXT PROBE might return 1 0E1 for a 10x probe FACtory No Query Form Resets the oscilloscope to its factory default settings see Appendix D The FACtory command does everything that the RST command does Group Miscellaneous Related Commands Syntax PSC RCL RECAII SETUp RST SAV SAVe SETUp TEKSecure FACtory FILESystem COPy No query form Group Syntax 2 86 Copies a named file or files to a new file The new file can be in a totally separate directory than the old file Also you can use wild card characters to copy multiple files with one command File system FILESystem COPy source file path gt lt destination file path source directory path gt lt destination file path source directory path gt lt destination directory path TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions Arguments Examples FILESystem CWD Group Syntax Arguments Examples lt file path gt is a quoted string that defines the file na
73. Copy FORMat BMP DESKJet DPU411 DPU412 EPSImage EPSOn INTERLeaf LASERJet PCX THInkjet TIFf HARDCopy FORMat Arguments BMP sets the format to Microsoft Windows file format DESKjet sets the format to high resolution printer format DPU411 sets the format to thermal printer format for DPU 411 I or HC 411 DPU412 sets the format to thermal printer format for DPU 412 EPSImage sets the format to encapsulated postscript image file format EPSOn sets the format to 9 pin or 24 pin dot matrix printer format INTERLeaf sets the format to Interleaf image object file format LASERJet sets the format to laser printer format PCX sets the format to PC Paintbrush monochrome image file format THInkjet sets the format to inkjet printer format TIFf sets the format to tag image file format Examples HARDCOPY FORMAT TIFf sets the hardcopy output format to TIFF HARDCOPY FORMAT might return INTERLEAF as the hardcopy output format TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 95 Command Descriptions HARDCopy LAYout Group Syntax Arguments Examples HARDCopy PORT Group Related Commands Syntax Examples 2 96 Selects the printing orientation This is equivalent to setting Layout in the Hardcopy menu Hardcopy HARDCopy LAYout LANDscape PORTRait HARDCopy LAYout LANDscape specifies that the bottom of the hardcopy is along the long side of the page PORTRait specifies that the b
74. DEO SCAN 2 161 TRIGGER MAIN VIDEO SOURCE 2 162 TRIGGER STATE 2 163 TST query 2 163 Tutorial 1 14 Index 6 U UNL C 2 Unlisten C 2 UNLOCK 2 64 UNT C 2 Untalk C 2 V VERBOS 2 165 Vertical MATH x2 2 110 MATH x DEFINE 2 111 Vertical bar cursors 2 57 Vertical command group 2 27 Vertical commands CH lt x gt 2 43 CH lt x gt BANDWIDTH 2 43 CH lt x gt COUPLING 2 44 CH lt x gt INVERT 2 45 CH lt x gt OFFSET 2 46 CH lt x gt POSITION 2 47 CH lt x gt PROBE 2 47 2 66 CH lt x gt SCALE 2 48 CH lt x gt VOLTS 2 49 SELECT 2 149 SELECT lt wfm gt 2 149 SELECT CONTROL 2 750 W WAI 2 166 Wait for operation complete 2 66 Waveform command mnemonic 2 7 Waveform command group 2 22 Waveform commands CURVE 2 60 DATA 2 61 DATA DESTINATION 2 62 DATA ENCDG 2 63 DATA SOURCE 2 64 DATA START 2 65 DATA STOP 2 66 DATA TARGET 2 67 DATA WIDTH 2 68 WAVFRM 2 166 WFMPRE 2 167 TDS 340A TDS 360 amp TDS 380 Programmer Manual Index WEMPRE lt wfm gt 2 175 WFMPRE wfm NR PT 2 175 WFMPRE wfm PT FMT 2 176 WFMPRE wfm PT OFF 2 77 WFMPRE wfm WFID 2 177 WFMPRE wfm XINCR 2 178 WFMPRE wfm XUNIT 2 178 WFMPRE wfm Y MULT 2 179 WFMPRE wfm YOFF 2 79 WFMPRE wfm YUNIT 2 780 WEMPRE lt wfm gt YZERO 2 180 WFMPRE BIT NR 2 168 WFMPRE BN FMT 2 68 WFMPRE BYT NR 2 69 WFMPRE BYT OR 2 69 WFMPRE ENCDG 2 170 WF
75. E Calibration and Diagnostic Commands Remove a named alias Turn the alias state on and off Calibration and Diagnostic commands let you run the self calibration and diagnostic routines that are built into the oscilloscope The diagnostic test operation includes selecting the test sequence executing the sequence and then examining the results Table 2 6 Calibrating and diagnostic commands Header CAL CALibrate CALibrate S TATUS DIAg RESULT FLAg Description Perform an internal self calibration Perform an internal signal path compensation Return status from last adjustment sequence Return diagnostic tests status DIAg RESULT LOG DIAg SELect ALL DIAg STATE Return diagnostic test sequence results Diagnostic test sequence for Acquisition P rocessor Display Front panel and floppy disk drive Control diagnostic tests TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Cursor Commands Cursor commands control cursor display and readout Table 2 7 Cursor commands Header CURSor Description Returns cursor settings CURSor FUNCtion CURSor HBArs CURSor HBArs DELTa CURSor HBArs POSITION lt x gt Set cursors on or off select cursor type Return horizontal bar cursor settings Return vertical distance between horizontal bar cursors Position a horizontal bar cursor CURSor HBArs SELect CURSor PAIred HDELTA CURSor PAIred HP0S1 CURSor PAIred HP
76. E ORMa OVershoot R Pt NUMACq NUMAVg NUMERRors NUMEnv NWIdth ODD OFF OFFSet ON ONCE OPTion OVERAII OVER Write PACE PAIRed PARity PASSWord PCX PDUTy PEAKdetect PERCent PERIod PERSistence PITBULL PK2pk PORT PORTRait POSition POSITION1 POSITION2 POVershoot PRESet PREss PRInt PRObe PT Fmt PT Off PWldth RATE1 RATE2 RATE3 RATE4 RATE5 RAW REBOOT RECAII RECOrdlength REF1 REF1HIGH REFILOW REF2 REF2HIGH REF2LOW REF3HIGH REF3LOW REF4HIGH REF4LOW REFLeve REM REName REPET RESUIt RFR R Binary Se Dir NUI NU2 U3 U4 R R R R R R R RMENUS5 Cn rmi rri rri m m R RP RPBinary RS232 RTS RUN RUNSAfter RUNS Top SAMple SAVe SBITS SCAle SCAN SECOnds SECdiv SELect SEQuence SET SETLeve SETUp SHOWColzero SHOWFirst SLOpe SNAp SOFTFlagging SOURCE SOURCE1 SPREADS heet SR binary SRP binary SRSETUP TARt TATE TATUS TATUSMSG TOPAfter Cn Cn C0 Cn CO Cn CO CO CO 1 1 eo E TARget TEKSecure TERMinator c r m AAROaZ Q Sa ao D a mr TURN TWEnty TYPe UNIts UNLOCk UTILITY VALue VBArs VDELta VECtors VERBose VERTMENU VERTPOS VERTSCALE VERTical VIDeo VOLts WAVEFORM WAVFrm WFid WFMOFF WFMPre WIDth XINcr XMUIt XOFf XON XUNit XY XZEro Y YMUI YOFf YT YUNIt YZEro ZMUIt ZOFf ZOOm ZUNit ZZEro TDS 340A TDS 360 amp TDS 380 Programmer Manual a a a Appendi
77. E MODE 2 28 ACQUIRE NUMACQ 2 29 ACQUIRE NUMAVG 2 30 ACQUIRE NUMENV 2 31 ACQUIRE STATE 2 32 ACQUIRE STOPAFTER 2 33 Address definition of Glossary 1 ALIAS 2 34 Alias command group 2 2 Alias commands ALIAS 2 34 ALIAS CATALOG 2 34 ALIAS DEFINE 2 35 ALIAS DELETE 2 36 ALIAS DELETE ALL 2 36 ALIAS DELETE NAME 2 37 ALIAS STATE 2 37 ALLEV 2 38 Argument command 2 2 ASCII 2 1 Glossary 1 AUTOSET 2 39 Backus Naur Form definition of Glossary 1 Block command argument 2 9 BNF Glossary 1 BNF Backus Naur form 2 Break 2 4 BUSY 2 40 C CAL 2 41 CALIBRATE 2 42 CALIBRATE STATUS 2 42 TDS 340A TDS 360 amp TDS 380 Programmer Manual Calibration and diagnostic command group 2 2 Calibration and diagnostic commands CAL 2 41 CALIBRATE 2 42 CALIBRATE STATUS 2 42 DIAG RESULT FLAG 2 72 DIAG RESULT LOG 2 72 DIAG SELECT ALL 2 73 DIAG STATE 2 73 CH lt x gt 2 43 CH lt x gt BANDWIDTH 2 43 CH lt x gt COUPLING 2 44 CH lt x gt INVERT 2 45 CH lt x gt OFFSET 2 46 CH lt x gt POSITION 2 47 CH x PROBE 2 47 2 86 CH lt x gt SCALE 2 48 CH x VOLTS 2 49 Channel command mnemonic 2 7 CH lt x gt command mnemonic 2 7 Clear Status 2 50 CLEARMENU 2 49 CLS 2 50 Command Abbreviating 2 4 Argument 2 2 Block argument 2 9 Common 2 18 2 20 Concatenating 2 4 Header 2 2 Message 2 2 Mnemonic 2 2 Query 2 7 Rules for forming 2 7
78. ER 2 128 2 151 3 4 REM 2 131 Reset Command 2 132 Factory 2 66 RS 232 Glossary 2 RS 232 1 6 Adapter cables 1 6 BREAK 1 9 Command status 1 10 Connecting to 1 6 Connector pin assignments 6 Conventions 1 9 Errors 1 10 Setting parameters of 1 7 Transferring binary data 1 9 Troubleshooting 1 11 RS 232 command group 2 19 RS 232 commands RS232 2 133 RS232 BAUD 2 133 RS232 CONTROL DCD 2 134 RS232 CONTROL RTS 2 135 RS232 HARDFLAGGING 2 156 RS232 MODE 2 137 RS232 PACE 2 137 RS232 PARITY 2 158 RS232 PRESET 2 139 RS232 SBITS 2 740 RS232 SOFTFLAGGING 2 141 RS232 STOPBITS 2 742 RS232 TRANSMIT DELAY 2 143 RS232 TRANSMIT TERMINATOR 2 144 RST 2 132 Rules command forming 2 7 S S AV 2 145 TDS 340A TDS 360 amp TDS 380 Programmer Manual Save and recall command group 2 9 Save and recall commands RCL 2 129 RECALL SETUP 2 130 RECALL WAVEFORM 2 151 S AV 2 145 SAVE SETUP 2 46 SAVE WAVEFORM 2 147 SAVE WAVEFORM FILEFORMT 2 148 Save setting command 2 45 SAVE SETUP 2 46 SAVE WAVEFORM 2 147 SAVE WAVEFORM FILEFORMT 2 148 SBR register 2 752 3 2 SDC C 2 SELECT 2 749 SELECT wfm 2 149 SELECT CONTROL 2 150 Selected device clear C 2 Self test 2 763 Separator command 2 2 Serial poll 3 2 Disable C 2 Enable C 2 Service request enable command 2 51 Service request enable register 2 57 SESR register 2 50 2 83 2 126 3 1 Set comma
79. ESB MAV MSS 7 6 5 4 3 2 1 0 ESB MAV No A n4 Figure 3 6 Status and event handling process 3 6 Figure 3 6 shows how to use the status and event handling system In the explanation that follows numbers in parentheses refer to numbers in Figure 3 6 Event Queue Output Queue TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events When an event occurs a signal is sent to the DESER 1 If that type of event is enabled in the DESER that is if the bit for that event type is set to 1 the appropriate bit in the SESR is set to one and the event is recorded in the Event Queue 2 If the corresponding bit in the ESER is also enabled 3 then the ESB bit in the SBR is set to one 4 When output is sent to the Output Queue the MAV bit in the SBR is set to one 5 When a bit in the SBR is set to one and the corresponding bit in the SRER is enabled 6 the MSS bit in the SBR is set to one and a service request GPIB only is generated 7 Synchronization Methods Although most commands are completed almost immediately after being received by the oscilloscope some commands start a process that requires more time For example once a HARDCOPY START command is executed it may be a few seconds before the hardcopy operation is complete Rather than remain idle while the operation is in process the oscilloscope continues processing other commands This
80. ETUp RCL SAV SAVe SETUp NRI lt QString gt lt NR1 gt is a value in the range from 1 to 10 and specifies a location Using an out of range value causes an execution error Any settings that have been stored previously at this location will be overwritten lt QString gt is a quoted string that defines the file name and path Enter the file path using the form drive dir2 filename drive and one or more lt dir gt s are optional If you do not specify them the oscilloscope will save the settings in the current directory filename stands for a filename of up to 8 characters followed by a period and any 3 character extension Do not use wild card characters SAVE SETUP 5 saves the current front panel setup in memory location 5 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions SAVe WAVEform No Query Form Stores a waveform in one of two reference memory locations or a file NOTE TDS 300 Series oscilloscope waveform files are not compatible with TDS 400 TDS 500 TDS 600 TDS 700 or TDS 800 Series oscilloscope waveform files Refer to Setup and Waveform File Formats on page D 2 for more information Group Save and Recall Syntax SAVe WAVEform lt wfm gt lt Comma gt REF lt x gt lt QString gt Arguments wfm is CH lt x gt MATHI or REF lt x gt and is the waveform that will be saved REF lt x gt is the location where the waveform will be store
81. Factory initialization settings D D 2 File system command group 2 14 File system commands FILESYSTEM COPY 2 86 FILESYSTEM CWD 2 87 FILESYSTEM DELETE 2 68 FILESYSTEM DELWARN 2 88 FILESYSTEM DIR 2 89 FILESYSTEM FORMAT 2 89 FILESYSTEM FREESPACE 2 89 FILESYSTEM MKDIR 2 90 FILESYSTEM OVERWRITE 2 90 FILESYSTEM PRINT 2 91 FILES YSTEM RENAME 2 91 FILES YSTEM RMDIR 2 92 FITTOSCREEN 2 102 G GET C 2 Go to local C 2 GPIB Glossary 1 Configurations 7 3 Connection rules 3 EOM end of message 2 6 Function subsets C Group execute trigger C 2 GTL C 2 H HARDCOPY 2 93 Hardcopy command group 2 15 Hardcopy commands HARDCOPY 2 93 HARDCOPY FILENAME 2 94 HARDCOPY FORMAT 2 95 HARDCOPY LAYOUT 2 96 HARDCOPY PORT 2 96 Hardcopy port 1 12 HARDCOPY FILENAME 2 94 TDS 340A TDS 360 amp TDS 380 Programmer Manual HARDCOPY FORMAT 2 95 HARDCOPY LAYOUT 2 96 HARDCOPY PORT 2 96 HDR 2 97 HEADER 2 97 Header Command 2 2 2 97 Included in query response 2 97 2 165 Horizontal command group 2 5 Horizontal commands HORIZONTAL 2 98 HORIZONTAL DELAY 2 98 HORIZONTAL DELAY SCALE 2 99 HORIZONTAL DELAY SECDIV 2 700 HORIZONTAL DELAY TIME 2 700 HORIZONTAL DELAY TIME RUNSAFTER 2 101 HORIZONTAL FITTOSCREEN 2 102 HORIZONTAL MAIN 2 102 HORIZONTAL MAIN SCALE 2 103 HORIZONTAL MAIN SECDIV 2 103 HORIZONTAL MODE 2 104 HORIZONTAL POSITION 2 105 2 106 HORIZONTAL RECORDLENG
82. H DAMAGES O af Table of Contents General Safety Summary En a RA EA een eee vii Preface esos t sro UA AU RAV rs RAG re ad ERE AAG Gash ace ALE xi Getting Started Connector Locations Ger s dx Ls LEE C D est rw c 1 2 Comparing GPIB and RS 232 0 cece cece een eens 1 2 Setting Up GPIB Remote Communications 0 0 00 eee eee eee 1 3 Setting Up RS 232 Remote Communications 00 0e ee eee 1 6 Setting Up the Hardcopy Port 2 0 0 cece 1 12 Programming Model e R E en 1 13 T tori l d ceo ee SS OR RUPES M Baty de xeu es 1 14 Syntax and Commands Command Synfax 5 ever eR EE e ER eee RR ee a ERUE 2 1 Command and Query Structure 0 0 0 0 eee cette tenes 2 1 Clearing the Oscilloscope 0 ccc cece III 2 4 Command Entry 0 eee cee eee nen nent eens 2 4 Constructed Mnemonics 00 0 cece eect eee teen nee 2 6 Argument Types oon bas As Ree bie Eo E P C ERR e deel Batten 2 8 Command Groups eeeeeeeeeee eerta 2 11 Acquisition Commands 0 eee n 2 11 Alias Commands m eL RE e E ee le ea IR Reed 2 12 Calibration and Diagnostic Commands 0 00 e eee cece eee 2 12 Cursor Commands xs ose SERIE Er EE AR e a 2 13 Display Commands ssssseseseee n 2 14 File System Commands 00 cece eect tenet eh 2 14 Hard Copy Commands 0 cece cee ene n eee 2 15 Horizontal Commands
83. HARDCopy STARt Examples OPC might return a 1 which indicates that the operation is complete 2 126 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions PASSWord No Query Form Group Related Commands Syntax Arguments Examples Enables the PUD and NEWpass set commands Sending PASS Word without any arguments disables these same commands Once the password is successful ly entered the PUD and NEWpass commands are enabled until the oscilloscope is powered off or until the FACtory command the PASSWord command with no arguments or the RST command is issued To change the password you must first enter the valid password with the PASSWord command and then change to your new password with the NEWpass command Remember that the password is case sensitive Miscellaneous NEWpass PUD PASSWord lt QString gt lt QString gt is the password and can include up to 10 characters The factory default password is XYZZY and is always valid PASSWORD XYZZY Enables the PUD and NEWpass set commands PASSWORD Disables the PUD and NEWpass set commands You can still use the query version of PUD TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 127 Command Descriptions PSC 2 128 Group Related Commands Syntax Arguments Examples Sets or queries the power on status flag that controls the automatic power on handling of the DESER SRER and ESER registers Whe
84. ISplay CLOCk TIMe lt QString gt TIMe lt QString gt is a date in the form hh mm ss hh refers to the hour number from 01 to 24 mm refers to the minute number in the hour from 00 to 59 Ss refers to the seconds number in the minute from 00 to 59 There must be a colon after the hh and after the mm Use two digits for each of the hh mm and ss TIME 01 24 00 specifies that the time is set to 01 24 AM TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 153 Command Descriptions TRG No Query Form Trigger Executes commands that are defined by DDT The Group Execute Trigger GET interface message has the same effect as the TRG command Group Miscellaneous Related Commands Alias commands DDT Syntax TRG Examples TRG immediately executes all commands that have been defined by DDT TRIGger Forces a trigger event to occur and the TRIGger query returns the current trigger parameters Group Trigger Syntax TRIGger FORCe TRIGger Arguments FORCe creates a trigger event If TRIGger STATE is REAdy the acquisition will complete otherwise this command will be ignored This is equivalent to pressing the front panel FORCE TRIGGER button Examples TRIGGER FORCe forces a trigger event to occur TRIGGER might return TRIGGER MAIN MODE AUTO TYPE EDGE LEVEL 4 8E 1 HOLD OFF VALUE 5 0E 7 TRIGGER MAIN EDGE SOURCE CH1 COUPLING DC SLOPE RISE TRIGGER MAIN VIDEO SOURCE CH1 HOLDOFF
85. MPRE NR PT 2 74 WFMPRE PT FMT 2 171 WFMPRE PT OFF 2 172 WFMPRE WFID 2 74 WFMPRE XINCR 2 172 WFMPRE XMULT 2 174 WEMPRE XOFF 2 174 WFMPRE XUNIT 2 174 WFMPRE XZERO 2 174 WFMPRE YMULT 2 173 WEMPRE YOFF 2 173 WFMPRE YUNIT 2 174 WFMPRE YZERO 2 174 WEMPRE ZMULT 2 174 WFMPRE ZOFF 2 174 WFMPRE ZUNIT 2 174 WFMPRE ZZERO 2 174 WAVFRM 2 166 lt wfm gt command mnemonic 2 7 WFMPRE 2 167 WEMPRE lt wfm gt 2 175 WEMPRE lt wfm gt NR_PT 2 75 WEMPRE lt wfm gt PT_FMT 2 176 TDS 340A TDS 360 amp TDS 380 Programmer Manual WFMPRE wfm PT OFF 2 177 WFMPRE wfm WFID 2 177 WEMPRE lt wfm gt XINCR 2 78 WEMPRE lt wfm gt XUNIT 2 178 WEMPRE lt wfm gt YMULT 2 179 WFMPRE wfm YOFF 2 179 WEMPRE lt wfm gt YUNIT 2 180 WFMPRE wfm YZERO 2 180 WFMPRE BIT NR 2 168 WEMPRE BN_FMT 2 168 WFMPRE BYT NR 2 169 WFMPRE BYT OR 2 169 WEMPRE ENCDG 2 170 WEMPRE NR_PT 2 174 WEMPRE PT_FMT 2 171 WEMPRE PT_OFF 2 72 WEMPRE WFID 2 174 WFMPRE XINCR 2 172 WFMPRE XMUILT 2 174 WEMPRE XOFF 2 174 WFMPRE XUNIT 2 174 WFMPRE XZERO 2 174 WEMPRE YMULT 2 173 WEMPRE YOFF 2 173 WFMPRE YUNIT 2 174 WEMPRE YZERO 2 174 WEMPRE ZMULT 2 174 WEMPRE ZOFF 2 174 WEMPRE ZUNIT 2 174 WEMPRE ZZERO 2 174 Z Zoom commands ZOOM VERTICAL POSITION 2 181 ZOOM VERTICAL SCALE 2 181 ZOOM VERTICAL POSITION 2 181 ZOOM VERTICAL SCALE 2 61 Index 7 Index Index 8 TDS 340A TDS 360 amp TDS 380
86. MPre wfm NR Pt Number of points in the curve WFMPre wfm PT Fmt Format of curve points WFMPre wfm PT Off Trigger position WFMPre wfm WFId Curve identifier WFMPre wfm XINcr Horizontal sampling interval WFMPre wfm XUN it Horizontal units WFMPre wfm YMUTt Vertical scale factor WFMPre wfm YOFf Vertical offset WFMPre wfm YUN it Vertical units WFMPre lt wfm gt YZEro Offset voltage 2 26 TDS 340A TDS 360 amp TDS 380 Programmer Manual Eos Command Descriptions ACQuire Query Only Group Syntax Examples Commands either set oscilloscope features or query oscilloscope values You can use some commands to do both some to only set and some to only query This manual marks set only commands with the words No Query Form included with the command name It marks query only commands with a question mark appended to the header and includes the words Query Only in the command name This manual fully spells out headers mnemonics and arguments with the minimal spelling shown in upper case For example to use the abbreviated form of the ACQuire MODe command just type ACQ MOD Returns all the current acquisition parameters Acquisition ACQuire ACQUIRE might return the string ACQUIRE STOPAFTER RUNSTOP STATE 1 MODE SAMPLE NUMENV 10 NUMAVG 16 for the current acquisition parameters TDS 340A TDS 360 amp TDS 380 Programmer
87. MVectors ACQUISition ACQuire ALlas ALL ALLev ALWAYS AMPlitude ANY ANY FIELD ASC ASCII AUTO AUTOSet AVErage BANdwidth BAUd BIN UJ UJ OU UU UU CJ CJ UD Ww ou rn rn rm rni rn rn rni Cc gt BYT Or CALC CALibrate CATALOG CENtronics CH1 CHIPROBE CH2 CH2PROBE CLEAR CLEARMenu CLEAR Spool CLOCk CMEan CONTRast CONTROI COPY COUPling CPU CR CRLf CRMs CROSSHair CURSor CURSOR1 CURSOR2 CURVe CWD DATE DATa DC DCD DEFINE DELay DELAY Ed DELEte DELTa DELWarn DESE DESKJ et DESTination DEVelop DIAg DIM DINk DIR DISplay DOTs DPU411 DPU412 ECL EDGE ENCdg ENVelope EPSImage EPSon ERASEFactory ERRLOG EVEN EVEnt EVMsg EVQty EXECute EXT EXT10 EXTIOTRIGHIGH EXTIOTRIGLOW EXTTRIGCALC EXTTRIGHIGH EXTTRIGLOW FAC tory FAIL FALL FIELD ELD1 ELD2 LE LEFormat LEName LES ystem RST Ttoscreen FLAg FORCe FORMat FPAnel FRAme FREESpace FREQuency FUL FUNCtion GATing GND GPIB GPKNOB GRAticule GRId HARDCopy HARDFlagging HBArs HDELta HDR HEADer HERtz HFRej HIGH HIStogram HOLdoff HORZMENU HORZPOS HORZSCALE HORizontal F F F F F F F F HPOS1 HP0S2 BFull D Med DEpendent FInite IT ITACQREF NTENSIFied NTENSITy TERLeaf TERNal Vert LANDscape LASER et LAYout LEVel LF LFCr LFRej LINE EASMENU EASUrement ETHod ID INImum INMax KDir ODe SB AME DUTY EWpass EXT OISE rej OISYGAIN ON
88. Manual 2 27 Command Syntax ACQuire MODe 2 28 Group Related Commands Syntax Arguments Sets or queries the acquisition mode of the oscilloscope This command affects all live waveforms This command is equivalent to setting Mode in the Acquire menu Waveforms are the displayed data point values taken from acquisition intervals Each acquisition interval represents a time duration that is determined by the horizontal scale time per division The oscilloscope sampling system always samples at the maximum rate and so an acquisition interval may include more than one sample The acquisition mode which you set using this ACQuire MODe command determines how the final value of the acquisition interval is generated from the many data samples Acquisition ACQuire NUMAVg ACQuire NUMENv CURVe DATa WIDth ACQuire MODe SAMple PEAKdetect AVErage ENVelope ACQuire MODe SAMple specifies that the displayed data point value is simply the first sampled value that was taken during the acquisition interval In sample mode all waveform data has 8 bits of precision You can request 16 bit data with a CURVe query but the lower order 8 bits of data will be zero SAMple is the default mode PEAKdetect specifies the display of the high low range of the samples taken from a single waveform acquisition The oscilloscope displays the high low range as a vertical column that extends from the highest to the lowest value sample
89. N NRI DISplay CLOCk OFF or lt NR1 gt 0 removes the clock from the display ON or lt NR1 gt z 0 displays the clock on the display DISPLAY CLOCK ON sets the display to show time and date DISPLAY CLOCK might return 1 indicating that the display shows time and date TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DiSplay FORMat Group Syntax Arguments Examples Sets or queries the display format This command is equivalent to setting Format in the Display menu Display DISplay FORMat XY YT DISplay FORMat XY displays the voltage of one waveform against the voltage of another The sources that make up an XY waveform are predefined and are listed in Table 2 23 Displaying one source causes its corresponding source to be displayed Table 2 23 XY format pairs X Axis Source Y Axis Source Chl Ch2 Refl Ref2 YT sets the display to a voltage versus time format and is the normal mode DISPLAY FORMAT YT selects a voltage versus time format for the display DISPLAY FORMAT might return XY for the display format TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 75 Command Descriptions DiSplay GRAticule Group Syntax Arguments Examples Selects the type of graticule that is displayed This command is equivalent to setting Graticule in the Display menu Display DISplay GRAticule CROSSHair FRAme FULI GRId DISplay
90. North America power network All other power cords supplied are approved for the country of use Compliances Consult the product specifications for Overvoltage Category and IEC Classifica tions TDS 340A TDS 360 amp TDS 380 Programmer Manual ix General Safety Summary X TDS 340A TDS 360 amp TDS 380 Programmer Manual E Cc l Preface This is the Programmer Manual for the TDS 340A TDS 360 and TDS 380 Two Channel Digital Real Time Oscilloscopes This manual provides information on operating your oscilloscope using the General Purpose Interface Bus GPIB and the RS 232 interface Related Manuals Following is additional documentation for the oscilloscopes m TDS 340A TDS 360 amp TDS 380 Instruction Manual m TDS 340A TDS 360 amp TDS 380 Reference m The XYZs of Analog and Digital Oscilloscopes TDS 340A TDS 360 amp TDS 380 Programmer Manual xi Preface xii TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started This chapter covers the following topics Connector Locations shows the RS 232 and GPIB connector locations on the pack panel of the TDS 300 Series oscilloscope Comparing GPIB and RS 232 compares the characteristics of the GPIB and RS 232 interfaces Setting Up GPIB Remote Communications describes setting up for GPIB remote control including connecting the oscilloscope and setting the appropriate front panel controls Setting Up RS 232 Remote Commun
91. O It indicates ON if it s a non zero value ON means turn on waveform compress OFF means turn off waveform compress HORIZONTAL FITTOSCREEN ON turns on waveform compress HORizontal MAIn Query Only Group Related Commands Syntax Examples 2 102 Returns the time per division of the main time base The commands HORizon tal MAIn SECdiv and HORizontal MAIn SCAle are identical so only HORizon tal MAIn SCAle is returned Horizontal HORizontal SCAle HORizontal SECdiv HORizontal MAIn SECdiv HORi zontal MAIn HORIZONTAL MAIN might return HORIZONTAL MAIN SCALE 1 0E 6 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HORizontal MAln SCAle Group Related Commands Syntax Arguments Examples Sets the time per division for the main time base This command is equivalent to setting SCALE for the main time base Horizontal HORizontal DELay SCAle HORizontal DELay SECdiv HORizon tal MAIn SECdiv HORizontal MAIn SCAle NR3 HORizontal MAIn SCAle lt NR3 gt is the time per division The range is 5 ns TDS 340A 2 5 ns TDS 360 or 2 5 ns TDS 380 to 5 s in a 1 2 5 sequence Values that are not in a 1 2 5 sequence are set to the closest valid value HORIZONTAL MAIN SCALE 2E 6 sets the main scale to 2 us per division HORizontal MAIn SECdiv Group Related Commands Syntax Sets the time per division for the main time base This command is identical to t
92. OPC for synchronization looks like this Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Wait until the acquisition is complete before taking the measurement OPC Wait for read from Output Queue Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE This is the simplest approach It requires no status handling or loops However you must set the controller time out for longer than the acquisition operation Tables 3 3 through 3 9 list all the programming interface messages the oscilloscope generates in response to commands and queries For most messages a secondary message from the oscilloscope gives more detail about the cause of the error or the meaning of the message This message is part of the message string and is separated from the main message by a semicolon Each message is the result of an event Each type of event sets a specific bit in the SESR and is controlled by the equivalent bit in the DESER Thus each message is associated with a specific SESR bit In the message tables that follow the associated SESR bit is specified in the table title Table 3 3 shows the messages when the system has no events or status to report These have no associated SESR bit TDS 340A TDS 360 amp
93. OS2 Set which cursor the knob controls Return horizontal distance between first and second paired cursors Return horizontal position of first paired cursor Return horizontal position of second paired cursor CURSor PAIred POSITION lt x gt CURSor PAIred SELect CURSor PAIred VDELTA Set query vertical bar position of paired cursor Select active paired cursor Return vertical distance between first and second paired cursors CURSor VBArs Set query vertical bar cursor settings CURSor VBArs DELTa CURSor VBArs POSITION lt x gt CURSor VBArs SELect CURSor VBArs UNIts TDS 340A TDS 360 amp TDS 380 Programmer Manual Return horizontal distance between vertical bar cursors Position a vertical bar cursor Set which cursor the knob controls Set vertical cursors to time or frequency Command Syntax Display Commands Display commands let you change the graticule style change the displayed intensities and clear the menu Table 2 8 Display commands Header CLEARMenu Description Clear menus from display DISplay DISplay CLOCk DISplay DISplay FORMat GRAticule Returns display settings Set query display of system date and time YT or XY display Graticule style DISplay DISplay DISplay DISplay INTENSITy INTENSITy CONTRast INTENSITy OVERAT INTENSITy TEXt Returns intensity settings Waveform intensified zone brightness Main brightness Text brightne
94. Programmer Manual Tektronix TDS 340A TDS 360 amp TDS 380 Digital Real Time Oscilloscopes 070 9442 02 This document applies to firmware version 1 05 and above Copyright Tektronix Inc All rights reserved Tektronix products are covered by U S and foreign patents issued and pending Information in this publication supercedes that in all previously published material Specifications and price change privileges reserved Printed in the U S A Tektronix Inc P O Box 1000 Wilsonville OR 97070 1000 TEKTRONIX and TEK are registered trademarks of Tektronix Inc WARRANTY Tektronix warrants that the products that it manufactures and sells will be free from defects in materials and workmanship for a period of three 3 years from the date of shipment If a product proves defective during this warranty period Tektronix at its option either will repair the defective product without charge for parts and labor or will provide a replacement in exchange for the defective product In order to obtain service under this warranty Customer must notify Tektronix of the defect before the expiration of the warranty period and make suitable arrangements for the performance of service Customer shall be responsible for packaging and shipping the defective product to the service center designated by Tektronix with shipping charges prepaid Tektronix shall pay for the return of the product to Customer if the shipment is to a location with
95. R3 gt YOFf lt NR3 gt YZEro lt NR3 gt lt wfm gt WFID lt Qstring gt NR_PT lt NR1 gt PT FMT ENV Y XUNit lt QString gt XINcr lt NR3 gt PT Off lt NR1 gt YUNit lt QString gt YMUIt lt NR3 gt YOFf lt NR3 gt YZEro lt NR3 gt TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 167 Command Descriptions WFMPre BIT Nr Group Related Commands Syntax Arguments Examples WFMPre BN Fmt Group Related Commands Syntax Arguments Examples 2 168 Returns the number of bits per binary waveform point for the waveform or waveforms as specified by the DATa SOUrce command The WFMPre BIT Nr command is ignored on input Waveform DATa WIDth WFMPre BYT Nr WFMPre BIT Nr NR1 WFMPre BIT Nr lt NR1 gt is either 8 or 16 and is equivalent to WFMPre BYT_Nr 8 WFMPRE BIT NR might return 8 indicating that there are 8 bits per waveform point Sets or queries the format of binary data for the waveform or waveforms specified by the DATa SOUrce command Waveform DATa ENCdg WFMPre BYT Or WFMPre ENCdg WFMPre BN Fmt RI RP j WFMPre BN Fmt RI specifies signed integer data point representation RP specifies positive integer data point representation WFMPRE BN FMT RP specifies that the binary waveform data are positive integer data points TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre BYT_Nr Group Related Commands Syntax Arguments
96. RBOS might return the value 1 showing that the verbose state is true TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 165 Command Descriptions WAI No Query Form Group Related Commands Syntax Wait Prevents the oscilloscope from executing further commands or queries until all pending operations finish This command allows you to synchronize the operation of the oscilloscope with your application program Synchronization methods are described on page 3 7 Status and Error BUSY OPC WAI WAVFrm Query Only Group Related Commands Syntax 2 166 Returns WFMPre and CURVe data for the waveform or waveforms as specified by the DATa SOUrce command This command is equivalent to sending WFMPre CURVe Waveform CURVe DATa SOUrce WFMPre WAVFrm TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre Query Only Returns the waveform formatting data for the waveform or waveforms as specified by the DATa SOUrce command Channel and math waveforms specified by the DATA SOUrce command must be displayed Group Waveform Related Commands WAVFrm Syntax WFMPre Returns The format of the response is BYT Nr lt NR1 gt BIT Nr lt NR1 gt ENCdg ASC BIN BN Fmt RI RP BYT Or LSB MSB lt wfm gt WFID Qstring NR PT lt NR1 gt PT FMT ENV Y XUNit lt QString gt XINcr lt NR3 gt PT_ Off lt NR1 gt YUNit QString YMUTt lt N
97. RUN STOP button only Acquire stop after Acquire of averages 16 Acquire of envelopes Channel selection 8 Channel 1 on all others off 3 2 divisions from the center Cursor H Bar 1 position Cursor H Bar 2 position 43 2 divisions from the center 3096 ofthe record length 1000 70 ofthe record length 1000 Cursor V Bar 1 position Cursor V Bar 2 position Cursor function Off Cursor time units Seconds Delay time delayed runs after main 1 us Display Date Time On Display format YT Display graticule type Full Display intensity contrast 150 Display intensity text DIM Display intensity waveform BRIGHT Display intensity overall 85 Display style Vectors Display variable persistence 500 ms Edge trigger coupling DC Edge trigger level 0 0V Edge trigger slope Rising Edge trigger source Channel 1 Horizontal main trigger position 50 TDS 340A TDS 360 amp TDS 380 Programmer Manual Appendix D Factory Initialization Settings Table D 1 Factory initialization defaults Cont Control Factory Initialization value Horizontal main time div 500 us Horizontal fitto screen Off Horizontal delay time div 50 us Horizontal time base Main only Main trigger holdoff 500 ns Main trigger mode Auto Main trigger type Edge Math waveform function CH1 CH2 Measure 1 4 Off Measure Gating Off Measure High Low Setup Histogram Measure High Ref Measure
98. SEQUENCE TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 33 Command Syntax ALlas Group Syntax Arguments Examples Turns command aliases on or off This command is identical to the ALIas STATE command Alias ALIas OFF ON NRI ALIas OFF or lt NR1 gt 0 turns alias expansion off If a defined alias label is sent when ALIas is OFF an execution error will be generated ON or NR1 0 turns alias expansion on When the oscilloscope receives a defined alias it substitutes the specified command sequence for the alias and executes it ALIAS ON turns the alias feature on ALIAS returns 1 when aliases are on ALlas CATALOG Query Only Group Syntax Returns Examples 2 34 Returns a list of the currently defined alias labels separated by commas If no aliases are defined the query returns the string Alias ALIas CATALOG lt QString gt lt QString gt ALTAS CATALOG might return the string SETUP1 TESTMENU1 DEFAULT showing there are 3 aliases named SETUPI TESTMENUI and DEFAULT TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax ALlas DEFINE Group Syntax Arguments Examples Assigns a sequence of program messages to an alias label If ALIas S TATE has been turned ON these messages are substituted for the alias whenever it is received as a command or query The ALIas DEFINE query returns the definition of a selected a
99. Separator 2 2 Set 2 1 Syntax 2 1 BNF Backus Naur form 2 1 Command argument Numeric 2 8 Quoted string 2 8 Command group Acquisition 2 7 Alias 2 12 Calibration and diagnostic 2 12 Cursor 2 13 Display 2 4 File system 2 14 Hardcopy 2 15 Horizontal 2 15 Index 1 Index Measurement 2 6 Miscellaneous 2 8 RS 232 commands 2 9 Save and recall 2 19 Status and error 2 20 Trigger 2 20 Vertical 2 21 Waveform 2 22 Command mnemonic Channel 2 7 CH lt x gt 2 7 Cursor position 2 6 Math waveform 2 7 MATH lt x gt 2 7 Measurement specifier 2 6 MEAS lt x gt 2 6 POSITION lt x gt 2 6 Reference waveform 2 7 REF lt x gt 2 7 Waveform 2 7 lt wfm gt 2 7 Command status checking 1 10 Command syntax 2 7 BNF Backus Naur form 2 7 Common command 2 76 2 20 Common GPIB commands CAL 2 41 CLS 2 50 Computers connecting 1 6 Concatenating command 2 4 Configuration command query 2 08 Connecting to an RS 232 device 1 6 Controller definition of Glossary 1 Cursor command group 2 5 Cursor commands CURSOR 2 50 CURSOR FUNCTION 2 51 CURSOR HBARS 2 51 CURSOR HBARS DELTA 2 52 CURSOR HBARS POSITION lt x gt 2 52 CURSOR HBARS SELECT 2 53 CURSOR PAIRED HDELTA 2 53 CURSOR PAIRED HPOS 1 2 54 CURSOR PAIRED HPOS2 2 54 CURSOR PAIRED POSITIONI 2 55 CURSOR PAIRED POSITION2 2 55 CURSOR PAIRED SELECT 2 56 CURSOR PAIRED VDELT
100. Specify the number of bytes per data point using DATa WIDth Specify the first data point in the waveform record using DATa STARt Transfer waveform preamble information using WFMPRe lt wfm gt DU wm wood Transfer waveform data to the oscilloscope using CURVe Table 2 19 Waveform commands Header Description CURVe Transfer waveform data DATa Waveform data format and location DATa DESTination Destination for waveforms sentto oscilloscope DATa ENCdg Waveform data encoding method DATa SOUrce Source of CURVe data DATa STARt Starting point in waveform transfer DATa STOP Ending point in waveform transfer DATa TARget Same as DATa DESTination DATa WIDth Byte width of waveform points WAVFrm Returns waveform preamble and curve data WFMPre Returns waveform preamble WFMPre BIT Nr Preamble bit width of waveform points WFMPre BN Fmt Preamble binary encoding type WFMPre BYT Nr Preamble byte width of waveform points WFMPre BYT Or Preamble byte order of waveform points WFMPre ENCdg Preamble encoding method WFMPre PT Fmt Format of curve points WFMPre PT Off Trigger Position WFMPre XINcr Horizontal sampling interval WFMPre YMUIt Vertical scale factor WFMPre YOFf Vertical offset WFMPre YZEro Offset voltage TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 25 Command Syntax Table 2 19 Waveform commands Cont Header Description WFMPre wfm Return waveform format data WF
101. Syntax Arguments Examples Make a new directory File system FILESystem MKDir lt directory path gt lt directory path gt is a quoted string that defines the directory Input the directory using the form lt drive gt lt dir gt lt directory name gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will create the directory in the current directory lt directory name gt stands for a directory name of up to 8 characters and can be followed by a period and a 3 char extension FILESYSTEM MKDIR NEATPICS creates the directory named NEATPICS on the current drive FILESystem OVERWrite Group Syntax Arguments Examples 2 90 Turns on or off the file overwrite protection Turning on file overwrite protection prevents writing over existing files File system FILESystem OVERWrite ON OFF NRI FILESystem OVERWr i te ON or lt NR1 gt O0 turns on the file overwrite protection OFF or lt NR1 gt 0 turns off the file overwrite protection FILESYSTEM OVERWRITE OFF lets you overwrite existing files FILESYSTEM OVERWRITE might return 0 indicating you cannot overwrite existing files TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions FILESystem PRint No query form Option 14 Communications Interface Only Prints a named file to the named port Group File system Syntax FILESystem PRInt lt file
102. System DELWarn ON OFF NR1 FILESystem DELWarn ON or lt NR1 gt 0 turns on the front panel delete warning OFF or lt NR1 gt 0 turns off the front panel delete warning FILESYSTEM DELWARN OFF disables the front panel delete warning FILESYSTEM DELWARN might return 0 indicating the front panel warning is disabled TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions FILESystem DIR Query only Group Syntax Examples Returns a list of quoted strings Each string contains the name of a file or directory in the current directory File system FILESystem DIR FILESYSTEM DIR returns a list of files and directories in the default directory FILESystem FORMat No query form Group Syntax Arguments Examples Formats a named drive File system FILESystem FORMat lt drive name gt lt drive name gt is a quoted string that defines the disk drive to format fd0 refers to the floppy disk drive built into the oscilloscope FILESYSTEM FORMAT fd0 formats the media on drive fdO FILESystem FREESpace Query only Group Syntax Examples Returns the amount of freespace in bytes on the current drive File system FILESystem FREESpace FILESYSTEM FREESpace might return 0 as the amount of freespace available if the disk was full TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 89 Command Descriptions FILESystem MKDir No query form Group
103. TDS 380 Programmer Manual Status and Events Queues The Output Queue The Event Queue The oscilloscope status and event reporting system contains two queues the Output Queue and the Event Queue The Output Queue stores query responses waiting to be output The oscilloscope empties the Output Queue each time it receives a new command or query message This means you must read any query response before you send the next command or query or you will lose responses to earlier queries Also an error may result NOTE When a controller sends a query an lt EOM gt and a second query the digitizing oscilloscope normally clears the first response and outputs the second while reporting a Query Error QYE bit in the ESER to indicate the lost response A fast controller however may receive a part or all the first response as well To avoid this situation the controller should always read the response immediately after sending any terminated query message or send a DCL Device Clear before sending the second query The Event Queue stores detailed information on up to 20 events If more than 20 events stack up in the Event Queue the 20th event is replaced by event code 350 Too many events Read the Event Queue with EVENT which returns only the event number with EVMsg which returns the event number and a text description of the event or with ALLEV which returns all the event numbers along with a description of the
104. TH 2 105 HORIZONTAL SCALE 2 106 HORIZONTAL SECDIV 2 107 HORIZONTAL TRIGGER 2 107 HORIZONTAL TRIGGER POSITION 2 107 ID 2 108 IDN 2 108 IEEE Glossary 1 IEEE Std 488 2 1987 1 6 2 1 2 18 2 20 Interface message C 2 L LLO C2 Local lock out C 2 LOCK 2 109 LRN 2 110 Manual trigger simulation with command 2 154 Math waveform command mnemonic 2 7 MATH lt x gt 2 110 MATH lt x gt DEFINE 2 111 MATH lt x gt command mnemonic 2 7 Index 3 Index Measurement command group 2 6 Measurement commands MEASUREMENT 2 112 MEASUREMENT GATING 2 112 MEASUREMENT IMMED 2 713 MEASUREMENT IMMED SOURCE I 2 113 MEASUREMENT IMMED TYPE 2 114 MEASUREMENT IMMED UNITS 2 115 MEASUREMENT IMMED VALUE 2 116 MEASUREMENT MEAS lt x gt 2 116 MEASUREMENT MEAS x DELAY SOURCEI 2 117 MEASUREMENT MEAS lt x gt STATE 2 117 MEASUREMENT MEAS lt x gt TYPE 2 118 MEASUREMENT MEAS lt x gt UNITS 2 719 MEASUREMENT MEAS lt x gt VALUES 2 720 MEASUREMENT METHOD 2 20 MEASUREMENT REFLEVEL 2 21 MEASUREMENT REFLEVEL ABSO LUTE HIGH 2 121 MEASUREMENT REFLEVEL ABSOLUTE MID 2 122 MEASUREMENT REFLEVEL METHOD 2 123 MEASUREMENT REFLEVEL PERCENT HIGH 2 124 MEASUREMENT REFLEVEL PERCENT LOW 2 124 MEASUREMENT REFLEVEL PERCENT MID 2 125 MEASUREMENT REFLEVEL ABSOLUTE LOW 2 122 Measurement specifier command mnemonic 2 6 MEAS lt x gt command mnemonic 2 6 Message
105. The Status Byte Register SBR The SBR shown in Figure 3 2 records whether output is available in the Output Queue whether the oscilloscope requests service and whether the SESR has recorded any events Use a Serial Poll GPIB only or STB to read the contents of the SBR The bits in the SBR are set and cleared depending on the contents of the SESR the Event Status Enable Register ESER and the Output Queue When you use a Serial Poll to obtain the SBR bit 6 is the RQS bit When you use the STB query to obtain the SBR bit 6 is the MSS bit Reading the SBR does not clear the bits Table 3 2 shows the SBR bit functions 6 7 RQS 5 4 3 2 1 0 6 ESB MAV MSS Figure 3 2 The Status Byte Register SBR TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events Table 3 2 SBR bit functions Bit Function 7 MSB Not used 6 RGS Request Service obtained from a serial poll Shows that the oscilloscope requests service from the GPIB controller 6 MSS Master Status Summary obtained from STB Summarizes the ESB and MAV bits in the SBR 5 ESB Event Status Bit Shows that status is enabled and presentin the SESR 4 MAV Message Available Shows that output is available in the Output Queue 3 0 Not used Enable Registers The DESER ESER and SRER allow you to select which events are reported to the Status Registers and the Event Queu
106. URSor PAIred POSITION1 lt NR3 gt CURSor PAIred POSITION1 lt NR3 gt specifies the position of the first paired cursor CURSOR PAIRED POSITION1 9 0E 6 specifies the first paired cursor is at 9 us CURSOR POSITION1 might return 1 0E 6 indicating that the first paired cursor is at 1 us CURSor PAlred POSITION2 Group Related Commands Syntax Arguments Examples Sets or queries the horizontal time or frequency position of the second paired cursor Cursor CURSor FUNCtion CURSor PAIred POSITION2 lt NR3 gt CURSor PAIred POSITION2 lt NR3 gt specifies the position of the second paired cursor CURSOR POSITION2 might return 1 0E 6 indicating that the second paired cursor is at 1 us TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 55 Command Syntax CURSor PAlred SELect Group Syntax Arguments Examples Selects the active paired cursor The active cursor appears as a solid vertical line The unselected cursor appears as a dashed vertical line This command is equivalent to pressing the SELECT button on the front panel Cursor CURSor PAlred SELect CURSOR1 CURSOR2 CURSor PAIred SELect CURSORI specifies the first paired cursor CURSOR specifies the second paired cursor CURSOR PAIRED SELECT CURSOR2 selects the second paired cursor as the active cursor CURSOR PAIRED SELECT returns CURSOR1 when the first paired cursor is the active cursor CURSor PAlred
107. VDELta Query Only Group Related Commands Syntax Examples 2 56 Queries the horizontal distance time or frequency between paired cursors Cursor CURSor FUNCtion CURSor PAIred VDELta CURSOR PAIRED VDELTA might return 1 064E0 indicating that the time between the paired cursors is 1 064 seconds TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CURSor VBArs Group Related Commands Syntax Arguments Examples Sets or queries the vertical bar cursor settings for horizontal position delta cursor selection and units Cursor DATa STARt DATa STOP CURSor VBArs SNAp CURSor VBArs SNAp positions the vertical bar cursors at DATa STARt and DATa STOP CURSOR VBARS SNAP specifies that the cursors positions are the same as the current DATA START and DATA STOP values CURSOR VBARS might return CURSOR VBARS UNITS SECONDS POSITION 1 0E 6 POSITION2 9 0E 6 SELECT CURSOR2 CURSor VBArs DELTa Query Only Group Related Commands Syntax Returns Examples Returns the time or frequency between the two vertical bar cursors The units seconds or Hertz are specified by the CURSor VBArs UNIts command Cursor CURSor VBArs UNIts CURSor VBArs DELTa lt NR3 gt CURSOR VBARS DELTa might return 1 064E0 indicating that the time between the vertical bar cursors is 1 064 seconds TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 57 Command Synta
108. acquired data This is achieved by synchronizing the program so that the measurement command is not processed by the oscilloscope until the acquisition is complete Figure 3 8 shows the desired processing sequence Acquiring waveform data MEASUREMENT IMMED VALUE Processing time Figure 3 8 Processing sequence with synchronization Using the WAI Command 3 8 Four commands can be used to synchronize the operation of the oscilloscope with your application program WAI BUSY OPC and OPC You can force commands to execute sequentially by using the WAI command This command forces completion of the previous commands before processing new ones The same command sequence using the WAI command for synchronization looks like this Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Wait until the acquisition is complete before taking the measurement WAI Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE Though WAI is one of the easiest ways to achieve synchronization it is also the most costly The processing time of the oscilloscope is slowed since it is processing a single com
109. ailable from Tektronix as part number 012 0991 00 to this connector If needed you can stack GPIB connec tors as shown in Figure 1 2 Follow these rules when you connect your oscilloscope to a GPIB network W Assign a unique device address to each device on the bus No two devices can share the same device address m Do not connect more than 15 devices to any one bus m Connect one device for every 2 meters 6 feet of cable used m Do not use more than 20 meters 65 feet of cable to connect devices m Turn on at least two thirds of the devices on the network while using the network m Connect the devices on the network in a star or linear configuration as shown in Figure 1 3 Do not use loop or parallel configurations Appendix C Interface Specifications gives more information on the GPIB configuration of the oscilloscope TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started Figure 1 2 How to stack GPIB connectors GPIB device GPIB device GPIB device Figure 1 3 Typical GPIB network configurations GPIB device GPIB device GPIB device GPIB device 14 TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started Setting the GPIB You need to set the GPIB parameters of the oscilloscope to match the configura Parameters tion of the bus Once you have set these parameters you can control the oscilloscope through the GPIB interface 1 Pre
110. al horizontal and trigger controls to provide a stable display of the selected waveform This is equivalent to pressing the front panel AUTOSET button For a detailed description of the autoset function consult the TDS 340A TDS 360 and TDS 380 Instruction Manual NOTE The AUTOSet command does not return control to the instrument controller until the autoset operation is complete Group Miscellaneous Syntax AUTOSet EXECute Arguments EXECute autosets the selected waveform TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 39 Command Syntax BUSY Query Only Group Related Commands Syntax Returns Examples 2 40 Returns the status of the oscilloscope This command allows you to synchronize the operation of the oscilloscope with your application program Synchronization methods are described on page 3 7 Status and error OPC WAI BUSY lt NR1 gt 0 means that the oscilloscope is not busy processing a command whose execution time is extensive These commands are listed in Table 2 20 NR1 1 means that the oscilloscope is busy processing one of the commands listed in Table 2 20 Table 2 20 Commands that affect BUSY response Operation Command Single sequence acquisition ACQuire S TATE ON or ACQuire S TATE RUN when ACQuire S TOPAfter is set to SEQuence Hard copy output HARDCopy STARt Signal path compensation CAL or CALibrate BUSY might return 1 indicating that
111. alue HORIZONTAL DELAY SCALE might return 1 0E 3 indicating that the delay time is ms per division TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 99 Command Descriptions HORizontal DELay SECdiv This command is identical to the HORizontal DELay SCAle command It is provided to maintain program compatibility with some older models of Tektronix oscilloscopes Group Horizontal Syntax X HORizontal DELay SECdiv lt NR3 gt HORi zontal DELay SECdi v HORizontal DELay TIMe Sets or queries the delay time to wait after the main trigger before the delayed time base begins This is equivalent to setting Delayed Runs After Main in the Horizontal Time Base side menu Group Horizontal Related Commands HORizontal DELay MODe HORizontal DELay TIMe RUNSAfter Syntax HORizontal DELay TIMe lt NR3 gt HORizontal DELay TIMe Arguments lt NR3 gt is the time in seconds between the main trigger and the delayed trigger The range is from one acquired sample interval to 50 s Resolution depends on the time base setting see Table 2 24 Table 2 24 Horizontal delay time resolution Time Base Setting Delay Time Resolution 1 us or faster 16 5 ns 2 5 us 49 5 ns 5 us 99 ns 2 100 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions Examples Table 2 24 Horizontal delay time resolution Cont Time Base Setting Delay Time Resolution 198 ns one sample interval
112. amp TDS 380 Programmer Manual 2 121 Command Descriptions MEASUrement REFLevel ABSolute LOW Group Syntax Arguments Examples Sets or queries the low reference level and is the 0 reference level when MEASUrement REFLevel METHod is set to ABSolute This command is equivalent to setting the Reference Levels in the Measure menu Measurement MEASUrement REFLevel ABSolute LOW lt NR3 gt MEASUrement REFLevel ABSolute LOW lt NR3 gt is the low reference level in vertical units The default is 0 0 MEASUrement REFLevel might return the string MEASUREMENT REFLEVEL METHOD PERCENT ABSOLUTE HIGH 0 0E0 LOW 0 0E0 MID 0 0E0 MEASUREMENT REFLEVEL PERCENT HIGH 9 0E1 LOW 1 0E1 MID 5 0E1 MEASUrement REFLevel ABSolute MID Group Syntax Arguments Examples 2 122 Sets or queries the mid reference level and is the 50 reference level when MEASUrement REFLevel METHod is set to ABSolute This command is equivalent to setting the Reference Levels in the Measure menu Measurement MEASUrement REFLevel ABSolute MID lt NR3 gt MEASUrement REFLevel ABSolute MID lt NR3 gt is the mid reference level in vertical units The default is 0 0 MEASUREMENT REFLEVEL ABSOLUTE MID 0 71 sets the mid reference level to 0 71 volts TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions MEASUrement REFLevel METHod Specifies which reference levels are used for measurement calc
113. an include any amount of white space The format for a dual waveform expression is lt source gt lt operator gt lt source gt where operator lt source gt CH lt x gt The format for a single waveform expression is FFT CH lt x gt displays the FFT frequency domain information for the specified channel Examples MATHI DEFINE CH1 CH2 sets the math waveform so that it displays the sum of channel 1 and channel 2 MATH DEFINE FFT CH1 displays the FFT frequency domain information for channel 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 111 Command Descriptions MEASUrement Query Only Returns all measurement parameters Group Measurement Syntax X MEASUrement Examples MEASUREMENT might return MEASUREMENT MEAS1 STATE 0 TYPE PERIOD UNITS S SSOURCEI CH1 MEASUREMENT MEAS2 STATE 0 TYPE PERIOD UNITS S SOURCE1 CH1 MEASUREMENT MEAS3 STATE 0 TYPE PERIOD UNITS S SOURCE1 CH1 MEASUREMENT MEASA STATE 0 TYPE PERIOD UNITS s SOURCE1 CH1 MEASUREMENT IMMED TYPE PERIOD UNITS s SOURCE1 CH1 MEASUREMENT METHOD HISTOGRAM REFLEVEL METHOD PERCENT ABSO LUTE HIGH 0 0E0 LOW 0 0E0 MID 0 0E0 MEASUREMENT REFLEVEL PER CENT HIGH 9 0E1 LOW 1 0E1 MID 5 0E1 MEASUrement GATing Sets or queries measurement gating Use the vertical bar cursors to define the measurement start and stop locations Group Measurement Syntax MEASUrement GATing OFF ON NRI
114. ata loss m All eight bits of binary data contain meaningful information To make sure that all eight bits are received or transmitted configure the RS 232 device that is connected to the oscilloscope to receive and transmit eight bit characters set the RS 232 word length to eight bits Processing Break Signals When the oscilloscope senses a break signal on the RS 232 port it returns DCL followed by the end of line terminator Internally the oscilloscope acts as if it received a GPIB lt DCL gt command causing the oscilloscope to flush input and output buffers and then wait for a new command Break signals do not change oscilloscope settings or stored data and do not interrupt front panel operation or nonprogrammable functions If a break signal is sent in the middle of a character stream several characters immediately preceding or following the break may be lost The controller should wait until it receives the DCL and the end of line terminator string before sending more characters TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 9 Getting Started 1 10 Reporting RS 232 I O Errors Errors are reported when there is a problem with parity framing or input output buffer overruns To report errors the oscilloscope posts an event code refer to Section 3 Status and Events on page 3 1 When an error occurs the oscilloscope discards all input and output and waits for a new command A count of these errors since last power on
115. ative to DATa STARt nr1 can be negative WFMPRE PT OFF 1 specifies that the trigger point is the first point in the waveform record WFMPre XINcr No Query Form Group Syntax Arguments 2 172 Specifies the horizontal sampling interval for the reference waveform specified by the DATa DESTination command Waveform WFMPre XINcr lt NR3 gt lt NR3 gt is the sampling interval in seconds per point TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre YMUIt No Query Form Specifies the vertical scale factor for the reference waveform specified by the DATa DESTination command Group Waveform Syntax WFMPre YMUTt lt NR3 gt Arguments lt NR3 gt is the vertical scale factor in YUNits usually volts per division WFMPre YOFf No Query Form Specifies the offset of the vertical component for the reference waveform specified by the DATa DESTination command Group Waveform Syntax WFMPre YOFf lt NR3 gt Arguments lt NR3 gt is the vertical offset in digitizing levels TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 173 Command Descriptions WFMPre YZEro No Query Form 2 174 Group Syntax Arguments Specifies the offset for the reference waveform specified by the DATa DESTina tion command Waveform WFMPre YZEro lt NR3 gt lt NR3 gt is of the offset in YUNits usually volts Table 2 26 lists additional WFMPre commands that are included
116. aveform preamble that contains information such as the horizontal scale vertical scale and other settings in place when the waveform was created Refer to the WFMPre com mands starting on page 2 167 for more information about the waveform preamble Once you transfer the waveform data to the controller you can convert the data points into voltage values for analysis using information from the waveform preamble Use the GETWFM program on the diskette supplied with this manual to learn how to scale data Transfer waveforms from the oscilloscope to an external controller using the following sequence 1 Select the waveform source s using the DATa SOUrce command If you want to transfer multiple waveforms select more than one source 2 Specify the waveform data format using DATa ENCdg 3 Specify the number of bytes per data point using DATa WIDth 4 Specify the portion of the waveform that you want to transfer using DATa STARt and DATa STOP 5 Transfer waveform preamble information using WFMPRe query 6 Transfer waveform data from the oscilloscope using the CURVe query TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Transferring Waveform Transfer waveform data to one of the two reference memory locations in the Data to the Oscilloscope oscilloscope using the following sequence 1 Specify the waveform reference memory using DATa DESTination Specify the waveform data format using DATa ENCdg
117. aveforms and setups TIMe Set query oscilloscope time TRG Perform Group Execute Trigger GET TST Return self test results UNLock Unlock front panel local lockout VERBos Set query full command name or minimum spellings with query 2 18 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax RS 232 Commands RS 232 commands let you set or query the RS 232 port parameters Table 2 14 RS 232 commands Header Description RS232 Return RS232 parameters RS232 BAUd Set query baud rate RS232 CONTrol DCD Retum DCD monitoring setting RS232 CONTrol RTS Set query hard flagging RS232 HARDFlagging Set query hard flagging RS232 MODE Always returns RAW RS232 PACE Set query soft flagging RS232 PARity Set query parity type RS232 PRESet Set default RS 232 parameters RS232 SBITS RS232 SOFTFlagging RS232 STOPBits RS232 TRANsmit DELay Set query number of stop bits Set query soft flagging Set query number of stop bits Set query delay before query response RS232 TRANsmi t TERMinator Save and Recall Commands Set query end of line terminator Save and Recall commands let you save and retrieve internal waveforms and settings Saving settings saves most of the current oscilloscope settings Recalling settings returns the oscilloscope settings to those of the saved settings Table 2 15 Save and recall commands Header RCL Description Recall saved oscilloscope setting RECA11 SETUp RECA
118. cilloscope The oscilloscope status handling system consists of five 8 bit registers and two queues This section describes these registers and components and explains how the event handling system operates The registers in the event handling system fall into two functional groups m The Standard Event Status Register SESR and the Status Byte Register SBR contain information about the status of the oscilloscope These registers are the Status Registers m The Device Event Status Enable Register DESER the Event Status Enable Register ESER and the Service Request Enable Register SRER determine whether selected types of events are reported to the Status Registers and the Event Queue These three registers are the Enable Registers The Standard Event Status Register SESR and the Status Byte Register SBR record certain types of events that may occur while the oscilloscope is in use IEEE Std 488 2 1987 defines these registers Each bit in a Status Register records a particular type of event such as an execution error or service request When an event of a given type occurs the oscilloscope sets the bit that represents that type of event to a value of one You can disable bits so that they ignore events and remain at zero See the Enable Registers section on page 3 3 Reading the status registers tells you what types of events have occurred The Standard Event Status Register SESR The SESR shown in Figure 3 1 record
119. d lt QString gt is a quoted string that defines the file name and path Enter the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will save the waveform to the current directory filename stands for a filename of up to 8 characters followed by a period and any 3 character extension Do not use wild card characters Examples SAVE WAVEFORM MATH1 REF1 saves the math 1 waveform in reference memory location 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 147 Command Descriptions SAVe WAVEform FILEFormat Specifies the file format for saved waveforms Group Save and Recall Related Commands SAVE WAVEFORM Syntax SAVe WAVEform FILEFormat INTERNal SPREADSheet MATHCad SAVe WAVEform FILEFormat Arguments INTERNal specifies the internal format Internal format files have a isf extension SPREADSheet specifies the spreadsheet format Spreadsheet format files have a CSV extension MATHCad specifies the MathCad format MathCad format files have a DAT extension Examples SAVE WAVEFORM FILEFORMAT SPREADSHEET specifies the waveform when saved will be stored in a spreadsheet compatible format 2 148 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions SELect Query Only Returns the selected waveform and the display status of all waveforms Group
120. d during the acquisition interval PEAKdetect mode can reveal the presence of aliasing AVErage specifies averaging mode where the resulting waveform shows an average of SAMple data points from several separate waveform acquisitions The number of waveform acquisitions that go into making up the average waveform is set or queried using the ACQuire NUMAVg command ENVelope specifies envelope mode where the resulting waveform shows the PEAKdetect range of data points from several separate waveform acquisitions The number of waveform acquisitions that go into making up the envelope waveform is set or queried using the ACQuire NUMENV command TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Examples ACQUIRE MODE ENVELOPE sets the acquisition mode to display a waveform that is an envelope of many individual waveform acquisitions ACQUIRE MODE might return ENVELOPE ACQuire NUMACq Query Only Group Related Commands Syntax Returns Examples Indicates the number of acquisitions that have taken place since starting acquisition This value is reset to zero when any Acquisition Horizontal or Vertical arguments that affect the waveform are modified The maximum number of acquisitions that can be counted is 230 1 This is the same value that the oscilloscope displays in the top line of the screen Acquisition ACQuire STATE ACQuire NUMACq lt NR1 gt ACQUIRE NUMACQ might return 350 indicating that
121. d edge No arm sample Measurement error No valid edge No arm cross Measurement error No valid edge No trigger cross Measurement error No valid edge No second cross 2223 2224 2225 Measurement error waveform mismatch Measurement error WAIT calculating Measurement error No waveform to measure 2226 Null Waveform 2221 2228 2229 2230 Positive and Negative Clipping Measurement error Positive Clipping Measurement error Negative Clipping Measurement error High Ref Low Ref 2235 Math error Invalid math description 2240 2241 2242 Invalid password Waveform request is invalid Data start and stop record length 2243 2244 2245 2246 2248 Waveform requested is not a data source Waveform requested is not turned on Saveref error Selected channel is turned off Saveref error Selected channel data invalid Saveref error Source reference data invalid 2260 2210 2271 Calibration error Alias error I ias syntax error 2272 gt ias execution error 2273 2274 egal alias label gt ias parameter error TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 15 Status and Events Table 3 5 Execution error messages EXE Bit 4 Cont Code Message 2275 Alias definition too long 2276 Alias expansion error 2277 Alias redefinition not allowed 2278 Alias header not found 2279 Alias label too long 2280 Alias table
122. dicating that at least one of the selected diagnostic tests have failed DIAG RESULT FLAG returns either PASS or FAI1 DIAg RESUIt LOG Query Only Group Related Commands Syntax Returns Examples 2 72 Returns the internal results log from the last diagnostic test sequence execution The list contains all modules and module interfaces that were tested along with the pass fail status of each Calibration and Diagnostic DIAg RESUIt FLAg DIAg RESUIt LOG lt QString gt in the following format lt Status gt lt Module name gt lt Status gt lt Module name gt DIAG RESULT LOG might return DIAG RESULT LOG pass Processor pass Display pass FP Proc Interface fail Front Panel TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DIAg SELect ALL No Query Form Group Syntax Arguments Specifies that all system test sequences will be run when the DIAg STATE EXECUte command is sent Calibration and Diagnostic DIAg SELect ALL ALL ALL selects functional memory and register tests for the acquisition processor and display systems and self diagnostics for the front panel DIAg STATE No Query Form Group Syntax Arguments Examples Executes the diagnostic tests specified by the DIAg SELect command When the test sequence has completed any of the modules or module interfaces that failed diagnostics are displayed on the screen and stored in an internal lo
123. directory lt new file path gt is a quoted string that defines the new name of the file Input the file path using the form lt drive gt lt dir gt lt filename gt drive and one or more lt dir gt s are optional If you do not specify them the oscilloscope will place the newly named file in the current directory FILESYSTEM RENAME TEK00000 SET MYSETTING SET gives the file named TEK00000 SET the new name of MYSETTING SET The file remains on the current directory FILESystem RMDir No query form Group Syntax Arguments Examples 2 92 Deletes a named directory File system FILESystem RMDir directory path directory path is a quoted string that defines the directory Input the directory using the form lt drive gt lt dir gt lt directory name gt drive and one or more lt dir gt s are optional If you do not specify them the oscilloscope will delete the directory in the current directory directory name gt stands for a directory name of up to 8 characters and can be followed by a period 7 and a 3 character extension FILESYSTEM RMDIR NEATPICS deletes the directory named NEATPICS in the current directory TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HARDCopy Group Syntax Arguments Examples Sends a copy of the screen display followed by an EOI to the port specified by HARDCopy PORT The format and layout of the output is specified with t
124. ds Header MEASUrement Description Return all measurement parameters MEASUrement GATing Set query measurement gating MEASUrement IMMed MEASUrement IMMed SOUrce 1 MEASUrement IMMed TYPe Return immediate measurement parameters Setthe channel from which to take the immediate measurement The immediate measurementto be taken MEASUrement IMMed UNIts Return immediate measurement units MEASUrement IMMed VALue MEASUrement MEAS x MEASUrement MEAS x SOUrce 1 MEASUrement MEAS x STATE Return immediate measurement result Return parameters on the measurement Setthe channel from which to take the measurement Turn measurement display on or off MEASUrement MEAS x TYPe MEASUrement MEAS x UNIts MEASUrement MEAS x VALue Set query the measurement to be taken return units to use for measurement Measurement result query MEASUrement METHod Set query the method for calculating reference levels MEASUrement REFLevel MEASUrement REFLevel ABSolute HIGH MEASUrement REFLevel ABSolute LOW MEASUrement REFLevel ABSolute MID MEASUrement REFLevel METHod MEASUrement REFLevel PERCent HIGH MEASUrement REFLevel PERCent LOW Return percent and absolute reference levels Set query the top level for measurement 90 level Set query the low level for measurement 10 level Set query the mid level
125. e Each Enable Register acts as a filter to a Status Register the DESER also acts as a filter to the Event Queue and can prevent information from being recorded in the register or queue Each bit in an Enable Register corresponds to a bit in the Status Register it controls In order for an event to be reported to its bit in the Status Register the corresponding bit in the Enable Register must be set to one If the bit in the Enable Register is set to zero the event is not recorded The bits in the Enable Registers are set using various commands The Enable Registers and the commands used to set them are described below The Device Event Status Enable Register DESER The DESER shown in Figure 33 controls which types of events are reported to the SESR and the Event Queue The bits in the DESER correspond to those in the SESR as described earlier Use the DESE command to enable and disable the bits in the DESER Use the DESE query to read the DESER 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE ROC OPC Figure 3 3 The Device Event Status Enable Register DESER TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 3 Status and Events The Enable Registers and 3 4 the PSC Command The Event Status Enable Register ESER The ESER shown in Figure 3 4 controls which types of events are summarized by the Event Status Bit ESB in the SBR Use the ESE command to set the bits in
126. e command alias feature off ALIAS STATE returns 0 when alias mode is off TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 37 Command Syntax ALLEv Query Only 2 38 Group Related Commands Syntax Returns Examples Causes the oscilloscope to return all events and their messages and removes the returned events from the Event Queue The messages are separated by commas Use the ESR query to enable the events to be returned For a complete discussion of the use of these registers see page 3 1 This command is similar to repeatedly sending EVMsg queries to the oscilloscope Status and Error CLS DESE ESE ESR EVENT EVMsg EVQty SRE STB ALLEv The event code and message in the following format Event Code gt lt Comma gt lt QString gt lt Comma gt lt Event Code Comma QString lt QString gt Message Command Command is the command that caused the error and may be returned when a command error is detected by the oscilloscope As much of the command is returned as possible without exceeding the 60 character limit of the Message and Command strings combined The command string is right justified ALLEV might return the string ALLEV 2225 Measurement error No waveform to measure 420 Query UNTERMINATED TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax AUTOSet No Query Form Causes the oscilloscope to adjust its vertic
127. e is waiting for a trigger Self Test Tests the GPIB or RS 232 interface and returns a 0 Miscellaneous TST TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 163 Command Descriptions UNLock No Query Form Group Related Commands Syntax Arguments 2 164 Unlocks the front panel This command is equivalent to LOCk NONe NOTE If the oscilloscope is in the Remote With Lockout State RWLS the UNLock command has no effect For more information see the ANSI IEEE Std 468 1 1987 Standard Digital Interface for Programmable Instrumentation section 2 8 3 on RL State Descriptions Miscellaneous LOCk UNLock ALL ALL specifies all front panel buttons and knobs TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions VERBos Group Related Commands Syntax Arguments Examples Sets and queries the verbose state that controls the length of keywords on query responses Keywords can be both headers and arguments This command does not affect IEEE Std 488 2 1987 Common Commands those starting with an asterisk Miscellaneous HEADer LRN SET VERBos OFF ON lt NR1 gt VERBos ON or lt NR1 gt 0 sets the verbose state true which returns full length keywords for applicable setting queries OFF or lt NR1 gt 0 sets the verbose state false which returns minimum length keywords for applicable setting queries VERBOS ON sets the verbose state true VE
128. e page 3 1 Status and Error CLS ESE ESR EVENT EVMsg SRE STB DESE NR1 DESE lt NR1 gt is a value in the range from 0 to 255 The binary bits of DESER are set according to this value For example DESE 209 sets the DESER to the binary value 11010001 that is the most significant bit in the register is set to 1 the next most significant bit to 1 the next bit to 0 and so on The power on default for DESER is all bits set if PSC is 1 If PSC is O the DESER maintains its value through a power cycle NOTE Setting DESER and ESER to the same value allows only those codes to be entered into the Event Queue and summarized on the ESB bit bit 5 of the Status Byte Register Use the ESE command to set ESER A discussion of event handling begins on page 3 1 DESE 209 sets the DESER to binary 11010001 which enables the PON URQ EXE and OPC bits DESE might return the string DESE 186 showing that DESER contains the binary value 10111010 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 71 Command Descriptions DIAg RESUIt FLAg Query Only Group Related Commands Syntax Returns Examples Returns the pass fail status from the last diagnostic test sequence execution Used the DIAg RESUIt LOG query to determine which test s has failed Calibration and Diagnostic DIAg RESUIt LOG DIAg RESUIt FLAg PASS indicating that all of the selected diagnostic tests have passed FATI in
129. eaders on applicable query responses You can then use the query response as a command OFF or lt NR1 gt 0 sets the Response Header Enable State to false This causes the oscilloscope to omit headers on query responses so that only the argument is returned Examples HEADER OFF causes the oscilloscope to omit headers from query responses HEADER might return the value 1 showing that the Response Header Enable State is true TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 97 Command Descriptions HORizontal Query Only Group Syntax Examples Returns all settings for the horizontal commands The commands HORizon tal MAIn SCAle HORizontal MAIn SECdiv HORizontal SCAle and HORI zontal SECdiv are equivalent so HORizontal MAIn SCAlIe is the only value that is returned Horizontal HORizontal HORIZONTAL might return the string HORIZONTAL MODE MAIN RECORDLENGTH 1000 POSITION 5 0E0 TRIGGER POSITION 50 HORIZONTAL MAIN SCALE 1 0E 6 HORIZONTAL DELAY MODE RUNSAFTER SCALE 1 0E 6 TIME RUNSAF TER 1 6E 8 HORIZONTAL REF1 LOCK REF2 LOCK FITTOSCREEN 0 HORizontal DELay Query Only Group Related Commands Syntax Examples 2 98 Returns all horizontal delayed time base parameters The commands HORizon tal DELay SECdiv and HORizontal DELay SCAle are identical so only HORizontal DELay SCAle is returned Horizontal HORizontal HORizontal DELay MODe HORizontal DELay SCAle HORizontal
130. en the CLS command is executed CURSor Query Only Returns all current cursor settings Group Cursor Syntax CURSor Examples CURSOR might return CURSOR FUNCTION OFF VBARS UNITS SECONDS POSITION1 5 0E 4 POSITION2 4 5E 3 SELECT CURSORI CURSOR HBARS POSITION1 3 2E0 POSITION2 3 2E0 SELECT CURSORI as the current cursor settings 2 50 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CURSor FUNCtion Group Related Commands Syntax Arguments Examples Selects and displays the cursor type Cursors are attached to the selected channel This command is equivalent to setting Function in the Cursor menu Cursor SELect CONTROI CURSor FUNCtion HBArs OFF PAIred VBArs CURSor FUNCtion HBArs specifies horizontal bar cursors that measure the vertical units volts dB OFF removes the cursors from the display VBArs specifies vertical bar cursors that measure time or frequency PAIred specifies paired cursors that show both horizontal and vertical units CURSOR FUNCtion VBARS selects vertical bar type cursors CURSor HBArs Query Only Group Syntax Examples Returns the current settings for the horizontal bar cursors Cursor CURSor HBArs CURSOR HBARS might return CURSOR HBARS POSITION1 O POSITION2 O SELECT CURSORI TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 51 Command Syntax CURSor HBArs DELTa Query Only Group Syntax Returns Exa
131. ensitivity It requires added signal amplitude for more stable less false triggering TRIGGER MAIN EDGE COUPLING DC sets the main edge trigger coupling to DC TRIGger MAIn EDGE SLOpe Group Syntax Arguments Examples 2 156 Selects a rising or falling slope for the main edge trigger This is equivalent to setting Slope in the Trigger menu Trigger TRIGger MAIn EDGE SLOpe FALL RISe TRIGger MAIn EDGE SLOpe FALL specifies to trigger on the falling or negative edge of a signal RISe specifies to trigger on the rising or positive edge of a signal TRIGGER MAIN EDGE SLOPE RISE sets the main edge trigger to occur on the rising slope TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TRIGger MAIn EDGE SOUrce Group Syntax Arguments Examples Sets or queries the source for the main edge trigger This is equivalent to setting Source in the Trigger menu Trigger TRIGger MAIn EDGE SOUrce EXT EXT10 CH lt x gt LINE TRIGger MAIn EDGE SOUrce EXT specifies an external trigger using the EXT TRIG connector EXT10 specifies an external trigger using the EXT TRIG connector with x10 attenuation CH lt x gt specifies one of the input channels LINE specifies AC line voltage TRIGGER MAIN EDGE SOURCE LINE specifies the AC line voltage as the main edge trigger source TRIGGER MAIN EDGE SOURCE might return CH2 for the main edge trigger source TRIGger
132. eous Related Commands _ RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 STOPBITS RS232 Syntax RS232 SOFTFlagging ON OFF lt NR1 gt RS232 SOFTFlagging Arguments ON or NR1 z O0 turns on softflagging OFF or lt NR1 gt 0 turns off softflagging Examples RS232 SO0FTFLAGGING ON turns on soft flagging TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 141 Command Descriptions RS232 STOPBits 2 142 Group Related Commands Syntax Arguments Examples Sets or queries the number of transmission stop bits sent with each character to identify the end of data for that character The standard setting for most computer equipment is 1 stop bit If another command is sent immediately after this command without waiting for it to complete the first couple of characters may be lost Miscellaneous RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 SOFT FLAGGING RS232 RS232 STOPBits lt NR1 gt RS232 STOPBits lt NR1 gt where lt NR1 gt can either be 1 or 2 RS232 STOPBITS 1 sets the number of stop bits to 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 TRANsmit DELay Group Related Commands Syntax Arguments Examples Sets or queries the minimum amount of time to wait after receiving a query command before sending the response This is provided for old terminals and computers that cannot accept data immediately after
133. equipped with a Tektronix National Instruments GPIB board and associated drivers or an RS 232 COM serial port For example the GPIB programs work with a Tektronix S3FG210 National Instruments GPIB PCII IIA GPIB package see Figure 4 1 GPIB board r Tektronix S 3F G210 or National Instruments PCII IIA gus Drivers ektronix S3FG210 or OUS compatiable and o L1 o 2 or O Microscoft Microsoft 7 j QuickBASIC QuickC e PC compatible Figure 4 1 Equipment needed to run the GPIB and RS 232 example programs TDS 340A TDS 360 amp TDS 380 Programmer Manual 4 1 Programming Examples GPIB Examples Compiling the Example programs 4 2 All the example GPIB programs assume that the GPIB system recognizes the oscilloscope as DEV1 and the PC controller as GPIBO You can assign these names using the IBCONF EXE program The example GPIB software includes MEAS measures a parameter of an oscilloscope waveform COMM shows communication between the controller and the oscilloscope GETWFM reads a waveform from an oscilloscope and stores its time and voltage va
134. equivalent to selecting the measurement in the Select Measurement side menu Measurement MEASUrement MEAS lt x gt TYPe AMPLitude BURst CMEan CRMs FALL FREQuency HIGH LOW MAXimum MEAN MINImum NDUTy NOVershoot NWIdth PDUTy PERIod PK2pk POVershoot PWIdth RISe RMS MEASUrement MEAS lt x gt TY Pe AMPLi tude is the high value minus the low value or HIGH LOW BURst is the time from the first MidRef crossing to the last MidRef crossing CMEan is the arithmetic mean over one cycle CRMs is the true Root Mean Square value over one cycle FALL is the time that it takes for the falling edge of a pulse to fall from a HighRef value to a LowRef value FREQuency is the reciprocal of the period measured in Hertz HIGH is the 100 reference level LOW is the 0 reference level MAXimum is the highest amplitude MEAN is the arithmetic mean over the entire waveform MINImum is the lowest amplitude NDUTy is the ratio of the negative pulse width to the signal period expressed as a percentage NOVershoot is the negative overshoot expressed as Low Minimum Amplitude NOVershoot 100 x NWIdth is the distance time between MidRef usually 50 amplitude points of a negative pulse TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions Examples PDUTy is the ratio of the positive pulse width to the signal period expressed as a percentage PERIod is
135. er the yyyy and after the mm DATE 1996 01 24 specifies that the date is set to January 24 1996 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 69 Command Descriptions DDT 2 70 Group Related Commands Syntax Arguments Examples Allows the user to specify a command or a list of commands that are executed when the oscilloscope receives a TRG command or the GET GPIB interface message This is a special alias that TRG uses Miscellaneous ALIAS DEFINE TRG Get GPIB interface message DDT lt Block gt lt QString gt DDT lt Block gt or lt QString gt is a complete sequence of program messages The messages must contain only valid commands that must be separated by semicolons and must follow all rules for concatenating commands see page 2 4 The sequence must be lt 80 characters Block format is always returned as a query response DDT 217ACQUIRE STATE RUN EOI specifies that the acquisition system will be started each time a TRG command is sent TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DESE Group Related Commands Syntax Arguments Examples Sets or queries the bits in the Device Event Status Enable Register DESER The DESER is the mask that determines whether or not events are reported to the Standard Event Status Register SESR and entered into the Event Queue For a more detailed discussion of the use of these registers se
136. error 241 Hardware missing 242 Hardware configuration error 243 Hardware I O device error 250 Mass storage error 251 Missing mass storage 252 Missing media 253 Corrupt media 254 Media full 255 Directory full 256 File name not found 257 File name error 258 Media protected 260 Expression error 261 Math error in expression 2200 Measurement error Measurement system error 2201 Measurement error Zero period 2202 Measurement error No period found 2203 Measurement error No period second waveform 2204 Measurement error Low signal amplitude 2205 Measurement error Low amplitude second waveform 2206 Measurement error Invalid gate 2207 Measurement error Measurement overflow 2208 Measurement error Waveform does not cross Mid Ref 2209 Measurement error No second Mid Ref crossing 2210 Measurement error No Mid Ref crossing second waveform 2211 Measurement error No backwards Mid Ref crossing 2212 Measurement error No negative crossing TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events Table 3 5 Execution error messages EXE Bit 4 Cont Code 2213 Message Measurement error No positive crossing 2214 Measurement error No crossing 2215 2216 2217 2218 Measurement error No crossing second waveform Measurement error No crossing target waveform Measurement error Constant waveform Measurement error Unused 2219 2220 2221 2222 Measurement error No vali
137. es not respond to the following interface messages PPC PPD PPE and PPU The oscilloscope does not send out a status message when the ATN Attention and EOI End or Identify lines are asserted simultaneously DC1 Device Clear The oscilloscope responds to the DCL Device Clear and when made a listener the SDC Selected Device Clear interface messages TDS 340A TDS 360 amp TDS 380 Programmer Manual C 1 Appendix C Interface Specifications m DTI Device Trigger When acting as a listener the oscilloscope responds to the GET Group Execute Trigger interface message m CO Controller The oscilloscope cannot control other devices m F2 Electrical The oscilloscope uses tristate buffers to provide optimal high speed data transfer Interface Messages Table C 1 shows the standard interface messages that the oscilloscope supports Table C 1 Standard interface messages Message GPIB DCL Yes GET Yes GTL Yes LLO Yes PPC No PPD No PPE No PPU No SDC Yes SPD Yes SPE Yes TCT No UNL Yes UNT Yes Listen Addresses Yes Talk Addresses Yes C 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual Se Se ae ee Appendix D Factory Initialization Settings The factory initialization settings provide a known state for the oscilloscope Factory initialization sets values as shown in Table D 1 Table D 1 Factory initialization defaults Control Acquire mode Factory Initialization value Sample
138. etting Started Tek Run 100kS s Sample Hard Copy Port p Centronics COICOICOICO CO M500us Cchi 7 OV Hcp LayoutHcp Formal GPIB T clear System Portrait Interleaf Talk Listen F3 232 spool C cC Figure 1 7 RS 232 Hardcopy menu Programming Model Table 1 5 describes how the model for programming the oscilloscope differs from controlling the oscilloscope using the front panel Table 1 5 Comparison of programming and front panel models Programming Model Front Panel Model You can access all controls at all times You can only change the controls that are accessible in the current menu You have less control over some features than is available through the programming interface You have more control over some features than is available through the front panel TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 13 Getting Started Tutorial 1 14 This tutorial contains one simple example of operating the oscilloscope through the programming interface This example verifies communication with the oscilloscope acquires a signal and then takes a frequency measurement Refer to the chapter Programming Examples on page 4 1 for a description of the diskette included with this manual that contains additional programming examples The tutorial assumes you have already attached a P
139. etting of the specified channel This is equivalent to setting Coupling in the Vertical menu Group Vertical Syntax CH lt x gt COUPling AC DC GND CH lt x gt COUPling Arguments AC sets the specified channel to AC coupling DC sets the specified channel to DC coupling GND sets the specified channel to ground Only a flat ground level waveform is displayed Examples CH1 COUPLING AC establishes AC coupling on channel 1 CH2 COUPLING might return DC indicating that channel 2 is set to DC coupling 2 44 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CHex gt INVert Group Related Commands Syntax Arguments Examples Sets or queries the input polarity setting of the specified channel This command is equivalent to setting Invert in the Vertical menu Vertical None CH lt x gt INVert ON OFF lt NR1 gt CH lt x gt INVert lt NR1 gt 0 sets the specified channel to invert off normal display lt NR1 gt 1 sets the specified channel to invert on CH1 INVert OFF establishes a non inverted display on channel 1 CH2 INVert might return 1 indicating that channel 2 is inverted TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 45 Command Syntax CH lt x gt OFFSet Group Related Commands Syntax Arguments Examples 2 46 Sets or queries the offset in volts that is subtracted from the specified input channel before it is ac
140. execution error Waveform WFMPre lt wfm gt The format of the response is lt wfm gt WFID lt Qstring gt NR_PT lt NR1 gt PT_FMT ENV Y XUNit lt QString gt XINcr lt NR3 gt PT_ Off lt NR1 gt YUNit lt QString gt YMUIt lt NR3 gt YOFf lt NR3 gt YZEro NR3 wfm WFID Qstring NR PT lt NR1 gt PT FMT ENV Y XUNit lt QString gt XINcr lt NR3 gt PT Off lt NR1 gt YUNit lt QString gt YMUIt lt NR3 gt YOFf lt NR3 gt YZEro lt NR3 gt WFMPre lt wfm gt NR Pt Related Commands Group Syntax Arguments Examples Sets or queries the number of points that are in the transmitted waveform record This value is ignored on input DATa DESTination Waveform WFMPre lt wfm gt NR_Pt lt NR1 gt WFMPre wfm NR Pt lt NR1 gt is the number of data points If DATa WIDth is 2 then there are twice as many bytes lt NR1 gt 0 means that the waveform record is of an unspecified length WFMPRE CHl NR Pt might return 1000 as the number of data points in the waveform record trans ferred from channel 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 175 Command Descriptions WFMPre lt wfm gt PT_Fmt Group Related Commands Syntax Arguments Examples 2 176 Selects the data point format for the waveform selected by the DATa SOUrce command On input lt wfm gt always defaults to the reference location specified by DATa DESTination regardless of what is se
141. for measurements Set query the method to assign HIGH MID and LOW levels either or absolute volts Set query the top level for measurement 90 level Set query the low level for measurement 10 level MEASUrement REFLevel PERCent MID TDS 340A TDS 360 amp TDS 380 Programmer Manual Set query the mid level for measurements Command Syntax Miscellaneous Commands Miscellaneous commands are a group of commands that do not fit into any other category Several commands and queries used with the oscilloscope are common to all devices on the GPIB bus and the RS 232 interface These commands and queries are defined by IEEE Std 488 2 1987 and Tek Standard Codes and Formats 1989 and begin with an asterisk character Table 2 13 Miscellaneous commands Header Description AUTOSet Automatic oscilloscope setup DATE Set query oscilloscope date DDT Define group execute trigger GET FACtory Same as RST HDR Same as HEADer HEADer Return command header with query ID Return Tektronix Codes and Format instrument identification IDN Return IEEE 488 instrument identification LOCk Lock front panel local lockout LRN Learn device setting NEWpass Change password for User Protected Data PASSWord Access to change User Protected Data PUD Set query user protected data REM No action remark only RST Return most settings to factory default SET Same as LRN TEKSecure Initialize w
142. full 2285 Tek Secure Pass 2286 Tek Secure Fail 2301 Cursor error Off screen Table 3 6 lists the device errors that can occur during oscilloscope operation These errors may indicate that the oscilloscope needs repair Table 3 6 Device error messages DDE Bit 3 Code 300 310 311 Message Device specific error System error Memory error 312 313 314 315 PUD memory lost Calibration memory lost Save recall memory lost Configuration memory lost 350 361 362 363 Queue overflow does not set DDE bit Parity error in program message check parity Framing error in program message check baud rate Input buffer overrun check flagging TDS 340A TDS 360 amp TDS 380 Programmer Manual Status and Events Table 3 7 lists the system event messages These messages are generated whenever certain system conditions occur Table 3 7 System event messages Code 400 Message Query event 401 402 403 404 405 Power on PON bit 7 set Operation complete OPC bit 0 set User request UR Q bit 6 set Power fail DDE bit 3 set Request control 410 420 430 440 Query INTERRUPTED QYE bit 2 set Query UNTERMINATED QYE bit2 set Query DEADLOCKED QYE bit2 set Query UNTERMINATED after indefinite response QYE bit 2 set Table 3 8 lists warning messages that do not interrupt the flow of command execution These messages notify you that you may get unexpected results Table 3
143. full When the oscilloscope no longer asserts RTS it continues to read incoming data until the input buffer is full and then reports an input overrun error The oscilloscope asserts DTR Data Terminal Ready when oscilloscope power is on Miscellaneous RS232 BAUD RS232 PARITY RS232 SOFTFLAGGING RS232 STOP BITS RS232 RS232 HARDFlagging ON OFF lt NR1 gt RS232 HARDFlagging ON or lt NR1 gt O turn on hardflagging OFF or lt NR1 gt 0 turn off hardflagging RTS always asserted RS232 HARDFLAGGING ON turns on hard flagging TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 MODE Group Related Commands Syntax Arguments Examples RS232 PACE Group Related Commands Syntax Arguments Examples TDS 340A TDS 360 amp TDS 380 Programmer Manual The oscilloscope accepts but ignores this command The query always returns RAW Miscellaneous RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 SOFT FLAGGING RS232 RS232 MODE RAW RS232 MODE RAW GPIB emulation mode RS232 MODE always returns RAW Sets or queries the input and output soft flagging over the RS 232 port This command performs the same function as RS232 SOFTFlagging Miscellaneous RS232 BAUD RS232 HARDFLAGGING RS232 PARITY RS232 STOPBITS RS232 RS232 PACE XON NONe RS232 PACE lt XON gt turn on soft flagging lt NONE gt turn off soft flagg
144. g file The pass fail status is returned by DIAg RESUIt FLAg and the internal log is returned by DIAg RESUICLOG This command is equivalent to running Extended Diagnostics by selecting Execute in the Utility menu when System is set to Diag NOTE The DIAg STATE EXECute command can take 30 seconds or more to respond Calibration and Diagnostic DIAg STATE EXECute EXECute runs the diagnostic test sequences specified by the DIAg SELect command When complete the oscilloscope returns to the state it was in just prior to the test The pass fail status of the tests can be returned by executing DIAg RESUICFLAg The DIAg STATE EXECute command clears the Event Queue the Input Queue and the Status Registers SESR and SBR DIAg STATE EXECUTE executes all the diagnostic tests that have been selected TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 73 Command Descriptions DiSplay Query Only Group Syntax Examples DiSplay CLOCk Group Syntax Arguments Examples 2 74 Returns the current display settings Display DISplay DISPLAY might return DISPLAY FORMAT YT STYLE VECTORS PERSISTENCE 5 0E 1 GRATICULE FULL TRIGT 1 INTENSITY OVERALL 85 WAVEFORM 70 TEXT 60 CONTRAST 150 CLOCK 1 Controls the display of the date and time This is equivalent to setting the Display Date Time in the Readout Options side menu The query form returns an ON 1 or an OFF 0 Display DISplay CLOCk OFF O
145. ger MAIn VIDeo SOUrce CH lt x gt EXT EXT10 LINE TRIGger MAIn VIDeo SOUrce Arguments CH lt x gt specifies one of the input channels CH1 or CH2 EXT specifies the external trigger EXT10 specifies the external trigger attenuated by x10 LINE specifies triggering from the power line frequency Examples TRIGGER MAIN VIDEO SCAN RATE1 specifies the line rate range for commercial broadcast television 2 162 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TRIGger STATE Query Only Group Syntax Returns Examples TST Query Only Group Syntax Returns the current state of the triggering system Trigger TRIGger STATE REAdy indicates that all pretrigger information has been acquired and the oscilloscope is ready to accept a trigger PARTial indicates that the main trigger has occurred and the oscilloscope is waiting for the runs after delay to complete TRIGger indicates that the oscilloscope has accepted a trigger and is acquiring the posttrigger information AUTO indicates that the oscilloscope is in auto mode and acquires data even in the absence of a trigger SAVE indicates that acquisition is stopped or that all channels are off ARMed indicates that the oscilloscope is acquiring pretrigger information All triggers are ignored when TRIGger STATE is ARMed TRIGGER STATE might return READY indicating that pretrigger data has been acquired and the oscilloscop
146. hannel 1 gain to 100 mV div CH2 VOLTS might return 1 0E0 indicating that the current V div setting of channel 2 is 1 V div CLEARMenu No Query Form Clears the current menu from the display For some floppy disk drive menus this command returns you to the previous menu This command is equivalent to pressing the CLEAR MENU button on the front panel Group Display Syntax CLEARMenu Examples CLEARMENU clears the menu from the display TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 49 Command Syntax CLS No Query Form Clears the oscilloscope status data structures Group Status and Error Related Commands DESE ESE ESR EVENT EVMsg SRE STB Syntax CLS The CLS command clears the following W the Event Queue m he Standard Event Status Register SESR m the Status Byte Register except the MAV bit see below If the CLS command immediately follows an EOI the Output Queue and MAV bit Status Byte Register bit 4 are also cleared MAV indicates informa tion is in the output queue The device clear DCL GPIB control message will clear the output queue and thus MAV CLS does not clear the output queue or MAV A complete discussion of these registers and bits and of event handling in general begins on page 3 1 CLS can suppress a Service Request that is to be generated by an OPC This happens if a hardcopy output or single sequence acquisition operation is still being processed wh
147. he HARDCopy FORMat and HARDCopy LAYout commands This command is equivalent to pressing the front panel HARDCOPY button HARDCopy returns format layout and port information NOTE This command is NOT IEEE Std 488 2 1987 compatible Hardcopy HARDCopy ABOrt CLEARSpool STARt HARDCopy ABOrt terminates the hardcopy output in process NOTE DCL does NOT clear the output queue once a hardcopy is in process The only way to abort the hardcopy process is to send the HARDCopy ABOrt command The output queue can then be cleared using DCL CLEARSpool clears the printer output spooler STARt initiates a screen copy that is sent to the controller where it can be stored in a file or redirected to a printing device NOTE Use the WAI command between HARDCopy STARt commands to ensure that the first hardcopy is complete before starting another HARDCOPY ABORT stops any hardcopy output that is in process TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 93 Command Descriptions HARDCopy FILEName Group Related Commands Syntax Arguments Examples 2 94 Selects the file to send the hardcopy data to on the next hardcopy command HARDCOPY START This is equivalent to setting the target file name in the Hardcopy menu Hardcopy HARDCopy HARDCopy FILEName file path HARDCopy FILEName file path specifies that the hardcopy is sent to the named file file path is a quoted str
148. he HORizontal MAIn SCAle command It is provided to maintain program compatibility with some older models of Tektronix oscilloscopes Horizontal HORizontal DELay SCAle HORizontal DELay SECdiv HORizon tal MAIn SCAle HORi zontal MAIn SECdiv lt NR3 gt HORi zontal MAIn SECdiv TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 103 Command Descriptions HORizontal MODe 2 104 Group Related Commands Syntax Arguments Examples Selects whether the horizontal display uses the main or delayed time base or both This command is equivalent to setting Time Base in the Horizontal menu Horizontal DISplay INTENSITy CONTRast HORizontal MODe DELAYEd INTENSIFied MAIn HORi zontal M0De DELAYEd means that the selected waveform is horizontally scaled relative to the delayed time base INTENSIFied uses both the main and delay scales to display the waveform The portion of the waveform that would be displayed in DELAYEd mode is intensified Set the level intensity with the DISplay INTENSITy CONTRast command MAIn means that the waveform is horizontally scaled relative to the main time base HORIZONTAL MODE DELAYED uses the delayed horizontal scale to display the waveform HORIZONTAL MODE might return INTENSIFIED indicating that the waveform is displayed using both the main and delayed time base scale TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HORizontal POSition
149. ications describes setting up for RS 232 remote control including connecting the oscilloscope and setting the appropriate front panel controls Setting Up the Hardcopy Port describes how to select the port to which you will send screen capture data Programming Model describes how the programming interface differs from the front panel user interface Tutorial includes a simple programming example For general information about operating the oscilloscope refer to the TDS 340A TDS 360 amp TDS 380 User Manual TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 1 Getting Started Connector Locations All remote communications connectors are located on the back panel of the TDS 300 Series oscilloscope Figure 1 1 shows the locations of the connectors RS 232 connector GPIB connector Figure 1 1 Location of RS 232 and GPIB connectors Comparing GPIB and RS 232 Your system hardware may support both GPIB and RS 232 interfaces You should select the interface that best meets your requirements The GPIB interface is an eight bit parallel bus that provides high speed data transfer and multiple instrument control In contrast the RS 232 interface is a slower serial data bus for single instrument control but is easy to connect to with low cost controllers Table 1 1 provides a more in depth comparison of the GPIB and RS 232
150. ight return TRIGGER MAIN VIDEO HOLDOFF VALUE 5 0E 7 2 160 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions TRIGger MAIn VIDeo HOLdoff VALue Group Syntax Arguments Examples Sets or queries the video trigger holdoff value This is equivalent to setting Holdoff in the video trigger menu s Holdoff side menu Trigger TRIGger MAIn VIDeo HOLdoff VALue lt NR3 gt TRIGger MAIn VIDeo HOLdoff VALue lt NR3 gt is the holdoff from 500 ns to 10 s TRIGGER MAIN HOLDOFF VALUE 3E 03 set the holdoff value to 3 ms TRIGger MAIn VIDeo SCAN Group Syntax Arguments Examples Sets or queries the video trigger scan rate This is equivalent to setting Scan Rate in the video trigger menu s Scan Rate side menu Trigger TRIGger MAIn VIDeo SCAN RATE1 RATE2 RATE3 RATE4 RATE5 TRIGger MAIn VIDeo SCAN RATE1 specifies a 15 to 20 kHz line rate range RATE2 specifies a 20 to 25 kHz line rate range RATES specifies a 25 to 35 kHz line rate range RATE4 specifies a 35 to 50 kHz line rate range RATES specifies a 50 to 65 kHz line rate range TRIGGER MAIN VIDeo SCAN RATE1 selects rate 1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 161 Command Descriptions TRIGger MAIn VIDeo SOUrce Sets or queries the source for the main video trigger This is equivalent to selecting the source in the video trigger menu s Source side menu Group Trigger Syntax TRIG
151. in the country in which the Tektronix service center is located Customer shall be responsible for paying all shipping charges duties taxes and any other charges for products returned to any other locations This warranty shall not apply to any defect failure or damage caused by improper use or improper or inadequate maintenance and care Tektronix shall not be obligated to furnish service under this warranty a to repair damage resulting from attempts by personnel other than Tektronix representatives to install repair or service the product b to repair damage resulting from improper use or connection to incompatible equipment c to repair any damage or malfunction caused by the use of non Tektronix supplies or d to service a product that has been modified or integrated with other products when the effect of such modification or integration increases the time or difficulty of servicing the product THIS WARRANTY IS GIVEN BY TEKTRONIX IN LIEU OF ANY OTHER WARRANTIES EXPRESS OR IMPLIED TEKTRONIX AND ITS VENDORS DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE TEKTRONIX RESPONSIBILITY TO REPAIR OR REPLACE DEFECTIVE PRODUCTS IS THE SOLE AND EXCLUSIVE REMEDY PROVIDED TO THE CUSTOMER FOR BREACH OF THIS WARRANTY TEKTRONIX AND ITS VENDORS WILL NOT BE LIABLE FOR ANY INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES IRRESPECTIVE OF WHETHER TEKTRONIX OR THE VENDOR HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUC
152. ing RS232 PACE XON turns on soft flagging 2 137 Command Descriptions RS232 PARity 2 138 Group Related Commands Syntax Arguments Examples Sets or queries the parity used for all RS 232 data transfers When parity is odd or even the oscilloscope generates the selected parity on output and checks all input against the selected parity When parity is none the oscilloscope performs no input parity error checks and generates no output parity When the parity 9th bit does not match the parity type the oscilloscope reports a parity error If another command is sent immediately after this command without waiting for the parity to be programmed the first few characters may be lost Miscellaneous RS232 BAUD RS232 HARDFLAGGING RS232 SOFTFLAGGING RS232 STOPBITS RS232 RS232 PARity EVEN ODD NONe RS232 PARi ty EVEN sets even parity ODD sets odd parity lt NONe gt sets no parity no ninth bit transmitted RS232 PARITY EVEN sets even parity TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions RS232 PRESet No Query Form Group Related Commands Syntax Arguments Examples Sets RS 232 parameters to default values The RS232 query will show the new settings RS232 MODE RAW RS232 CONTrol RTS RFR RS232 CONTrol DCD OFF RS232 PACE NONE RS232 BAUD 9600 RS232 PARity NONE RS232 SBITs 1 RS232 TRANsmit DELay 0 Miscellaneous RS232 BAUD RS232
153. ing so verify that the personal computer is also using soft flagging Also verify that the personal computer is not sending binary data Binary data may contain S characters which cause transmissions to stop Verify that both the personal computer and the oscilloscope are not sending binary data Binary data may contain S characters which cause transmissions to stop Verify that the RS 232 cable is the recommended cable Some cables may be wired without the CTS or RTS lines which are used by hard flagging Verify that the personal computer program is using CTS RTS hard flagging After the personal computer program sends a BREAK the first message fails Setting Up the Hardcopy Port You can set the port to which the oscilloscope will send screen hard copy data To set the hard copy port do the following steps 1 12 Verify that the personal computer program is waiting for and reading the DCL and end of line terminator response sent by the oscilloscope 1 Press the UTILITY button to display the Utility menu 2 Press the Hcp Port main menu button to display the Hard Copy Port side menu 3 Select the Centronics side menu button to send hard copy data to the Centronics port select GPIB to send hard copy data to the GPIB port select RS 232 to send hard copy data to the RS 232 port or select File to send hard copy data to the floppy disk drive See Figure 1 7 TDS 340A TDS 360 amp TDS 380 Programmer Manual G
154. ing Your Example QuickBASIC Programs To make an executable for any of the following files perform the following steps 1 2 Install QuickBASIC Install the Tektronix S3FG210 National Instruments GPIB PCII ITA GPIB board and drivers Remember to reboot your PC to initialize the GPIB drivers Copy the files from the examples diskette to your hard disk You might also create a special directory to store them For example if the current drive is hard disk C you want to store the examples in drive C and the examples diskette is in drive B type mkdir examples cd examples copy b gpib q basic For this installation you also want to copy QBDECL BAS and QBIB OBJ from your Tektronix S3FG210 National Instruments GPIB PCII IIA GPIB drivers directory to the directory your example programs are in For example if the GPIB drivers are in the gpib pc directory and you are in the example programs directory type copy gpib pc qbdecl bas copy gpib pc qbib obj Perform the following two steps for example programs a Compile the program using the following command bc o lt file gt bas where file is one of the example program names To compile MEAS BAS type bc o meas bas To compile COMM BAS type bc o comm bas To compile GETWFM BAS type bc o getwfm bas To compile TL BAS type bc o tl bas TDS 340A TDS 360 amp TDS 380 Programmer Manual Programming Examples b Link the compiled program with the
155. ing that defines the file name and path Input the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will write the file to the current directory filename stands for a filename of up to 8 characters followed by a period and any 3 character extension You can automatically create different names for files You do this by using the question mark as a special wildcard character These stand for numbers the oscilloscope will insert sequentially in the filename For example if you placed two question marks at the end of the filename then the oscilloscope would append 00 to the first file created 01 to the next and 02 to the next This helps you automatically create different names for files It is particularly useful in automated testing situations HARDCOPY FILENAME TEK IBM selects TEK IBM as the selected file name HARDCOPY FILENAME might return TEK IBM as the selected file name HARDCOPY FILENAME TEK IBM selects TEK as the selected file name with a numeric two digit suffix The oscilloscope might return TEKOO IBM as the first file TEKO1 IBM as the second TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HARDCopy FORMat Selects the output data format for hard copies This is equivalent to setting Format in the Hardcopy menu Group Hardcopy Syntax HARD
156. inth bit to each character You can set the error bit for either None Even or Odd parity When the parity setting is odd or even the oscilloscope generates the selected parity on output and checks incoming data for the selected parity When the parity setting is none there is no parity bit Stop Bits sets the number of stop bits sent after each character You can set 1 or 2 stop bits Delay sets the delay time before responding to a query You can set times from 0 to 60 seconds in 100 ms increments 4 Press in turn each side menu button until the desired parameter setting is displayed in the side menu or press Set RS 232 Parameters to Default Values if the default settings are appropriate Table 1 3 lists the default RS 232 settings 1 8 TDS 340A TDS 360 amp TDS 380 Programmer Manual Getting Started Table 1 3 RS 232 default settings RS 232 Parameter Default Setting Baud Rate 9600 Hard Flagging On Soft Flagging Off EOL LF Parity None Stop Bits 1 Delay 0s RS 232 Conventions There are processing conventions that are specific to the RS 232 interface The next sections discuss the following conventions m Transferring binary data W Processing break signals m Reporting RS 232 I O errors W Checking command status Transferring Binary Data When using the RS 232 port to transfer binary data to the oscilloscope note the following points m Using RTS CTS hard flagging guarantees no d
157. l bar cursor as the active cursor CURSOR HBARS SELECT returns CURSOR1 when the first cursor is the active cursor CURSor PAlred HDELta Query Only Group Related Commands Syntax Examples Queries the vertical distance between the first and second paired cursor This is the absolute value of the first cursor s vertical position minus the second cursor s vertical position Cursor CURSor FUNCtion CURSor PAIred HDELta CURSOR PAIRED HDELTA might return 5 08E0 for the voltage difference between the two cursors TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 53 Command Syntax CURSor PAlred HPOS1 Query Only Queries the vertical position of the first paired cursor Group Cursor Related Commands CURSor FUNCtion Syntax CURSor PAIred HP0S1 Examples CURSOR PAIRED HPOS1 might return 6 4E 2 indicating that the first cursor is at 264 0 mV CURSor PAlred HPOS2 Query Only Queries the vertical position of the second paired cursor Group Cursor Related Commands CURSor FUNCtion Syntax CURSor PAIred HP0S2 Examples CURSOR PAIRED HPOS2 might return 6 4E 2 indicating the second cursor is at 264 0 mV 2 54 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CURSor PAlred POSITION1 Group Related Commands Syntax Arguments Examples Sets or queries the horizontal time or frequency position of the first paired cursor Cursor CURSor FUNCtion C
158. lias You can define up to 10 aliases at one time Aliases can be recursive That is aliases can include other aliases with up to 10 levels of recursion Alias ALIas DEFINE lt QString gt lt Comma gt lt QString gt Block ALIas DEFINE lt QString gt The first lt QString gt is the alias label This label cannot be a command name Labels must start with a letter and can contain only letters numbers and underscores other characters are not allowed The label must be lt 12 characters The second lt QString gt or lt Block gt is a complete sequence of program messages The messages can contain only valid commands separated by semicolons and following all rules for concatenating commands see page 2 4 The sequence must be lt 80 characters NOTE Attempting to give two aliases the same name causes an execution error To give a new alias the name of an existing alias you must first delete the existing alias ALIAS DEFINE ST1 RECALL SETUP 5 AUTOSET EXECUTE SELECT CHI ON defines an alias named ST1 that sets up the oscilloscope ALIAS DEFINE STI might return ALIAS DEFINE ST1 239 RECALL SETUP 5 AUTOSET EXECUTE SELECT CH1 ON TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 35 Command Syntax ALlas DELEte No Query Form Group Syntax Arguments Examples Removes a specified alias This command is identical to ALIas DELEte NAMe Alias ALIas DELEte lt QString gt
159. lues in a file TL a talker listener program The example programs diskette contains programs written in Microsoft QuickBASIC 4 5 and Microsoft QuickC 2 5 Executable versions of the programs are in the PROGRAMS directory Source versions are in the SOURCES directory Within this directory the QuickBASIC programs are in the Q BASIC subdirectory and the QuickC programs are in the Quick C subdirectory A README file in each directory explains how to build executable code from the source files provided The QuickC directory also comes with sample MAKE files and sample executable files These have the suffix MAK If you wish to develop code you will need to use files that come with the GPIB system Specifically the QuickBASIC programs use QBDECL BAS and QBIB OBJ The QuickC programs use DECL H and MCIB OBJ NOTE The GPIB programs you compile in the Sources directory work with the Tektronix S3FG210 National Instruments GPIB PCH IA GPIB system It may take extra steps or changes to get them to work with older Tektronix GURU and other GPIB systems TDS 340A TDS 360 amp TDS 380 Programmer Manual Programming Examples Compiling and Linking Your Example Quick C Programs To make an executable for any of the following files perform the following steps 1 Install QuickC Select the SMALL memory model Be sure to set up your path so DOS can access the Quick C directory 2 Install the Tektronix S3FG210 National Instr
160. m data you must specify the data format record length and waveform locations Acquired waveform data uses either one or two 8 bit data bytes to represent each data point The number of bytes used depends on the acquisition mode specified when you acquired the data Data acquired in SAMple ENVelope or PEAKdetect modes use one 8 bit byte per waveform data point data acquired in AVErage mode uses two 8 bit bytes per point For more information on the acquisition modes see the ACQuire MODe command on page 2 28 The DATa WIDth command lets you specify the number of bytes per data point when transferring data to and from the oscilloscope If you specify two bytes for data that uses only one the least significant byte will be filled with zeros if you specify one byte for data that uses two the least significant byte will be ignored The oscilloscope can transfer waveform data in either ASCII or binary format You specify the format with the DATa ENCdg command TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax ASCII Data ASCII data is represented by single byte signed integer values in the range 128 to 127 Each data point value consists of up to three ASCII characters for the value and one for the minus sign if the value is negative Commas separate data points The DATa WIDth command is ignored when using ASCII format since the byte width is always one An example ASCII waveform data string may look like this
161. m gt parameter instead the instrument uses the reference location specified by DATa DESTina tion command Group Waveform Syntax WFMPre wfm YZEro lt NR3 gt WFMPre wfm YZEro Arguments lt NR3 gt is the offset in YUNits usually volts 2 180 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions ZOOm VERTical POSition Sets or queries the vertical position of waveforms NOTE ZOOm commands affect only REF and MATH waveforms Group Vertical Syntax Z00m VERTical POSition lt NR3 gt Z00m VERTical POSition Arguments lt NR3 gt is the vertical position in divisions Examples Z00M VERTICAL POSITION might return ZOOM VERTICAL POSITION 0 ZOOm VERTical SCALe Sets or queries the vertical compression or expansion factor NOTE ZOOm commands affect only REF and MATH waveforms Group Vertical Syntax Z00m VERTical SCALe NR3 Z00m VERTi cal SCALe Arguments lt NR3 gt is the amount of vertical compression or expansion Examples Z00M VERTICAL SCALE might return ZOOM VERTICAL SCALE 1 0E0 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 181 Command Descriptions 2 182 TDS 340A TDS 360 amp TDS 380 Programmer Manual Ss Status and Events Registers Status Registers The oscilloscope provides a status and event reporting system for the GPIB and RS 232 interfaces This system informs you of certain significant events that occur within the os
162. mand Entry Abbreviating Commands Concatenating Commands 2 4 To clear the Output Queue and reset the oscilloscope to accept a new command use the Device Clear DCL GPIB command or the RS 232 BREAK signal Follow these general rules when entering commands m You can enter commands in upper or lower case W You can precede any command with white space characters White space characters include any combination of the ASCII control characters 00 09 or 20 decimal m The oscilloscope ignores commands consisting of any combination of white space characters and line feeds You can abbreviate many oscilloscope commands These abbreviations are shown in capitals in the command s listing in the Commands section For example the command ACQuire NUMAvg can be entered simply as ACQ NUMA or acq numa If you use the HEADer command to have command headers included as part of query responses you can further control whether the returned headers are abbreviated or are full length The VERBose command lets you control this You can concatenate any combination of set commands and queries using a semicolon The oscilloscope executes concatenated commands in the order received When concatenating commands and queries you must follow these rules 1 Completely different headers must be separated by both a semicolon and by the beginning colon on all commands but the first For example the commands TRIGger MODe NORMal and ACQuire NUMAVg 8 wo
163. mand at a time This time could be spent doing other tasks The controller can continue to write commands to the input buffer but the commandis are not processed by the oscilloscope until all operations in process are complete If the input buffer becomes full the controller will be unable to write any more commands to the buffer and will result in a time out Using the BUSY Query BUSY allows you to find out whether the oscilloscope is busy processing a command that has an extended processing time such as single sequence acquisition The same command sequence using BUSY for synchronization looks like this Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Wait until the acquisition is complete before taking the measurement While BUSY keep looping TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 9 Status and Events Using the OPC Command 3 10 Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE This sequence lets you create your own wait loop rather than using the WAI command An advantage to using BUSY is that you eliminate the possibility of a time out caused by writing too many commands to the input buffer The controller is still tied up though and the repeated BUSY
164. me and path Input the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will copy the file in the current directory filename stands for a filename of up to 8 characters and can be followed by a period and a 3 character extension You can also use the inclusive filename in the source file path to copy all files directory path is a quoted string that defines the directory Input the directory using the form lt drive gt lt dir gt lt directory name gt drive and one or more lt dir gt s are optional If you do not specify them the oscilloscope will copy the directory in the current directory directory name gt stands for a ee 99 directory name of up to 8 characters and can be followed by a period and a 3 character extension FILESYSTEM COPY TEK00001 SET fd0 TEK00001 SET copies the file named TEK00001 SET on the current drive to a file named TEK00001 SET on the drive fd0 in the root directory FILESYSTEM COPY fd0 YOURDIR TEK00001 SET fd0 MYDIR copies the file named TEK00001 SET on the fd0 drive and the YOURDIR directory to the MYDIR directory on the same drive FILESYSTEM COPY YOURDIR fd0 MYDIR copies the files in the YOURDIR directory in the current directory to the MYDIR directory on the fd0 drive Sets or queries the path of the current working direc
165. means that some operations are not completed in the order that they were sent There may be times when the result of an operation is dependent on the result of an earlier one and you must be assured that the first operation has completed before processing the next one The status and event reporting system provides ways to do this For example a typical application would be to acquire a single sequence waveform and then take a measurement on the acquired waveform You could use the following command sequence Set up single sequence acquisition SELECT CH1 ON ACQUIRE MODE SAMPLE ACQUIRE STOPAFTER SEQUENCE Acquire waveform data ACQUIRE STATE ON Set up the measurement parameters MEASUREMENT IMMED TYPE AMPLITUDE MEASUREMENT IMMED SOURCE CH1 Take amplitude measurement on acquired data MEASUREMENT IMMED VALUE TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 7 Status and Events ACQUIRE STATE ON The acquisition of the waveform requires extended processing time and may not complete before the amplitude measurement is taken See Figure 3 7 This will result in an incorrect amplitude value ACQUIRE STATE ON Acquiring waveform data MEASUREMENT IMMED VALUE Processing time Figure 3 7 Command processing without using synchronization The acquisition of the waveform must be completed before the measurement can be taken on the
166. mer Manual Command Syntax ACQuire STOPAfter Group Related Commands Syntax Arguments Examples Tells the oscilloscope when to stop taking acquisitions This is equivalent to setting Stop After in the Acquire menu Acquisition ACQuire MODe ACQuire STATE ACQuire STOPAfter RUNSTop SEQuence ACQuire STOPAfter RUNSTop specifies that the run and stop state should be determined by the user pressing the front panel RUN STOP button SEQuence specifies single sequence operation where the oscilloscope stops after it has acquired enough waveforms to satisfy the conditions of the acquisi tion mode For example if the acquisition mode is set to sample and the horizontal scale is set to a speed that allows real time operation then the oscilloscope stops after digitizing a waveform from a single trigger event However if the acquisition mode is set to average 16 waveforms then the oscilloscope stops only after acquiring all 16 waveforms The ACQuire STATE command and the front panel RUN STOP button also stop acquisitions when the oscilloscope is in single sequence mode NOTE If you set the acquisition system to single sequence envelope mode and set the number of envelopes to infinity the oscilloscope will envelope a maximum of 257 acquisitions ACQUIRE STOPAFTER RUNSTop sets the oscilloscope to stop acquisition when the user presses the front panel RUN STOP button ACQUIRE STOPAFTER might return
167. mmand the oscilloscope stops reading data when there is no more data to read or when the specified record length is reached this command is ignored Waveform CURVe DATa SNAp DATa STOP lt NR1 gt DATa STOP lt NR1 gt ranges from 1 to 1000 and is the last data point that will be transferred If lt NR1 gt is greater than the record length then data will be transferred up to the record length If both DATa STARt and DATa STOP are greater than the record length an execution error will occur When DATa STOP is less than DATa STARt the values are swapped internally for CURVe If you always want to transfer complete waveforms set DATa STARt to 1 and DATa STOP to the record length 1000 DATA STOP 150 specifies that the waveform transfer will stop at data point 150 DATA STOP might return 285 as the last data point that will be transferred TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DATa TARget Sets or queries the location for storing waveform data transferred to the oscilloscope using the CURVe command This command is equivalent to the DATa DESTINATION command and is included here for compatibility with older Tektronix instruments Group Waveform Related Commands CURVe Syntax DATa TARget REF lt x gt DATa TARget TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 67 Command Descriptions DATa WIDth 2 68 Group Related Commands Syntax Arguments Examples
168. mmand Descriptions starting on page 2 27 lists commands alphabetically The oscilloscope GPIB and RS 232 interfaces conform to Tektronix standard codes and formats except where noted The GPIB interface also conforms to IEEE Std 488 2 1987 except where noted Acquisition Commands Acquisition commands affect the acquisition of waveforms These commands shown in Table 2 4 control mode averaging enveloping and single waveform acquisition Table 2 4 Acquisition commands Header Description ACQuire Return acquisition parameters ACQuire MODe Set query acquisition mode ACQuire NUMACq Return of acquisitions obtained ACQuire NUMAVg Set query number of acquisitions for average ACQuire NUMEnv Set query number of acquisitions for envelope ACQuire STATE Start or stop acquisition system ACQuire STOPAfter Set query acquisition control TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 11 Command Syntax Alias Commands Alias commands let you define your own commands as a sequence of standard commands This is useful when you use the same commands each time you perform a certain task such as setting up the oscilloscope to take a measurement Table 2 5 Alias commands Header ALIas Description Set query alias expansion state ALIas CATALOG ALIas DEFINE ALIas DELEte Return a list of aliases Create a new alias Remove an alias ALIas DELEte ALL Remove all aliases ALIas DELEte NAMe ALIas STAT
169. mmer Manual vii General Safety Summary Product Damage Precautions Use Proper Power Source Do not operate this product from a power source that applies more than the voltage specified Provide Proper Ventilation To prevent product overheating provide proper ventilation Do Not Operate With If you suspect there is damage to this product have it inspected by qualified Suspected Failures service personnel Safety Terms and Symbols Terms in This Manual These terms may appear in this manual WARNING Warning statements identify conditions or practices that could result in injury or loss of life CAUTION Caution statements identify conditions or practices that could result in damage to this product or other property Terms on the Product These terms may appear on the product DANGER indicates an injury hazard immediately accessible as you read the marking WARNING indicates an injury hazard not immediately accessible as you read the marking CAUTION indicates a hazard to property including the product viii TDS 340A TDS 360 amp TDS 380 Programmer Manual General Safety Summary Symbols on the Product The following symbols may appear on the product A AN m DANGER Protective Ground ATTENTION Double High Voltage Earth Terminal Refer to Manual Insulated Certifications and Compliances CSA Certified Power CSA Certification includes the products and power cords appropriate for use in Cords the
170. mples Returns the difference in vertical units between the two horizontal bar cursors Cursor CURSor HBArs DELTa lt NR3 gt CURSOR HBARS DELTA might return 5 08E0 for the difference between the two cursors CURSor HBArs POSITION lt x gt Group Syntax Arguments Examples 2 52 Positions a horizontal bar cursor Cursor CURSor HBArs POSITION x lt NR3 gt CURSor HBArs POSITION lt x gt lt NR3 gt specifies the cursor position relative to ground in vertical units CURSOR HBARS POSITION1 2 5E 2 positions one of the horizontal cursors at 25 0 mV assuming the vertical units are volts CURSOR HBARS POSITION2 might return 6 4E 2 indicating that one of the horizontal bar cursors is at 64 0 mV TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CURSor HBArs SELect Group Syntax Arguments Examples Selects which horizontal bar cursor is active for front panel control The active cursor is displayed as a solid horizontal line and can be moved using the front panel General Purpose Knob The unselected cursor is displayed as a dashed horizontal line This command is equivalent to pressing the SELECT button on the front panel Cursor CURSor HBArs SELect CURSOR1 CURSOR2 CURSor HBArs SELect CURSOR1 selects the first horizontal bar cursor CURSOR2 selects the second horizontal bar cursor CURSOR HBARS SELECT CURSORI selects the first horizonta
171. n PSC is true the DESER register is set to 255 and the SRER and ESER registers are set to 0 at power on When PSC is false the current values in the DESER SRER and ESER registers are preserved in nonvolatile memory when power is shut off and are restored at power on For a complete discussion of the use of these registers see page 3 1 Status and Error DESE ESE FACtory RST SRE PSC NRI PSC lt NR1 gt 0 sets the power on status clear flag to false disables the power on clear and allows the oscilloscope to possibly assert SRQ after power on lt NR1 gt 0 sets the power on status clear flag true Sending PSC 1 therefore enables the power on status clear and prevents any SRQ assertion after power on Using an out of range value causes an execution warning PSC 0 sets the power on status clear flag to false PSC might return the value 1 showing that the power on status clear flag is set to true TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions PUD Sets or queries a string of Protected User Data This data is protected by the PASSWord command You can modify it only by first entering the correct password The password is not necessary to query the data Group Miscellaneous Related Commands PASSWord Syntax PUD Block PUD Arguments Block is a string containing up to 100 characters Examples PUD 229This instrument belongs to me stores the string
172. nd 2 7 SET 2 150 Setting Command query 2 710 GPIB parameters 1 5 Query 2 110 Recall command 2 29 RS 232 parameters 1 7 Save command 2 45 SPD C 2 SPE C 2 SRE command 2 151 3 4 SRER register 2 128 2 151 3 4 Status 3 7 Status and error command group 2 20 Status and Error commands EVENT 2 83 WAI 2 166 Status and error commands ALLEV 2 38 BUSY 2 40 CLS 2 50 DESE 2 71 3 3 ESE 2 82 3 4 ESR 2 83 3 1 Index 5 Index EVMSG 2 64 EVQTY 2 85 ID 2 108 OPC 2 126 PSC 2 128 3 4 RST 2 132 SRE 2 151 3 4 STB 2 152 3 2 TST 2 163 STB 2 152 STB query 3 2 Syntax BNF Backus Naur form 2 7 Command 2 7 T Table programming message 3 12 TCT C 2 Tek Std Codes and Formats 1989 2 18 2 20 TEKSECURE 2 52 TEKSecure Glossary 2 Terminator command message 2 6 TIME 2 153 Time base manual trigger simulation 2 154 TRG 2 154 TRIGGER 2 54 Trigger command group 2 20 Trigger commands TRIGGER 2 154 TRIGGER MAIN 2 55 TRIGGER MAIN EDGE 2 155 TRIGGER MAIN EDGE COUPLING 2 156 TRIGGER MAIN EDGE SLOPE 2 156 TRIGGER MAIN EDGE SOURCE 2 157 TRIGGER MAIN HOLDOFF 2 157 TRIGGER MAIN HOLDOFF VALUE 2 158 TRIGGER MAIN LEVEL 2 158 TRIGGER MAIN MODE 2 159 TRIGGER MAIN TYPE 2 159 TRIGGER MAIN VIDEO FIELD 2 160 TRIGGER MAIN VIDEO HOLDOFF 2 160 TRIGGER MAIN VIDEO HOLDOFF VALUE 2 161 TRIGGER MAIN VI
173. ng commands bc o lt file gt bas bc o v rs232io bas where file is one of the example program names To compile MEAS BAS type bc o meas bas To compile COMM BAS type bc o comm bas To compile GETWFM BAS type bc o getwfm bas To compile TL BAS type bc o tl bas b Link the compiled program with the rs232io obj module to create the executable program file EXE using the following command link lt file gt obj rs232i0 obj where file is one of the above program names To link MEAS OBJ type link meas obj rs23210 0bj To link COMM OBJ type link comm obj rs23210 0bj To link GETWFM OBJ type link getwfm obj rs232i0 obj To link TL OBJ type link tl obj rs232i0 obj The rs23210 BAS file is a collection of input output routines used by the other programs and is included for proper file compilation 5 Run the program by typing the program name To run meas type meas To run comm type comm To run getwfm type getwfm To run tl type t1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 4 7 Programming Examples 4 8 TDS 340A TDS 360 amp TDS 380 Programmer Manual T Appendix A ASCII amp GPIB Code Chart B7 1 B6 1 B5 1 BITS NUMBERS B4 B3 B2 B1 CONTROL SYMBOLS UPPER CASE LOWER CASE 0 20 40 LAO 60 LA16 100 TAO 120 TA16 140 SAO 160 SA16 0000 NUL DLE SP 0 P p 0 0 10 16 20 32 30 48 40 64 50 8o 60 96 70 112 1 GTL 21 uo 41 Lat 61 LA17 101 TAL 121 TAI7
174. nt Waveform DATa DESTination WFMPre lt wfm gt PT Fmt ENV Y WFMPre lt wfm gt PT Fmt ENV specifies that the waveform is transmitted as maximum and minimum point pairs Only y values are explicitly transmitted Absolute coordinates are given by X 0 XINcr n PT_Off Y max YZEro YMUIt Yin YOFf Y YZEro YMUIt yn YOFf mi Y specifies a normal waveform where one ASCII or binary data point is transmitted for each point in the waveform record Only y values are explicitly transmitted Absolute coordinates are given by X 0 XINcr n PT_Off Y YZEro YMUIt y YOFf WFMPRE MATH1 PT FMT might return ENV indicating that the MATHI waveform data format is enveloped TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions WFMPre lt wfm gt PT_Off Group Syntax Arguments Examples WFMPre lt wfm gt WFld Group Syntax Arguments Returns the trigger point within the waveform record On input lt wfm gt always defaults to the reference location specified by DATa DESTination regardless of what is sent Waveform WFMPre lt wfm gt PT Off NRI WFMPre lt wfm gt PT Off lt NR1 gt 0 to the record length 1000 and is the position of the trigger point relative to DATa STARt when queried WFMPRE CH1 PT OFF returns 0 indicating the trigger position within the waveform record Returns information about the waveform
175. ntal position of the reference waveform and allows it to be positioned independently Examples HORIZONTAL REF1 LOCK locks the horizontal position of REF 1 to the active waveforms HORizontal SCAle Sets the time per division for the main time base and is identical to the HORi zontal MAIn SCAle command It is included here for compatibility purposes Group Horizontal Syntax X HORizontal SCAle NR3 HORizontal SCAle 2 106 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HORizontal SECdiv Group Syntax Sets the time per division for the main time base and is identical to the HORi zontal MAIn SCAle command It is included here for compatibility purposes Horizontal HORizontal SECdiv NR3 HORi zontal SECdiv HORizontal TRIGger Query Only Group Syntax Examples Returns the horizontal trigger parameter Horizontal HORizontal TRIGger HORIZONTAL TRIGGER might return HORIZONTAL TRIGGER POSITION 50 HORizontal TRIGger POSition Group Syntax Arguments Examples Sets or queries the position of the trigger This is equivalent to setting Trigger Position in the Horizontal menu Horizontal HORizontal TRIGger POSition NRI HORizontal TRIGger POSition lt NR1 gt is from 0 to 100 maximum of 75 in the TDS 380 and is the amount of pretrigger information in the waveform HORIZONTAL TRIGGER POSITION might return 50 TDS 340A TDS 360 am
176. on Do not use wild card characters REF lt x gt is the location in internal reference memory where the waveform is recalled from RECALL WAVEFORM TEK00000 WFM REF1 recalls the waveform stored in the file named TEK00000 WFM to reference location 1 Specifies a comment This line is ignored by the oscilloscope Miscellaneous REM lt QString gt lt QString gt is a string that can have a maximum of 80 characters REM This is a comment is ignored by the oscilloscope TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 131 Command Descriptions RST No Query Form 2 132 Group Related Commands Syntax Reset Returns the oscilloscope to a known set of oscilloscope settings but does not purge any aliases or stored settings This command is the same as the FACtory command Refer to Appendix D for a listing of the factory default settings Miscellaneous FACtory PSC RCL RECAII SETUp SAV SAVe SETUp TEKSecure RST Setting the oscilloscope to factory default has the following impact on the programming interface m Clears the Event Status Enable Register m Clears the Service Request Enable Register W Sets the Device Event Status Enable Register to 255 W Sets the Power On Status Clear Flag to TRUE m Purges all defined aliases Wm Enables all Command Headers HEADer ON W Sets the macro defined by DDT to a zero length field m Clears the pending operation flag and associated operations The
177. on Some command headers have only one mnemonic If a command header has multiple mnemonics they are always separated from each other by a colon character A quantity quality restriction or limit associated with the header Not all commands have an argument while other commands have multiple arguments Arguments are separated from the header by a Space Arguments are separated from each other by a Comma A single comma between arguments of multiple argument commands It may optionally have white space characters before and after the comma Space Header A A white space character between command header and argument It may optionally consist of multiple white space characters C X SAVe WAVEform CH1 REF3 Mnemonics Space Arguments Figure 2 1 Command message elements 2 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Commands Commands cause the oscilloscope to perform a specific function or change one of its settings Commands have the structure m lt Header gt lt Space gt lt Argument gt lt Comma gt lt Argument gt A command header is made up of one or more mnemonics arranged in a hierarchical or tree structure The first mnemonic is the base or root of the tree and each subsequent mnemonic is a level or branch off of the previous one Commands at a higher level in the tree may affect those at a lower level The leading colon always returns you to
178. ottom of the hardcopy is along the short side of the page This is the standard format HARDCOPY LAYOUT might return PORTRAIT as the page layout format of the hardcopy output Selects the output port for the printer This is equivalent to setting Port in the Hardcopy menu Hardcopy HARDCopy HARDCopy PORT GPIb CENtronics RS232 FILE HARDCopy PORT GPIb specifies that the hard copy is sent out the GPIB port CENtronics specifies that the hard copy is sent out the Centronics port RS232 specifies that the hard copy is sent out the RS232 port FILE specifies that the hard copy is sent to a file HARDCOPY PORT might return GPIB as the selected hardcopy output port TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions HDR This command is identical to the HEADer query and is included for compatibili ty with older Tektronix instruments Group Miscellaneous Syntax HDR lt NR1 gt OFF ON HDR HEADer Sets or queries the Response Header Enable State that causes the oscilloscope to either include or omit headers on query responses This command does not affect IEEE Std 488 2 1987 Common Commands those starting with an asterisk they never return headers Group Miscellaneous Related Commands VERBose Syntax HEADer NRI OFF ON HEADer Arguments ON or lt NR1 gt 0 sets the Response Header Enable State to true This causes the oscilloscope to include h
179. p TDS 380 Programmer Manual 2 107 Command Descriptions ID Query Only Group Related Commands Syntax Returns Examples IDN Query Only Group Related Commands Syntax Returns Examples 2 108 Returns identifying information about the oscilloscope and its firmware Status and Error IDN ID TEK model number gt CF 91 1CT FV lt firmware version number gt ID might return TEK TDS360 CF 91 1CT FV v1 00 Returns the oscilloscope identification code Miscellaneous ID IDN TEKTRONIX model number gt 0 CF 91 1CT FV lt firmware version number IDN might return the response TEKTRONIX TDS360 0 CF 91 1CT FV v1 00 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions LOCk Group Related Commands Syntax Arguments Examples Enables and disables all front panel buttons and knobs There is no front panel equivalent Miscellaneous UNLock Remote Enable Group Local Lockout Group LOCk ALL NONe ALL disables all front panel controls NONe enables all front panel controls This is equivalent to the UNLock ALL command NOTE If the oscilloscope is in the Remote With Lockout State RWLS the LOCk NONe command has no effect For more information see the ANSI IEEE Std 468 1 1987 Standard Digital Interface for Programmable Instrumentation section 2 8 3 on RL State Descriptions LOCK returns NONe when the front panel controls are enabled
180. path gt GPIb RS232 CENtronics Arguments file path is a quoted string that defines the file name and path Input the file path using the form drive dir filename drive and one or more lt dir gt s are optional If you do not specify them the oscilloscope will print the file in the current directory filename stands for a filename of up to 8 6699 characters and can be followed by a period and a 3 character extension GPIb specifies that the hardcopy is sent out the GPIB port Option 14 Commu nications Interface only CENtronics specifies that the hardcopy is sent out the Centronics port Option 14 Communications Interface only RS232 specifies that the hardcopy is sent out the RS232 port Option 14 Communications Interface only Examples FILESYSTEM PRINT TEK00000 IBM CENTRONICS sends the file named TEK00000 IBM out the Centronics port FILESystem REName No query form Assigns a new name to a file Group File system Syntax FILESystem REName old file path gt lt new file path TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 91 Command Descriptions Arguments Examples lt old file path gt is a quoted string that defines the file to rename Input the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will look for the filename in the current
181. power on default for ESER is 0 if PSC is 1 If PSC is 0 the ESER maintains its value through a power cycle NOTE Setting the DESER and the ESER to the same value allows only those codes to be entered into the Event Queue and summarized on the ESB bit bit 5 of the Status Byte Register Use the DESE command to set the DESER A discussion of event handling begins on page 3 1 ESE 209 sets the ESER to binary 11010001 which enables the PON URQ EXE and OPC bits ESE might return the string ESE 186 showing that the ESER contains the binary value 10111010 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions ESR Query Only Group Related Commands Syntax Examples EVENT Query Only Group Related Commands Syntax Examples Returns the contents of the Standard Event Status Register SESR ESR also clears the SESR since reading the SESR clears it For a more detailed discussion of the use of these registers see page 3 1 Status and Error ALLEv CLS DESE ESE EVENT EVMsg SRE STB ESR ESR might return the value 213 showing that the SESR contains binary 11010101 Returns from the Event Queue an event code that provides information about the results of the last ESR read EVENT also removes the returned value from the Event Queue A discussion of event handling begins on page 3 1 Status and Error ALLEv CLS DESE ESE ESR EVMsg SRE STB
182. pts responses from the digitizing oscilloscope EOI A mnemonic referring to the control line End or Identify on the GPIB interface bus One of the two possible end of message terminators EOM A generic acronym referring to the end of message terminator The end of message terminator is either an EOI or the ASCII code for line feed LF GPIB Acronym for General Purpose Interface Bus the common name for the communications interface system defined in IEEE Std 488 IEEE Acronym for the Institute for Electrical and Electronic Engineers QuickBASIC A computer language distributed by Microsoft that is based on the Beginner s All Purpose Symbolic Instruction Code TDS 340A TDS 360 amp TDS 380 Programmer Manual Glossary 1 Glossary QuickC A computer language distributed by Microsoft that is based on C RS 232 A serial full duplex asynchronous communication port that follows ANSUI EIA TIA 562 1989 1 ANSI EIA TIA 574 1990 2 and CCITT V 24 1989 3 standards TEKSecure A Tektronix custom command that initializes both waveform and setup memories This overwrites any previously stored data Glossary 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual Index A Abbreviating command 2 4 ACQUIRE 2 27 ACQUIRE MODE 2 28 ACQUIRE NUMACQ 2 29 ACQUIRE NUMAVG 2 30 ACQUIRE NUMENV 2 31 ACQUIRE STATE 2 32 ACQUIRE STOPAFTER 2 33 Acquisition command group 2 11 Acquisition commands ACQUIRE 2 27 ACQUIR
183. qbib obj module to create the executable program file EXE using the following command link lt file gt objt qbib obj where file is one of the above program names To link MEAS OBJ type link meas obj qbib obj To link COMM OBJ type link comm obj qbib obj To link GETWFM OBJ type link getwfm obj qbib obj To link TL OBJ type link tl obj qbib obj The GPIBIO BAS file is a collection of input output routines used by the other programs and is included for proper file compilation 6 Run the program by typing the program name To run meas type meas To run comm type comm To run getwfm type getwfm To run t type t1 NOTE The example programs disable front panel operation while they are running and reenable it when they terminate If your program terminates prematurely front panel operation may remain disabled To re enable front pan el operation do one of the following cycle power on the oscilloscope or send the GPIB command UNLOCK ALL to unlock the front panel You can send the UNLOCK ALL command with the TL program included in your sample programs disk TDS 340A TDS 360 amp TDS 380 Programmer Manual 4 5 Programming Examples RS 232 Examples 4 6 Compiling the Example programs The example RS 232 programs use the COM port of a PC The example RS 232 software includes MEAS measures a parameter of an oscilloscope waveform COMM shows communication between the personal computer and
184. quired The greater the offset the lower on the display the waveform appears This is equivalent to setting Offset in the Vertical menu Vertical CH lt x gt POSition CH lt x gt O0FFSet lt NR3 gt CH x 0FFSet lt NR3 gt is the desired offset in volts The range is dependent on the scale and the probe attenuation factor The offset ranges are shown below Table 2 21 Offset ranges all channels CH x SCAle OFFSet Range 2 mV div 99 5 mV div 1V 100 mV div 995 mV div 10V 1 V div 10 V div 100 V CH1 0FFSET 0 5E0 lowers the channel 1 displayed waveform by 0 5 V CH1 0FFSET might return 5 0E 1 indicating that the current channel 1 offset is 0 5 V TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CH x POSition Group Related Commands Syntax Arguments Examples Sets or queries the vertical position of the specified channel The position voltage value is applied to the signal before digitization This is equivalent to setting Position in the Vertical menu or adjusting the front panel VERTICAL POSITION knob Vertical CH lt x gt OFFSet CH lt x gt POSition lt NR3 gt CH lt x gt POSi tion lt NR3 gt is the desired position in divisions from the center graticule The range is 5 divisions CH2 POSITION 1 3E0 positions the channel 2 input signal 1 3 divisions above the center of the display CH1 POSITION might return 1 3E0 indicating that the c
185. r is not detected within a specific time period Auto also enables roll mode when sweep speeds are slower than 100ms div NORMal waits for a valid trigger event TRIGGER MAIN MODE AUTO specifies that a trigger event is automatically generated Sets or queries the type of main trigger This is equivalent to setting Type in the Trigger menu Trigger TRIGger MAIn TYPe EDGE VIDeo TRIGger MAIn TYPe EDGE is a normal trigger A trigger event occurs when a signal passes through a specified voltage level in a specified direction Edge trigger is controlled by the TRIGger MAIn EDGE commands VIDeo specifies that a trigger occurs when a specified signal is found Video trigger is controlled by the TRIGger MAIn VIDeo commands TRIGGER MAIN TYPE might return VIDEO indicating that the main trigger type is a video trigger TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 159 Command Descriptions TRIGger MAIn VIDeo FIELD Sets or queries the field the video trigger detects Group Trigger Syntax TRIGger MAIn VIDeo FIELD FIELD1 FIELD2 ANY TRIGger MAIn VIDeo FIELD Arguments FIELD1 specifies interlaced video field 1 FIELD2 specifies interlaced video field 2 ANY specifies any line Examples TRIGGER MAIN VIDEO FIELD1 selects field 1 TRIGger MAIn VIDeo HOLdoff Query Only Returns the video trigger holdoff value Group Trigger Syntax TRIGger MAIn VIDeo HOLdof f Examples TRIGGER MAIN VIDEO HOLDOFF m
186. r your configuration requires a null modem connection where transmit receive and control lines are switched or a straight through RS 232 connection Refer to Table 1 2 for information about RS 232 cables 2 Verify that the RS 232 cable is firmly connected to both the oscilloscope and the correct port on your personal computer or printer Verify that your printer or the program on the personal computer is using the correct port Try your program or printer again 3 Verify that the oscilloscope settings match the settings used by your printer or the program on your personal computer Start by choosing Set RS 232 Parameters to Defaults in the RS 232 System of the Utility menu Then change only those menu items that you know need to be changed such as the baud rate Try your printer or computer program again 4 If you are trying to control the oscilloscope using a personal computer or other computer look at the diagnostic error log and examine the RS232 Line Snapshot and the RS232 Errors The RS232 Line Snapshot and the RS232 Errors will not change while you are viewing them They are reset when the power is turned on Use Table 1 4 to troubleshoot your setup Table 1 4 RS 232 troubleshooting Symptom Possible Causes Your personal computer program tried Your RS 232 cable may be wired as a modem instead to send characters to the oscilloscope ofa null modem If you are attempting to use a but the error log displays Chars Rcvd
187. re BN_Fmt and WFMPre BYT_Or as shown in Table 2 22 Setting the DATa ENCdg value causes the corresponding WFMPre values to be updated and vice versa Group Waveform Related Commands WFMPre ENCdg WFMPre BN FMT WFMPre BYT Or Syntax DATa ENCdg ASCIi RIBinary RPBinary SRIbinary SRPbinary DATa ENCdg Arguments ASCIi specifies the ASCII representation of signed integer RIBinary data If this is the value at power on the WFMPre values for BN Fmt BYT Or and ENCdg are set as RP MSB and ASC respectively RIBinary specifies signed integer data point representation with the most significant byte transferred first This format results in the fastest data transfer rate when DATa WIDth is set to 2 The range is 128 to 127 when DATa WIDth is 1 Zero is center screen The range is 32768 to 32767 when DATa WIDth is 2 The upper limit is one division above the top of the screen and the lower limit is one division below the bottom of the screen RPBinary specifies positive integer data point representation with the most significant byte transferred first The range is 0 to 255 when DATa WIDth is 1 127 is center screen The range is 0 to 65 535 when DATa WIDth is 2 The upper limit is one division above the top of the screen and the lower limit is one division below the bottom of the screen SRIbinary is the same as RIBinary except that the byte order is swapped meaning that the least significant byte is transferred first
188. rminator RS232 TRANsmit TERMinator CR sets the carriage return as the EOL terminator TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions SAV No Query Form Group Related Commands Syntax Arguments Examples Save Stores the state of the oscilloscope into a specified memory location You can later use the RCL command to restore the oscilloscope to this saved state This is equivalent to selecting Save Current Setup in the Save Recall menu Save and Recall FACtory RCL RECAII SETUp SAVe SETUp SAV NR1 lt NR1 gt is a value in the range from 1 to 10 and specifies a location Using an out of range value causes an execution error Any settings that have been stored previously at this location will be overwritten SAV 2 saves the current settings in memory location 2 TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 145 Command Descriptions SAVe SETUp No Query Form Group Related Commands Syntax Arguments Examples 2 146 Saves the current front panel setup into the specified memory location or file This is equivalent to selecting Save Current Setup in the Save Recall menu This command is the same as SAV NOTE TDS 300 Series oscilloscope setup files are not compatible with TDS 400 TDS 500 TDS 600 TDS 700 or TDS 800 Series oscilloscope setup files Refer to Setup and Waveform File Formats on page D 2 for more information Save and Recall RECAII S
189. s The CURVe command transfers waveform data to the oscilloscope The data is stored in the reference memory location specified by DATa DESTination starting with the data point specified by DATa STARt Only one waveform can be transferred at a time The waveform is only displayed if the reference is displayed Waveform DATa WFMPre CURVe Block asc curve CURVe Block is the waveform data in binary format The waveform is formatted as lt x gt lt yyy gt lt data gt lt newl ine gt where x is the number of y bytes For example if lt yyy gt 500 then x 3 lt yyy gt is the number of bytes to transfer If width is 1 then all bytes on the bus are single data points If width is 2 then all bytes on the bus are 2 byte pairs Use the DATa WIDth command to set the width data is the curve data newline is a single byte newline character at the end of the data See the GETWFM C or GETWFM BAS examples in the accompanying disk for more information asc curve is the waveform data in ASCII format The format for ASCII data is lt NR1 gt lt NR1 gt where each lt NR1 gt represents a data point CURVE might return for ASCII data CURVE 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DATa Sets or queries the format and location of the waveform data that is transferred
190. s eight types of events that can occur within the oscilloscope Use ESR to read the SESR register Reading the register clears the bits of the register so that the register can accumulate information about new events Table 3 1 shows SESR bit functions TDS 340A TDS 360 amp TDS 380 Programmer Manual 3 1 Status and Events 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Figure 3 1 The Standard Event Status Register SESR Table 3 1 SESR bit functions Bit Function 7 MSB PON Power On Shows that the oscilloscope was powered on 6 URQ User Request Not used 5 CME Command Error Shows thatan error occurred while the oscilloscope was parsing a command or query Command error messages are listed in Table 3 4 on page 3 13 4 EXE Execution Error Shows that an error occurred while the oscilloscope was executing a command or query Execution error messages are listed in Table 3 5 on page 3 13 3 DDE Device Error Shows that a device error occurred Device error messages are listed in Table 3 6 on page 3 16 2 QYE Query Error Shows that either an attempt was made to read the Output Queue when no data was present or pending or that data in the Output Queue was lost 1 RQC Request Control Not used 0 LSB OPC Operation Complete Shows that the operation is complete This bit is set when all pending operations complete following a OPC command
191. ss DISplay DISplay DISplay DISplay File System Commands INTENSITy WAVEform PERSistence STYle TRIGT Waveform brightness Set query the display accumulate time Waveform dots vectors dot accumulate or vector accumulate Controls the display of the trigger indicator on screen File system commands let you store and recall data using the built in 3 5 inch floppy disk drive Table 2 9 lists these commands Table 2 9 File system commands Header FILESystem COPy Description Copy file to new file FILESystem CWD Set directory path FILESystem FILESystem FILESystem FILESystem DELEte DELWarn DIR FORMat Delete named file Setfront panel delete warning Make directory Format named drive FILESystem FREESpace Return free space on current drive TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Table 2 9 File system commands Cont Header Description FILESystem MKDir Make new directory FILESystem OVERWrite Set file overwrite protection FILESystem PRInt Print file to port FILESystem REName Assign new name to file FILESystem RMDir Delete named directory Hard Copy Commands The hard copy commands let you control the format of hard copy output and control the initiation and termination of hard copies Table 2 10 Hard copy commands Header HARDCopy HARDCopy FILE Name HARDCopy FORMat HARDCopy LAYout HARDCopy PORT
192. ss the UTILITY button to display the Utility menu 2 Press the System button in the main menu until it highlights the O selection in the pop up menu 3 Press the GPIB Talk Listen main menu button to display the GPIB Configuration side menu See Figure 1 4 4 Select the Talk Listen Address side menu button 5 Setthe GPIB address using the general purpose knob Tek Run 100kS s Sample GPIB Address 1 E GPIB Configuration Talk Listen od eee a PE E Hardcopy Talk Only Off Bus 5 ur Ws ons Chr 7 70V KC COIOIOIOIDO aa Hcp Port Hcp LayoutHcp Formate 2 Rs 232 Portrait Interleaf MESDSENEd 3 232 CO COSICOICOCI CIC Figure 1 4 Selecting the GPIB address in the GPIB configuration side menu The oscilloscope is now set up for bidirectional communication with your GPIB controller If you want to isolate the oscilloscope from the bus press the Off Bus side menu button This disables all communication with the controller If you want to enter a special mode of operation to communicate directly with non 488 2 hard copy devices press the Hardcopy side menu button to have the oscilloscope send hard copy information only when you press the HARDCOPY button and accept a HARDCOPY ABORT command TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 5 Getting Started Setting
193. t Values MS500us chiis OV more 3 1of2 Oloo Hcp Port Hcp LayoutHcp Formal GPIB Clear system RS 232 Portrait Interleaf TalkzListen Spool DIGIC OIC G Figure 1 6 RS 232 parameter settings TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 7 Getting Started You can set the following parameters Baud Rate sets the data transmission rate You can set rates of 300 600 1200 2400 4800 9600 19200 or 38400 baud Hard Flagging sets hard flagging RTS CTS on or off Flagging controls the flow of data between devices When both hard and soft flagging are off the oscilloscope does not use or recognize any flagging Use hard flagging for binary data transfers Soft Flagging sets soft flagging XON XOFF on or off Hard flagging is the preferred method of controlling the flow of data between devices When both hard and soft flagging are off the oscilloscope does not use or recognize any flagging You should not use soft flagging with binary data transfer since the data may contain XON and XOFF characters Set RS 232 Parameters to Default Values sets default values for RS 232 parameters for a list of default settings see Table 1 3 EOL sets the end of line terminator sent by the oscilloscope You can set CR LF CRLF or LFCR for more information on line terminators see page 2 6 Parity adds an error check bit n
194. t acquisition state The oscilloscope executes concatenated commands and queries in the order it receives them Here are some invalid concatenations m DISPlay INTENsity TEXt BRI ACQuire NUMAVg 16 no colon before ACQuire m DISPlay INTENsity TEXt DIM WAVEform BRI extra colon before WAVEform could also use DISPlay INTENsity WAVEform instead m DISPlay INTENsity TEXt DIM TRG extra colon before a star command TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 5 Command Syntax Message Terminators This manual uses EOM End of message to represent a message terminator GPIB End of Message Terminators GPIB EOM terminators can be the END message EOI asserted concurrently with the last data byte the ASCII code for line feed LF sent as the last data byte or both The oscilloscope always terminates messages with LF and EOI White space is allowed before the terminator for example CR LF is acceptable RS 232 End of Message Terminators RS 232 EOM terminators can be a CR carriage return LF line feed CRLF carriage return followed by a line feed or LFCR line feed followed by a carriage return When receiving the oscillo scope accepts all four combinations as valid input message terminators regard less of the currently selected terminator When a combination of multiple characters is selected CRLF or LFCR the oscilloscope interprets the first character as the terminator the oscilloscope interpre
195. tead the instrument uses the reference location specified by DATa DESTination command Waveform WFMPre wfm YMUlt lt NR3 gt WFMPre lt wfm gt YMU1t lt NR3 gt is the scale factor in YUNits usually volts per digitizing level Sets or queries the vertical position of the waveform On input lt wfm gt always defaults to the reference location specified by DATa DESTination regardless of what is sent The command and query form ignores the lt wfm gt parameter instead the instrument uses the reference location specified by DATa DESTina tion command Waveform WFMPre wfm YOFf lt NR3 gt WFMPre lt wfm gt YOF f lt NR3 gt is the position in digitizing levels TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 179 Command Descriptions WFMPre lt wfm gt YUNit Sets or queries the vertical Y axis units of the waveform data Group Waveform Syntax WFMPre wfm YUNit lt QString gt WFMPre wfm YUNit Arguments lt QString gt is V for volts VV for volts or dB for decibels and specifies the units Examples WFMPRE CH2 YUNIT might return V meaning that the units for the vertical component of the channel 2 waveform data are volts WFMPre wfm YZEro Sets or queries the vertical Y axis offset voltage On input lt wfm gt always defaults to the reference location specified by DATa DESTination regardless of what is sent The command and query form ignores the lt wf
196. the Display Intensity side menu Display DISplay INTENSITy OVERAI1 lt NR1 gt DISplay INTENSITy OVERAI1 lt NR1 gt ranges from 20 to 100 DISplay INTENSITY OVERALL 50 sets the intensity of the display to the middle of the range DISplay INTENSITY OVERALL might return 75 as the overall display intensity TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 77 Command Descriptions DiSplay INTENSITy TEXt Group Syntax Arguments Examples Sets the intensity of the text and the graticule This command is equivalent to setting Text Grat in the Display Intensity side menu Display DISplay INTENSITy TEXt DIM BRIght DISplay INTENSITy TEXt DIM sets the intensity equal to the overall intensity BRIght sets the intensity equal to the contrast setting 100 to 250 of the overall intensity DISPLAY INTENSITY TEXT BRIght sets the intensity of the text to the brightest level DiSplay INTENSITy WAVEform Group Syntax Arguments Examples 2 78 Sets the intensity of the waveforms This command is equivalent to setting Waveform in the Display Intensity side menu Display DISplay INTENSITy WAVEform DIM BRIght DISplay INTENSITy WAVEform DIM sets the intensity equal to the overall intensity BRIght sets the intensity equal to the contrast setting 100 to 250 of the overall intensity DISPLAY INTENSITY WAVEFORM might return DIM indicating that the waveform intensi
197. the ESER and use the ESE query to read it 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Figure 3 4 The Event Status Enable Register ESER The Service Request Enable Register SRER The SRER shown in Figure 3 5 controls which bits in the SBR generate a Service Request GPIB only and are summarized by the Master Status Summary MSS bit Use the SRE command to set the SRER Use the SRE query to read it The RQS bit remains set to one until either the Status Byte Register is read by a Serial Poll GPIB only or the MSS bit changes back to a zero 7 6 5 4 3 2 1 0 ESB MAV Figure 3 5 The Service Request Enable Register SRER The PSC command controls the contents of the Enable Registers at power on Sending PSC 1 sets the Enable Registers at power on as follows m DESER 255 equivalent to a DESe 255 command m ESER 0 equivalent to an ESE 0 command m SRER 0 equivalent to an SRE 0 command Sending PSC 0 lets the Enable Registers maintain their values in nonvolatile memory through a power cycle NOTE To enable the PON Power On event to generate a Service Request GPIB only send PSC 0 use the DESe and ESE commands to enable PON in the DESER and ESER and use the SRE command to enable bit 5 in the SRER Subsequent power on cycles will generate a Service Request GPIB only TDS 340A TDS 360 amp
198. the oscilloscope is busy TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CAL Query Only Runs an internal self calibration and returns oscilloscope calibration status The self calibration can take three and a half minutes or more to respond No other commands will be executed until calibration is complete Group Calibration and Diagnostic Related Commands CALibrate INTERNal Syntax CAL Returns lt NR1 gt 0 indicates that the calibration completed without any errors detected lt NR1 gt 0 indicates that the calibration did not complete successfully or completed with errors Examples CAL performs an internal self calibration and might return 0 to indicate that the calibration was successful TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 41 Command Syntax CALibrate No Query Form Group Related Commands Syntax Arguments Examples CALibrate STATUS Group Related Commands Syntax Returns Examples 2 42 Runs an internal self calibration NOTE The self calibration can take three and a half minutes or more to run You cannot execute any other commands until calibration is complete Calibration and Diagnostic CAL CALibrate INTERNal INTERNal specifies an internal self calibration CALIBRATE INTERNAL performs an internal self calibration Query Only The CALibrate STATUS query returns the status from the last adjustment sequence
199. the scope automatically acquire the input signal 7 Send the command MEASUrement IMMed SOURCE CH1 to select measure ments on channel 1 8 Send the command MEASUrement IMMed TYPe FREQuency to set up the frequency measurement 9 Send the query MEASUrement IMMed VALue to request the measurement result The oscilloscope will respond with a result similar to 1 0E3 which is a frequency measurement of the PROBE COMP signal This completes the tutorial TDS 340A TDS 360 amp TDS 380 Programmer Manual 1 15 Getting Started 1 16 TDS 340A TDS 360 amp TDS 380 Programmer Manual es Command Syntax You can control the oscilloscope through the GPIB or RS 232 interface using a large group of commands and queries This section describes the syntax these commands and queries use and the conventions the oscilloscope uses to process them The commands and queries themselves are listed in the Commands section You transmit commands to the oscilloscope using the enhanced American Standard Code for Information Interchange ASCII character encoding Appendix A contains a chart of the ASCII character set This manual uses the Backus Naur Form BNF notation shown in Table 2 1 to describe commands and queries Table 2 1 BNF symbols and meanings Symbol Meaning lt gt Defined element HEEL Is defined as Exclusive OR Group one elementis required Optional can be omitted a e wu e
200. the time that it takes for the leading edge of a pulse to rise from a low reference value to a high reference value RMS is the true Root Mean Square value MEASUREMENT IMMED TYPE FREQUENCY defines the immediate measurement to be a frequency measurement MEASUrement IMMed UNIts Query Only Group Related Commands Syntax Returns Examples Returns the units for the immediate measurement Measurement MEASUrement IMMed TYPe MEASUrement IMMed UNIts lt QString gt returns V for volts VV for volts squared dB for decibels s for seconds Hz for Hertz or for percent MEASUREMENT IMMED UNITS might return s indicating that the units for the immediate measurement are seconds TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 115 Command Descriptions MEASUrement IMMed VALue Query Only Group Syntax Returns Executes the immediate measurement specified by the MEASUre ment IMMed TYPe command The measurement is taken on the source specified by the MEASUrement IMMed SOUrce command Measurement MEASUrement IMMed VALue lt NR3 gt MEASUrement MEAS lt x gt Query Only Group Syntax Examples 2 116 Returns all measurement parameters for the displayed measurement specified by x where x is 1 through 4 Measurement MEASUrement MEAS x MEASUREMENT MEAS3 might return MEASUREMENT MEAS3 STATE 0 TYPE PERIOD UNITS s SOURCEl CH1 TDS 340A
201. tory CWD File system FILESystem CWD directory path FILESystem CWD directory path is a quoted string that defines the directory name and path FILESYSTEM CWD fd0 MYDIR will set fd0 MYDIR as the current directory FILESYSTEM CWD might return fd0 MYDIR if that is the current directory TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 87 Command Descriptions FILESystem DELEte No query form Group Syntax Arguments Examples FILESystem DELWarn Group Syntax Arguments Examples 2 88 Deletes a named file File system FILESystem DELEte lt file path gt lt file path gt is a quoted string that defines the file name and path Input the file path using the form lt drive gt lt dir gt lt filename gt lt drive gt and one or more lt dir gt s are optional If you do not specify them the oscilloscope will delete the file in the current directory filename stands for a filename of up to 8 6699 characters and can be followed by a period and a 3 character extension You can also use the inclusive filename to delete all files FILESYSTEM DELETE NOT MINE SET deletes the file named NOT MINE SET on the default drive and directory FILESYSTEM DELETE deletes all the files in the default directory on the default drive Turns on or off the front panel file delete warning No warning is returned from the GPIB or RS 232 interface File system FILE
202. ts the second character as a null command Constructed Mnemonics Cursor Position Mnemonic 2 6 Measurement Specifier Mnemonics Some header mnemonics specify one of a range of mnemonics For example a channel mnemonic can be either CH1 or CH2 You use these mnemonics in the command just as you do any other mnemonic For example there is a CH1 VOLts command and there is also a CH2 VOLts command In the command descriptions this list of choices is abbreviated CH lt x gt When the oscilloscope displays cursors commands may specify which cursor of the pair to use Symbol Meaning POSITION lt x gt A cursor selector x is either 1 or 2 Commands can specify which measurement to set or query as a mnemonic in the header The oscilloscope can display up to four automated measurements with each displayed waveform The displayed measurements are specified in this way Symbol Meaning MEAS lt x gt A measurement specifier x is either 1 2 3 0r 4 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Channel Mnemonics Math Waveform Mnemonics Reference Waveform Mnemonics Waveform Mnemonics Commands specify the channel to use as a mnemonic in the header Symbol Meaning CH lt x gt A channel specifier lt x gt is either 1 or 2 Commands can specify the mathematical waveform to use as a mnemonic in the header Symbol MATH lt x gt Meaning A math waveform specifier lt x gt is 1
203. ty is equal to the overall intensity TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Descriptions DiSplay PERSistence Sets the length of time that dots or vectors are displayed when DISplay STYle is set to ACCUMDOTS or ACCUMVECTORS Group Display Related Commands DISplay STYle Syntax DISplay PERSistence lt NR3 gt DISplay PERSistence Arguments lt NR3 gt specifies the length in seconds that the waveform points are displayed on the screen The range is 100 ms to 10 s 0 specifies infinite persistence Examples DISPLAY PERSISTENCE 3 specifies that the waveform points are displayed on the screen for 3 seconds before they fade TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 79 Command Descriptions DiSplay STYle 2 80 Group Related Commands Syntax Arguments Examples Selects how the data is displayed This command is equivalent to setting Style in the Display menu Display DISplay PERSistence DISplay STYle DOTs ACCUMDots ACCUMVectors VECtors DISplay STYle DOTs displays individual data points ACCUMDots accumulates data points on the display until the PERSistence time is met VECtors connects adjacent data points Old points are immediately replaced by new ones ACCUMVectors accumulates data points with a line vector waveform until the PERSistence time is met DISPLAY STYLE VEC sets the display to connect adjacent data points DISPLAY STYLE
204. uire a waveform when the signal passes through a voltage level of your choosing Video triggering adds the capability of triggering on NTSC or PAL standard video fields and lines TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax Vertical Commands Table 2 17 Trigger commands Header TRIGger TRIGger MAIn Description Set query trigger event Set main trigger level to 50 TRIGger MAIn EDGE TRIGger MAIn EDGE COUP ing TRIGger MAIn EDGE SLOpe TRIGger MAIn EDGE SOUrce Return edge trigger parameters Set edge trigger coupling Set edge trigger slope Set edge trigger source TRIGger MAIn HOLDof f Return trigger holdoff value TRIGger MAIn HOLdoff VALue TRIGger MAIn LEVel TRIGger MAIn MODe Set query trigger holdoff value Set query trigger level Set query trigger mode TRIGger MAIn TYPe TRIGger MAIn VIDeo FIELD TRIGger MAIn VIDeo HOLdoff TRIGger MAIn VIDeo HOLdoff VALue Set main trigger edge or video Set video trigger field Return video trigger holdoff value Set video trigger holdoff value TRIGger MAIn VIDeo SCAN Set video trigger scan rate TRIGger MAIn VIDeo SOUrce TRIGger STATE Set video trigger source Return trigger system status Vertical commands control the display of channels and of math and reference waveforms The SELect lt wfm gt command also selects the waveform to be used by many commands in other command groups Table 2 1
205. ulations This command is equivalent to setting the levels in the Reference Levels side menu Group Measurement Syntax X MEASUrement REFLevel METHod ABSolute PERCent MEASUrement REFLevel METHod Arguments ABSolute specifies that the reference levels are set explicitly using the MEA SUrement REFLevel ABSolute commands This method is useful when precise values are required PERCent specifies that the reference levels are calculated as a percent relative to HIGH and LOW The percentages are defined using the MEASUrement REFLe vel PERCent commands Examples MEASUREMENT REFLEVEL METHOD ABSolute specifies that explicit user defined values are used for the reference levels MEASUREMENT REFLEVEL METHOD returns either ABSolute or PERCENT indicating the reference levels used TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 123 Command Descriptions MEASUrement REFLevel PERCent HIGH Group Syntax Arguments Examples Sets or queries the percent relative to HIGH that is used to calculate the high reference level when MEASUrement REFLevel METHod is set to PERCent This command is equivalent to setting the Reference Levels in the Measure menu Measurement MEASUrement REFLevel PERCent HIGH lt NR3 gt MEASUrement REFLevel PERCent HIGH lt NR3 gt ranges from 0 to 100 and is the high reference level The default is 90 MEASUREMENT REFLEVEL PERCENT HIGH 95 specifies that the high
206. uld be concatenated into a single command TRIGger MODe NORMal ACQuire NUMAVg 8 TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax 2 If concatenated commands have headers that differ by only the last mnemon ic you can abbreviate the second command and eliminate the beginning colon For example the commands ACQuire MODe ENVelope and AC Quire NUMAVg 4 could be concatenated into a single command ACQuire MODe ENVelope NUMAVg 4 The longer version works equally well ACQuire MODe ENVelope ACQuire NUMAVg 4 3 Never precede a star command with a colon ACQuire MODe ENVelope TRG The oscilloscope processes commands that follow as if the star command was not there The following example is valid ACQuire MODe ENVelope TRG NUMAVg 2 4 When you concatenate queries the oscilloscope concatenates responses to all the queries into a single response message For example if the display intensity for text is bright and for the waveform it is dim the concate nated query DISplay INTENsity TEXt WAVEform will return either DISPLAY INTENSITY TEXT BRI DISPLAY INTENSI TY WAVEFORM DIM if header is on or BRI DIM if header is off 5 You may concatenate set commands and queries in the same message For example ACQuire MODe NORMal NUMAVg STATE is a valid message that sets the acquisition mode to normal then queries the oscilloscope for the number of acquisitions for averaging and the curren
207. uments GPIB PCII IIA GPIB board and drivers Remember to identify the GPIB device as DEV1 This identifier is defined using the IBCONF EXE program 3 Copy the files from the examples diskette to your hard disk You might also create a special directory to store them For example if the current drive is hard disk C you want to store the examples in drive C and the examples diskette is in drive B type mkdir examples cd examples copy B gpib quick c 4 For this installation you also want to copy DECL H and MCIB OBJ from your Tektronix S3FG210 National Instruments GPIB PCIUI IIA GPIB drivers directory to this directory For example if the GPIB drivers are in the gpib pc directory and you are in the example programs directory type copy gpib pc decl h copy gpib pc mcib obj 5 To compile and link your TDS sample C programs simply type nmake file name mak where file name gt refers to the name of the example program you wish to compile and link Specifically To compile and link MEAS C type nmake meas mak To compile and link COMM C type nmake comm mak To compile and link GETWFM C type nmake getwfm mak To compile and link TL C type nmake t1 mak 6 Run the program by typing the program name To run meas type meas To run comm type comm To run getwfm type getwfm To run tl type t1 TDS 340A TDS 360 amp TDS 380 Programmer Manual 4 3 Programming Examples 44 Compiling and Link
208. urrent position of channel 1 is at 1 3 divisions CH lt x gt PRObe Query Only Group Syntax Returns Examples Returns the attenuation factor of the probe that is attached to the specified channel Vertical CH lt x gt PRObe lt NR3 gt CH2 PROBE might return 1 0E1 for a 10x probe TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 47 Command Syntax CH lt x gt SCAle 2 48 Group Related Commands Syntax Arguments Examples Sets or queries the vertical gain of the specified channel This is equivalent to setting Fine Scale in the Vertical menu or adjusting the front panel Vertical SCALE knob Vertical CH1 VOLts CH lt x gt SCAle lt NR3 gt CH lt x gt SCAle lt NR3 gt is the gain in volts per division The range is 10 V div to 2 mV div when using a 1x probe CH1 SCALE 1 0E 1 sets the channel 1 gain to 100 mV div CH2 SCALE might return 1 0E0 indicating that the current V div setting of channel 2 is 1 V div TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CH x VOLts Sets or queries the vertical gain of the specified channel This command is identical to the CH lt x gt SCAle command and is included for compatibility purposes Only CH lt x gt SCAle is returned in response to a CH lt x gt query Group Vertical Related Commands CHI SCAle Syntax CH lt x gt VOLts NR3 CH lt x gt VOLts Examples CH1 VOLTS 1 0E 1 sets the c
209. x CURSor VBArs POSITION x Group Related Commands Syntax Arguments Examples 2 58 Positions a vertical bar cursor for both vertical bar and paired cursors The units are specified by the CURSor VBArs UNIts command Cursor CURSor VBArs UNIts CURSor VBArs POSITION x lt NR3 gt CURSor VBArs POSITION lt x gt lt NR3 gt specifies the cursor position in the units specified by the CUR Sor VBArs UNIts command The position is relative to the trigger position CURSOR VBARS POSITION2 9 0E 6 positions one of the vertical bar cursors at 9 us CURSOR VBARS POSITION1 might return 1 0E 6 indicating a vertical bar cursors is at 1 us TDS 340A TDS 360 amp TDS 380 Programmer Manual Command Syntax CURSor VBArs SELect Group Syntax Arguments Examples CURSor VBArs UNIts Group Related Commands Syntax Examples Selects which vertical bar cursor is active The active cursor is displayed as a solid vertical line and is moved using the front panel General Purpose Knob The unselected cursor is displayed as a dashed vertical line This command is equivalent to pressing the SELECT button on the front panel Cursor CURSor VBArs SELect CURSOR1 CURSOR2 CURSor VBArs SELect CURSORI specifies the first vertical bar cursor CURSOR specifies the second vertical bar cursor CURSOR VBARS SELECT CURSOR2 selects the second vertical bar cursor as the active cursor CURSOR V
210. x C Interface Specifications This appendix describes the oscilloscope GPIB remote interface The informa tion is useful when connecting to GPIB controllers of unusual configuration GPIB Function Subsets The oscilloscope supports many GPIB function subsets as described in the list below Some of the listings describe subsets that the oscilloscope does not support SH1 Source Handshake The oscilloscope can transmit multiline messages across the GPIB AH1 Acceptor Handshake The oscilloscope can receive multiline messages across the GPIB T5 Talker The oscilloscope becomes a talker when the controller sends its talk address with the ATN Attention line asserted It can send both response data and status information when responding to a serial poll It ceases to be a talker when the controller sends another device s talk address with ATN asserted The oscilloscope has talk only capability for hard copy operation L4 Listener The oscilloscope becomes a listener when the controller sends its listen address with the ATN Attention line asserted The oscilloscope does not have listen only capability SRI Service Request The oscilloscope asserts the SRQ Service Request line to notify the controller when it requires service RL1 Remote Local The oscilloscope responds to both the GTL Go To Local and LLO Local Lock Out interface messages PPO Parallel Poll The oscilloscope has no parallel poll capability It do
211. y executed before using this command or an execution error will be generated Group Miscellaneous Related Commands Syntax Arguments Examples PASSWord PUD NEWpass lt QString gt lt QString gt is the new password The password can include up to 10 characters NEWPASS mypassword creates a new password for accessing the user protected data TDS 340A TDS 360 amp TDS 380 Programmer Manual 2 125 Command Descriptions OPC Generates the operation complete message in the Standard Event Status Register SESR when all pending operations finish The OPC query places the ASCII character 1 into the output queue when all pending operations are finished The OPC response is not available to read until all pending operations finish For a complete discussion of the use of these registers and the output queue see page 3 1 Table 2 25 lists commands that generate an operation complete message Group Status and Error Related Commands BUSY WAI Syntax X OPC OPC The OPC command allows you to synchronize the operation of the oscilloscope with your application program Synchronization methods are described starting on page 3 7 Table 2 25 Commands that generate an Operation Complete message Automatic scope adjustment AUTOSetEXECute Internal self calibration CAL Single sequence acquisition ACQuire STATE ON or ACQuire STATE RUN when AC Quire STO PAfter is set to SE Quence Hardcopy output

Download Pdf Manuals

image

Related Search

Related Contents

Singer 580  Manual de Instalaçã Linux Educacional Manual de Instalação do  EPSON E-800 準備ガイド  Snapper RT2151 User's Manual  Ubiquiti Networks NanoBridge M2  取扱説明書  Clique e veja o Manual de Instruções    Un manuel d`instructions    

Copyright © All rights reserved.
Failed to retrieve file