Text preview for : 70857104TDS320 Prigram Manual.pdf part of Tektronix TDS320 TDS320 Programming Manual



Back to : 70857104TDS320 Prigram Ma | Home

Programmer Manual

TDS 310, TDS 320 & TDS 350 Two Channel Oscilloscopes 070-8571-04

Use this manual for TDS 310, TDS 320, and TDS 350 oscilloscopes with firmware versions 2.04 and above. Fifth Edition: December 1994

Copyright E Tektronix, Inc. 1993, 1994. 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. QuickC is a trademark of Microsoft, Inc.

WARRANTY
Tektronix warrants that this product will be free from defects in materials and workmanship for a period of three (3) years from the date of shipment. If any such 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 within 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; or c) 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 WITH RESPECT TO THIS PRODUCT IN LIEU OF ANY OTHER WARRANTIES, EXPRESSED 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 SUCH DAMAGES.

Table of Contents
Safety Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii ix

Getting Started
Manual Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing The Option 14 Module . . . . . . . . . . . . . . . . . . . . . . . . . . Choosing an Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Up Remote Communications . . . . . . . . . . . . . . . . . . . . . . 1 1 1 1 1 3 3 4

Syntax and Commands
Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command and Query Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . Clearing the Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constructed Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Argument Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Syntax Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Acquisition Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alias Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Calibration and Diagnostic Commands . . . . . . . . . . . . . . . . . . . . Cursor Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Display Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hard Copy Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Horizontal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Measurement Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Save and Recall Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Status and Error Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trigger Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vertical Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Waveform Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 21 24 24 26 27 2 10 2 11 2 2 2 2 2 2 2 2 2 2 2 2 2 2 11 11 12 12 13 14 14 15 17 18 19 19 20 22

2 27

TDS 310, TDS 320 & TDS 350 Programmer Manual

i

Table of Contents

Status & Events
Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Handling Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synchronization Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 35 36 37 3 13

Programming Examples
GPIB Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RS 232 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 45

Appendices
Appendix A: Character Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix B: Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix C: Interface Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . GPIB Function Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interface Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix D: Factory Initialization Settings . . . . . . . . . . . . . . . . . . . . . A1 A3 A5 A5 A6 A7

Glossary and Index
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G1 I1

ii

Contents

List of Figures
Figure 1 1: The Command Syntax Section Describes Common Message Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 1 2: The Commands Section Lists and Explains Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 1 3: GPIB Service Requests (SRQs) Provide for Event (Interrupt) Driven Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 1 4: The Disks That Accompany This Manual . . . . . . . . . . . . . . Figure 1 5: GPIB, RS 232, and Centronics Connector Locations . . . Figure 1 6: How to Stack GPIB Connectors . . . . . . . . . . . . . . . . . . . . . Figure 1 7: Typical GPIB Network Configurations . . . . . . . . . . . . . . . . . Figure 1 8: Selecting the I/O System in the Main Menu . . . . . . . . . . . . Figure 1 9: Selecting the GPIB Address in the GPIB Configuration Side Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 1 10: Pin Assignments of the RS 232 Connector . . . . . . . . . . . Figure 1 11: RS 232 Parameter Settings . . . . . . . . . . . . . . . . . . . . . . . . Figure 1 12: RS 232 Hardcopy Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2 1: Command Message Elements . . . . . . . . . . . . . . . . . . . . . . . Figure 2 2: Block Argument Example . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2 3: Typical Syntax Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3 1: The Standard Event Status Register (SESR) . . . . . . . . . . . Figure 3 2: The Status Byte Register (SBR) . . . . . . . . . . . . . . . . . . . . . . Figure 3 3: The Device Event Status Enable Register (DESER) . . . . . Figure 3 4: The Event Status Enable Register (ESER) . . . . . . . . . . . . . Figure 3 5: The Service Request Enable Register (SRER) . . . . . . . . . Figure 3 6: Status and Event Handling Process . . . . . . . . . . . . . . . . . . Figure 3 7: Command Processing Without Using Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3 8: Processing Sequence With Synchronization . . . . . . . . . . Figure 4 1: Equipment Needed to Run the GPIB and RS 232 Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 12 1 1 1 1 1 1 2 3 4 5 6 6

17 18 1 10 1 11 22 29 2 10 3 3 3 3 3 3 1 2 3 4 4 6

37 38 41

TDS 310, TDS 320 & TDS 350 Programmer Manual

iii

List of Figures

iv

Contents

List of Tables
Table 1 1: GPIB and RS 232 Comparison . . . . . . . . . . . . . . . . . . . . . . . Table 1 2: RS 232 Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 1 3: RS 232 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 1: BNF Symbols and Meanings . . . . . . . . . . . . . . . . . . . . . . . . Table 2 2: Command Message Elements . . . . . . . . . . . . . . . . . . . . . . . Table 2 3: Comparison of Header Off and On Responses . . . . . . . . . Table 2 4: Acquisition Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 5: Alias Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 6: Calibration and Diagnostic Commands . . . . . . . . . . . . . . . Table 2 7: Cursor Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 8: Display Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 9: Hard Copy Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 10: Horizontal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 11: Measurement Commands . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 12: Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 13: Save and Recall Commands . . . . . . . . . . . . . . . . . . . . . . . . Table 2 14: Status and Error Commands . . . . . . . . . . . . . . . . . . . . . . . Table 2 15: Trigger Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 16: Vertical Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 17: Waveform Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 18: Commands that Affect BUSY? Response . . . . . . . . . . . . . Table 2 19: Offset Ranges (All Channels) . . . . . . . . . . . . . . . . . . . . . . . . Table 2 20: DATa and WFMPre Parameter Settings . . . . . . . . . . . . . . . Table 2 21: XY Format Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 22: Horizontal Delay Time Resolution . . . . . . . . . . . . . . . . . . . . Table 2 23: Commands that Generate an Operation Complete Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table 2 24: Additional WFMPre Commands . . . . . . . . . . . . . . . . . . . . . Table 3 Table 3 Table 3 Table 3 Table 3 Table 3 Table 3 Table 3 Table 3 1: 2: 3: 4: 5: 6: 7: 8: 9: SESR Bit Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SBR Bit Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 13 19 1 13 21 22 23 2 11 2 11 2 12 2 12 2 13 2 14 2 14 2 16 2 17 2 18 2 19 2 20 2 20 2 24 2 41 2 46 2 65 2 76 2 98 2 129 2 173 32 33 3 13 3 13 3 14 3 16 3 17 3 17 3 18

TDS 310, TDS 320 & TDS 350 Programmer Manual

v

List of Tables

Table A Table A Table A Table A

1: 2: 3: 4:

The TDS 300 Series Character Set . . . . . . . . . . . . . . . . . . . . The ASCII & GPIB Code Chart . . . . . . . . . . . . . . . . . . . . . . . Standard Interface Messages . . . . . . . . . . . . . . . . . . . . . . . . Factory Initialization Defaults . . . . . . . . . . . . . . . . . . . . . . . .

A A A A

1 2 6 7

vi

Contents

Safety Summary
Please take a moment to review these safety precautions. They are provided for your protection and to prevent damage to the oscilloscope.

Symbols and Terms

These two terms appear in manuals: H H statements identify conditions or practices that could result in damage to the equipment or other property. statements identify conditions or practices that could result in personal injury or loss of life.

These two terms appear on equipment: H CAUTION indicates a personal injury hazard not immediately accessible as one reads the marking, or a hazard to property including the equip ment itself. DANGER indicates a personal injury hazard immediately accessible as one reads the marking.

H

This symbol appears in manuals:

Static Sensitive Devices

These symbols appear on equipment:

DANGER High Voltage

Protective ground (earth) terminal

ATTENTION Refer to manual

TDS 310, TDS 320 & TDS 350 Programmer Manual

vii

Safety Summary

Specific Precautions

Observe all the following precautions to ensure your personal safety and to prevent damage to either the oscilloscope or equipment connected to it.

Power Source
The oscilloscope operates from a power source that will not apply more than 250 VRMS between the supply conductors or between either supply conductor and ground. A protective ground connection, through the grounding conduc tor in the power cord, is essential for safe system operation.

Grounding the Oscilloscope
The oscilloscope is grounded through the power cord. To avoid electric shock, plug the power cord into a properly wired receptacle with an earth ground connection. Do this before making connections to the input or output termi nals of the oscilloscope. Without the protective ground connection, all parts of the oscilloscope are potential shock hazards. This includes knobs and controls that may appear to be insulators.

Use the Proper Power Cord
Use only the power cord and connector specified for your product. Use only a power cord that is in good condition.

Use the Proper Fuse
To avoid fire hazard, use only a fuse that meets all type, voltage, and current specifications.

Do Not Remove Covers or Panels
To avoid personal injury, do not operate the oscilloscope without the panels or covers.

Do Not Operate in Explosive Atmospheres
The oscilloscope provides no explosion protection from static discharges or arcing components. Do not operate the oscilloscope in an atmosphere of explosive gasses.

Electric Overload
Never apply a voltage to a connector on the oscilloscope that is outside the range specified for that connector.

viii

Safety

Preface
This is the Programmer Manual for the TDS 310, TDS 320, and TDS 350 Two Channel 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. H H H TDS 310, TDS 320 & TDS 350 Instruction Manual TDS 310, TDS 320 & TDS 350 Reference The XYZs of Analog and Digital Oscilloscopes

TDS 310, TDS 320 & TDS 350 Programmer Manual

ix

Preface

x

Preface

Getting Started

Getting Started
This section covers the following topics. H H H H Manual Structure describes the major sections in this manual. Installing the Option 14 Module describes how to install the communica tions interface. Choosing an Interface describes the advantages and disadvantages of GPIB and RS 232 interfaces. Setting Up Remote Communications describes setting up for remote control including connecting the oscilloscope and setting the appropriate front panel controls.

Manual Structure

This manual includes the following sections.

Syntax and Commands
The Syntax and Commands section (Section 2) describes the structure of the messages your program sends to the oscilloscope. Figure 1 1 shows a syntax diagram and command parts as described in this section.
Header Comma

Command Parts

SAVe:WAVEform CH1,REF2
Mnemonics Syntax Diagram SAVe : WAVEform REF Space Arguments

Figure 1 1: The Command Syntax Section Describes Common Message Elements The Syntax and Commands section also describes each command used in the oscilloscope. It explains the syntax of each command and provides examples of how you might use it. The section arranges commands alpha betically and also provides a list by functional area (Figure 1 2).

TDS 310, TDS 320 & TDS 350 Programmer Manual

11

Getting Started

Zoom

Application Menu Commands A A A A A A A Alias Commands A A A A A A A Acquisition Commands ACQuire:MODe ACQuire:NUMACq? ACQuire:NUMAVg ACQuire:NUMEnv ACQuire:REPEt ACQuire:STATE ACQuire:STOPAfter

Zoom

ACQuire:NUMACq? (Query Only) S G E ACQuire:MODe S G E ACQuire? (Query Only) Syntax: . . . Group: . . . Examples: . . .

Commands Grouped in 17 Functional Areas

and

Commands Listed Alphabetically

Figure 1 2: The Commands Section Lists and Explains Commands

Status and Events
The Status and Events section (Section 4) starting on page 3 1 describes how to use GPIB service requests (SRQs) and various event messages in your programs. The program requests information from the oscilloscope. The oscilloscope provides information in the form of status and error messages. Figure 1 3 illustrates the basic operation of this system.
Your program requests status and event reports.

Rear Panel Oscilloscope sends status and event reports.

Controller

Figure 1 3: GPIB Service Requests (SRQs) Provide for Event (Interrupt) Driven Programs

Examples
The Programming Examples section starting on page 4 1 describes example oscilloscope control programs and how to compile them. The disks that come with this manual (Figure 1 4) have an executable and a source code version of each program.

12

Getting Started

Getting Started

Example Programs
Example Programs

Figure 1 4: The Disks That Accompany This Manual

Installing The Option 14 Module

If you received your Option 14 Communications Interface in a separate ship ment, you must install it before remote communications is possible. Use the procedure in your TDS 300 Series TD3F14A I/O Interfaces Upgrade Kit to install your Option 14 module.

Choosing an Interface

Your system hardware may let you choose which interface to use with your system; if so, you should consider the comparative advantages and disad vantages of each interface. For example, the GPIB interface is an eight bit parallel bus and, therefore, it offers high speed data transfers and multiple instrument control. In contrast, the RS 232 interface is a slower serial data bus for single instrument control, but it is easy to connect to and can be used with a low cost controller. Table 1 1 compares the GPIB and RS 232 interface. Table 1 1: GPIB and RS 232 Comparison Operating Attribute Cable Data flow control Data format Interface control Interface messages Interrupts reported Message termination (Receive) GPIB IEEE 488 Std. Hardware, 3 wire hand shake 8 bit parallel Operator low level con trol message Most IEEE 488 Std. Service requests status and event code Hardware EOI, software LF, or both RS 232 9 wire Flagging: soft (XON/ XOFF), hard (RTS/CTS) 8 bit serial None Device clear via break signal None. Must be polled for status. Software CR, LF, or CRLF, or LFCR

TDS 310, TDS 320 & TDS 350 Programmer Manual

13

Getting Started

Table 1 1: GPIB and RS 232 Comparison (Cont.) Operating Attribute Message termination (Transmit) Timing Transmission path length Speed System environment GPIB Hardware EOI, and soft ware LF Asynchronous v2 meters between de vices; v20 meters total cabling for GPIB system 200 kBytes/sec Multiple devices (v15) RS 232 Software CR, LF, CRLF, or LFCR Asynchronous 15 meters

19,200 bits/sec Single terminal (point to point connection)

Setting Up Remote Communications

The oscilloscope has GPIB, RS 232, and Centronics connectors on its rear panel, as shown in Figure 1 5. These connectors have D type shells. The GPIB connector conforms to IEEE Std. 488.1-1987. The RS 232 connector conforms to ANSI/EIA/TIA Standard 574-1990.

Connecting to a GPIB Device
Attach an IEEE Std. 488.1-1987 GPIB cable to the GPIB connector.

Centronics Connector RS 232 Connector

GPIB Connector

Figure 1 5: GPIB, RS 232, and Centronics Connector Locations If needed, you can stack GPIB connectors as shown in Figure 1 6.

GPIB Requirements

Observe these rules when you use your oscillo scope with a GPIB network:

14

Getting Started

Getting Started

H H H H H H

Assign each device on the bus a unique device address; no two devices can share the same device address. Do not connect more than 15 devices to any one bus. Connect one device for every 6 feet (2 meters) of cable used. Do not use more than 65 feet (20 meters) of cable to connect devices to a bus. At least two thirds of the devices on the network must be turned on while the network is operating. Connect the devices on the network in a star or linear configuration as shown in Figure 1 7. Do not use loop or parallel configurations.

Appendix C: Interface Specifications, gives additional information on the GPIB configuration of the oscilloscope.

Figure 1 6: How to Stack GPIB Connectors

TDS 310, TDS 320 & TDS 350 Programmer Manual

15

Getting Started

GPIB Device

GPIB Device

GPIB Device

GPIB Device

GPIB Device

GPIB Device

GPIB Device

Figure 1 7: Typical GPIB Network Configurations

Setting the GPIB Parameters

You need to set the GPIB parameters of the oscilloscope to match the configuration of the bus. Once you have set these parameters, you can control the oscilloscope through the GPIB inter face. 1. Press the UTILITY button to display the Utility menu. 2. Press the System button in the main menu until it highlights the I/O selection in the pop up menu.

Figure 1 8: Selecting the I/O System in the Main Menu 3. Press the Hcp Port button in the main menu; then, if you want hardco pies to be sent by way of the GPIB port, press GPIB in the side menu. 4. Press the GPIB button in the main menu to display the GPIB configura tion side menu.

16

Getting Started

Getting Started

5. Press the Talk/Listen Address side menu button, and set the GPIB address using the general purpose knob. The oscilloscope is set up for bidirectional communication with your control ler or computer. If you wish to isolate the oscilloscope from the bus: press the Off Bus side menu button. If you wish to enter a special mode of operation to communicate directly with non 488.2 hard copy devices press the Hardcopy side menu button. The oscilloscope sends hard copy information only when you press the HARD COPY button.

Figure 1 9: Selecting the GPIB Address in the GPIB Configuration Side Menu

Connecting to an RS 232 Device
The RS 232 interface provides a point to point connection between two items of equipment such as a computer or terminal and the oscilloscope. This section tells how to connect and set up the oscilloscope for communication over the RS 232 interface.

RS 232 Interface

defines two types of devices: Data Terminal Equip ment (DTE) and Data Communications Equipment (DCE).

TDS 310, TDS 320 & TDS 350 Programmer Manual

17

Getting Started

NOTE
Some DTE devices may have female connectors. Also, the RS 232 ports of personal computers may be configured as DCE or DTE devices, with either a 25 pin or a 9 pin connector. Refer to the documentation that accompanies your computer or terminal to determine if it is a DTE or a DCE device. The oscilloscope is a DTE device. A 9 pin D type shell RS 232 connector is located on the rear panel. In standard usage, a male connector appears on DTE devices, and a female connector appears on DCE devices. A straight through female to male cable of less than 50 feet is typically used for local DTE to DCE connection. Figure 1 10 on page 1 8 shows the oscilloscope 9 pin connector with its pin number assignments. When connecting the oscilloscope to another RS 232 device consider these suggestions: H H H H Many devices require a constant high signal on one or more input pins Do not connect the output line of one DTE device to the output line of the other. Ensure that the signal ground of the oscilloscope is connected to the signal ground of the external device Ensure that the chassis ground of the oscilloscope is connected to the chassis ground of the external device 9 PIN D SHELL
1 2 3 4 5 6 7 8 9 No Connection Receive Data (RxD) (input) Transmit Data (TxD) Signal Ground (GND) Data Set Ready (DSR) Request to Send (RTS) Clear to Send (CTS) No Connection (input) (output) (input) (output)

Data Terminal Ready (DTR) (output)

Figure 1 10: Pin Assignments of the RS 232 Connector 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.

18

Getting Started

Getting Started

Table 1 2: RS 232 Cables Tektronix Part Number 012-1379-00 012-1380-00 012-1298-00 012-1241-00 Cable Type 9 pin female to 9 pin female, null modem Use PC/AT or laptop

9 pin female to 25 pin Old style PC with 25 pin connector female, null modem 9 pin female to 25 pin Serial printers, such as an HP male, null modem Deskjet and Sun workstations 9 pin female to 25 pin Telephone modem male, modem

following steps:

Setting RS 232 Parameters

To set the RS 232 parameters, do the

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. Then press the RS 232 main menu button to display the RS 232C side menu (see Figure 1 11). You may set the following parameters: H H Baud Rate sets the data transmission rate. You can set rates of 300, 600, 1200, 2400, 4800, 9600, or 19200 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 flag ging 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. Use hard flagging for binary data transfers. Set RS 232 Parameters to Default Values sets default values for RS 232 parameters (for a list of default settings see page 2 139). EOL sets the end of line terminator sent by the oscilloscope. You can set CR, LF, CRLF, or LFCR (for more information on line termina tors see page 2 142). Parity adds an error check bit (ninth 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.

H

H H

H

H

TDS 310, TDS 320 & TDS 350 Programmer Manual

19

Getting Started

H

Delay sets the delay time before responding to a query. You can set times from 0 to 60 seconds.

3. 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 De fault Values, if the default settings are appropriate. 4. Press the Hcp Port main menu button to display the Hard Copy Port side menu. Then, if you want hardcopies to be sent via the RS 232 port, press the RS 232C side menu button to select the RS 232 port as a remote interface port (see Figure 1 12). After these parameters are set, the RS 232 interface is ready to operate.

Figure 1 11: RS 232 Parameter Settings

1 10

Getting Started

Getting Started

Figure 1 12: RS 232 Hardcopy Menu

RS 232 Conventions
You should be aware of the processing conventions that are specific to the RS 232 interface. These conventions pertain to: H H H H H Transferring binary data Processing break signals RS 232 I/O errors Service Requests Hardcopies to the oscilloscope via the RS 232

port, note the following: H

When Transferring Binary Data

Do not use binary data transfers with soft flagging unless you can ensure that the data does not contain XON or XOFF characters. Using RTS/CTS (hard) flagging guarantees correct data transfer. All eight bits of binary data contain meaningful information. To ensure that all eight bits are received or transmitted, an RS 232 device which is connected to the oscilloscope must be configured to receive and transmit eight bit characters (set the RS 232 word length to eight bits).

H

TDS 310, TDS 320 & TDS 350 Programmer Manual

1 11

Getting Started

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 behaves as if a GPIB command was received (input and output buffers are flushed, and the oscilloscope waits for a new command). BREAK signals do not change oscilloscope settings or stored data and do not inter rupt front panel operation or nonprogrammable functions. If a BREAK is sent in the middle of a character stream, a couple of characters immediately preceding or following the BREAK may be lost. The controller should wait until the DCL and end of line terminator string is received before sending more characters. are reported when there is a problem with parity, framing, or input/output buffer overruns. To report errors, the oscilloscope posts an event code (see 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 is included in the UTILITY Diag Error Log. You can use the RS232 Line Snapshot entry of the error log to help establish an RS 232 connection. The snapshot reports if the oscilloscope is waiting to receive a control Q (yes/no), the state of the hardware CTS line (high/low), and if characters have been received (yes/no). If Waiting For ^Q is Yes, the oscilloscope must receive an XON character before it will transmit any more data. If CTS is Low and hard flagging is enabled, the oscilloscope will not transmit any data. If hard flagging is not enabled, you should ignore the value of CTS since the oscilloscope ignores it. If Chars Rcvd is Yes, the oscillo scope 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.

RS 232 I/O Errors

Service Requests are part of the GPIB interface. There is no counterpart for RS 232. However, 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. Hardcopies
The Centronics, GPIB, and RS 232 ports are always active. However, only one port at a time can be used for hardcopies. The hardcopy port is selected in the UTILITY I/O menu.

RS 232 Troubleshooting
If the oscilloscope and the personal computer or printer have trouble commu nicating, use the following steps to correct the problem: 1. Verify that you are using the correct RS 232 cable and that it 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 person al computer is using the correct port. Verify that the cable is wired correct ly. Try your program or printer again.

1 12

Getting Started

Getting Started

2. Verify that the settings on both pages of the UTILITY I/O RS 232C menu match the settings used by your printer or the program on your personal computer. Start by pressing Set RS 232 Parameters to Default Values in the RS 232C menu. Then, change only those menu items that you know need to be changed, like perhaps the baud rate. You should not need to change the settings on the second page of the menu because they are standard on most printers and personal computers. Try your printer or computer program again. 3. If you are trying to generate a hardcopy using the RS 232 port, verify that the UTILITY I/O Hcp Port is set to RS 232C. 4. If you are trying to control the oscilloscope using a personal computer or other computer, look at the UTILITY Diag Error Log and examine the RS232 Line Snapshot and the RS232 Errors. Use Table 1 3 to trouble shoot your setup. 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. Table 1 3: RS 232 Troubleshooting Symptom Your personal computer pro gram tried to send characters to the oscilloscope, but the oscillo scope error log displays Chars Rcvd: No The oscilloscope shows a non zero number of Framing errors. Possible Cause Your RS 232 cable may be wired as a modem instead of a null modem. If you are attempting to use a telephone modem, the cable may be wired as a null modem instead of a modem.

There is a baud rate mismatch between the oscilloscope and the personal computer. There is an incorrect number of bits sent by the personal comput er (the oscilloscope expects 8 data bits). The personal computer may be sending a parity bit when the oscilloscope is expecting no parity. There is a parity mismatch between the oscilloscope and the personal com puter. Flagging is not being used by the oscilloscope or the personal computer, or they are using different types of flagging. Ideally, hard flagging should be used unless you are using a telephone modem. Flagging is not being used by the oscilloscope or the personal computer, or they are using different types of flagging. Also, the end of line terminator may not match what the personal computer program expects. The oscilloscope is using soft flagging, 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 agree that soft flagging is being used. Also, verify that both the personal computer and the oscilloscope are not sending binary data. Binary data may contain ^S char acters which cause transmissions to stop.

The oscilloscope shows a non zero number of Parity errors. The oscilloscope shows a non zero number of Overrun errors. Transmissions are incomplete, or the oscilloscope does not process all commands from the personal computer. The oscilloscope error log dis plays Waiting for ^Q: Yes.

Soft flagging is being used, and transmissions stop.

TDS 310, TDS 320 & TDS 350 Programmer Manual

1 13

Getting Started

Table 1 3: RS 232 Troubleshooting (Cont.) Symptom The oscilloscope error log dis plays CTS: Low, and the oscillo scope is using hard flagging. After the personal computer pro gram sends a BREAK, the first message fails. Possible Cause 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. Verify that the personal computer program is waiting for and reading the DCL and end of line terminator response sent by the oscilloscope.

1 14

Getting Started

Syntax and Commands

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 on page A 1 contains a chart of the ASCII character set. This manual uses Backus Naur Form (BNF) notation and syntax diagrams to describe commands and queries. This manual uses the following BNF symbols. Table 2 1: BNF Symbols and Meanings Symbol < > ::= | { } [ ] . . . ( ) Meaning Defined element Is defined as Exclusive OR Group; one element is required Optional; can be omitted 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 oscillo scope 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 ACQuire:MODe has a query form ACQuire:MODe?. Not all commands have both a set and a query form; some commands are set only and some are query only.

TDS 310, TDS 320 & TDS 350 Programmer Manual

21

Command Syntax

A command message is a command or query name, followed by any in formation the oscilloscope needs to execute the command or query. Com mand 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
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 (*). A header sub function. Some command headers have only one mnemonic. If a command header has multiple mnemonics, they are always sepa rated from each other by a colon (:) character. A quantity, quality, restriction, or limit associated with the header. Not all commands have an argu ment, while other commands have multiple argu ments. Arguments are separated from the header by a . Arguments are separated from each other by a . A single comma between arguments of multiple ar gument commands. It may optionally have white space characters before and after the comma. A white space character between command header and argument. It may optionally consist of multiple white space characters.









Header

Comma

SAVe:WAVEform CH1,REF2

Mnemonics

Space

Arguments

SAVe

:

WAVEform







REF



Figure 2 1: Command Message Elements

22

Syntax and Commands

Command Syntax

Commands
Commands cause the oscilloscope to perform a specific function or change one of its settings. Commands have the structure: H [:]
[[]...]

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 the base of the command tree.

Queries
Queries cause the oscilloscope to return information about its status or settings. Queries have the structure: H H [:]
? [:]
?[[]...]

You can specify a query command at any level within the command tree unless otherwise noted. These branch queries return information about all the mnemonics below the specified branch or level. For example, DISplay:INTENSITy:CONtrast? 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 Responses
You can control whether the oscilloscope returns headers as part of the query 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 oscillo scope 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 CURSor:VBArs: DELTa? ACQuire: NUMAVg? Header Off Response Header On Response 1.064E­03 16 :CURSor:VBArs:DELTa 1.064E­03 :ACQUIRE:NUMAVG 16

TDS 310, TDS 320 & TDS 350 Programmer Manual

23

Command Syntax

Clearing the Oscilloscope

To clear the Output Queue and reset the oscilloscope to accept a new com mand or query, use the Device Clear (DCL) GPIB command or the RS 232 BREAK signal.

Command Entry

Follow these general rules when entering commands. H H You can enter commands in upper or lower case. You can precede any command with white space characters. White space characters include any combination of the ASCII control characters 00 through 09 and 0B through 20 hexadecimal (0 through 9 and 11 through 32 decimal). The oscilloscope ignores commands consisting of any combination of white space characters and line feeds.

H

Abbreviating Commands
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.

Concatenating Commands
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 would be concatenated into a single command: TRIGger:MODe NORMal;:ACQuire:NUMAVg 8 2. If concatenated commands have headers that differ by only the last mnemonic, you can abbreviate the second command and eliminate the beginning colon. For example, the commands ACQuire:MODe ENVelope and ACQuire:NUMAVg 4 could be concatenated into a single command: ACQuire:MODe ENVelope; NUMAVg 4

24

Syntax and Commands

Command Syntax

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 com mand was not there so this is legal: ACQuire:MODe ENVelope;*TRG;NUMAVg 2 4. When you concatenate queries, the oscilloscope concatenates re sponses 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 concatenated query DISplay:INTENsity:TEXt?;WAVEform? will return either :DISPLAY:INTENSITY:TEXT BRI;:DISPLAY:INTENSITY: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 number of acquisitions for averaging, and the acquisition state. The oscilloscope executes concatenated commands and queries in the order it receives them. Here are some invalid concatenations: H H DISPlay:INTENsity:TEXt BRI;ACQuire:NUMAVg 16 (no colon before ACQuire) DISPlay:INTENsity:TEXt DIM;:WAVEform BRI (extra colon before WAVEform - could also use DISPlay:INTENsity: WAVEform instead) DISPlay:INTENsity:TEXt DIM;:*TRG (extra colon before a star (*) command)

H

Message Terminators
This manual uses (End of message) to represent a message termina tor.

GPIB End of Message Terminators may 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.

TDS 310, TDS 320 & TDS 350 Programmer Manual

25

Command Syntax

RS 232 End of Message Terminators

may 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 oscilloscope accepts all four combinations as valid input message 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; the oscilloscope interprets the second character as a null com mand.

Constructed Mnemonics

Cursor Position Mnemonics
When the oscilloscope displays cursors, commands may specify which cursor of the pair to use. Symbol POSITION Meaning A cursor selector; is either 1 or 2.

Measurement Specifier Mnemonics
Commands can specify which measurement to set or query as a mnemonic in the header. The oscilloscope can display up to four automated measure ments with each displayed waveform. The displayed measurements are specified in this way: Symbol MEAS Meaning A measurement specifier; is either 1, 2, 3, or 4.

Channel Mnemonics
Commands specify the channel to use as a mnemonic in the header. Symbol CH Meaning A channel specifier; is either 1 or 2.

Math Waveform Mnemonics
Commands can specify the mathematical waveform to use as a mnemonic in the header. Symbol MATH Meaning A math waveform specifier; is 1.

26

Syntax and Commands

Command Syntax

Reference Waveform Mnemonics
Commands can specify the reference waveform to use as a mnemonic in the header. Symbol REF Meaning A reference waveform specifier; is either 1 or 2.

Waveform Mnemonics
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 Can be CH, MATH, MATH1, or REF

Argument Types

The argument of a command may be in one of several forms. The individual descriptions of each command tell which argument types to use with that command.

Numeric Arguments
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 Signed integer value Floating point value without 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.

Quoted String Arguments
Some commands accept or return data in the form of a quoted string, which is simply a group of ASCII characters enclosed by a single quote (') or double quote ("). For example: "this is a quoted string"

TDS 310, TDS 320 & TDS 350 Programmer Manual

27

Command Syntax

Symbol

Meaning Quoted string of ASCII text

Follow these rules when you use quoted strings: H H A quoted string can include any character defined in the 7 bit ASCII character set. (See Appendix A on page A 1). Use the same type of quote character to open and close the string: "this is a valid string" H You can mix quotation marks within a string as long as you follow the previous rule: "this is an 'acceptable' string" H You can include a quote character within a string simply by repeating the quote. For example, "here is a "" mark" H H H H Strings can have upper or lower case characters. You cannot terminate a quoted string with the END message before the closing delimiter. 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. 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" (termination character is embedded in the string)

28

Syntax and Commands

Command Syntax

Block Arguments
Several oscilloscope commands use a block argument form: Symbol Meaning A non zero digit character, in the range 1-9 A digit character, in the range 0-9 A character with the hex equivalent of 00 through FF hexadecimal (0 through 255 decimal) A block of data bytes, defined as: ::= { #[...][...] | #0[...] } specifies the number of elements that follow. Taken together, the elements form a decimal integer that specifies how many elements follow. #0 means that the is an indefinite length block. The ends the block. You should not use indefinite length blocks with RS 232, because there is no way to include a character as a character. The first occurrence of a character signals the end of the block and any subsequent characters will be interpreted as a syntax error. With the GPIB, the EOI line signals the last byte.
Block Argument

ALIas:DEFINE "SETUp1",#231AUTOSet EXECute;:SELect:REF1 ON
Block Header Specifies Data Length Specifies Number of Length Digits that Follow

Figure 2 2: Block Argument Example

TDS 310, TDS 320 & TDS 350 Programmer Manual

29

Command Syntax

Syntax Diagrams

The syntax diagrams in this manual use the following symbols and notation: H Circles and ovals contain literal elements. You must send most elements exactly as shown. The diagrams show command mnemonics in both upper and lower case to distinguish between complete and abbreviated spellings. These elements are not case sensitive and you can omit the lower case portion of the mnemonic. Boxes contain the defined elements described earlier in this section, such as or . Elements are connected by arrows that show the allowed paths through the diagram, and thus the orders in which you can send the elements. Parallel paths show that you must take one and only one of the paths. A path around a group of elements shows that those elements are optional. Loops show elements that you can repeat.

H H

Figure 2 3 shows the structure of a few typical syntax diagrams.

Figure 2 3: Typical Syntax Diagrams

2 10

Syntax and Commands

Command Groups
This section lists commands by functional groups. The following section, Command Descriptions, lists commands alphabetically. The alphabetical list starts on page 2 27. The oscilloscope GPIB and RS232 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 control mode, averaging, enveloping, and single waveform acquisition. Table 2 4: Acquisition Commands Header ACQuire? ACQuire:MODe ACQuire:NUMACq? ACQuire:NUMAVg ACQuire:NUMEnv ACQuire:STATE ACQuire:STOPAfter Description Return acquisition parameters Acquisition mode Return # of acquisitions obtained Number of acquisitions for average Number of acquisitions for envelope Start or stop acquisition system Acquisition control

Alias Commands

Alias commands let you define your own commands as a sequence of stan dard 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 ALIas:CATalog? ALIas:DEFINE ALIas:DELEte Description Turn the alias state on and off Return a list of aliases Create a new alias Remove an alias

TDS 310, TDS 320 & TDS 350 Programmer Manual

2 11

Command Groups

Table 2 5: Alias Commands (Cont.) Header ALIas:DELEte:ALL ALIas:DELEte:NAMe ALIas:STATE Description Remove all aliases Remove a named alias Turn the alias state on and off

Calibration and Diagnostic Commands

Calibration and Diagnostic commands let you initiate the self calibration and diagnostic routines that are built into the oscilloscope. The diagnostic test operation includes selecting the test sequence, executing the sequence then examining the results. Table 2 6: Calibration and Diagnostic Commands Header *CAL? DIAg:RESULT:FLAG? DIAg:RESULT:LOG? DIAg:SELect:ALL Description Perform an internal self calibration Return diagnostic tests status Return diagnostic test sequence re sults Diagnostic test sequence for Acquisition, Processor, Display, and Front panel Control of diagnostic tests

DIAg:STATE

Cursor Commands

Cursor commands provide control over cursor display and readout. Table 2 7: Cursor Commands Header CURSor? CURSor:FUNCtion CURSor:HBArs? CURSor:HBArs:DELTa? CURSor:HBArs:POSITION CURSor:HBArs:SELect Description Returns cursor settings Cursors on or off; select cursor type Return H bar settings Return distance between H bars Position a horizontal cursor Set which cursor the knob controls

2 12

Syntax and Commands

Command Groups

Table 2 7: Cursor Commands (Cont.) Header CURSor:PAIred:HDELTA? CURSor:PAIred:HPOS1? CURSor:PAIred:HPOS2? CURSor:PAIred:POSITION1? CURSor:PAIred:POSITION2? CURSor:PAIred:SELect? CURSor:PAIred:VDELTA? CURSor:VBArs CURSor:VBArs:DELTa? CURSor:VBArs:POSITION CURSor:VBArs:SELect CURSor:VBArs:UNIts Description Query horizontal distance between first and second paired cursors Query horizontal position of first paired cursor Query horizontal position of second paired cursor Set vbar position of first paired cursor Set vbar position of the second paired cursor Select active paired cursor Query vertical distance between first and second paired cursors Position vertical bar cursors Horizontal distance between cursors Position a vertical cursor Set which cursor the knob controls Set vertical cursors to period or frequency

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 DISplay? DISplay:FORMat DISplay:GRAticule DISplay:INTENSITy? DISplay:INTENSITy:CONTRast DISplay:INTENSITy:OVERALL Description Clear menus from display Returns display settings YT or XY display Graticule style Returns intensity settings Waveform intensified zone brightness Main brightness

TDS 310, TDS 320 & TDS 350 Programmer Manual

2 13

Command Groups

Table 2 8: Display Commands (Cont.) Header DISplay:INTENSITy:TEXt DISplay:INTENSITy:WAVEform DISplay:STYle DISplay:TRIGT Description Text brightness Waveform brightness Waveform dots, vectors, dot accu mulate or vector accumulate Controls the display of the trigger indicator on screen

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 9: Hard Copy Commands Header HARDCopy HARDCopy:CLEARSpool HARDCopy:FORMat HARDCopy:LAYout HARDCopy:PORT Description Start or terminate hard copy Empty hard copy spooler Hard copy output format Hard copy orientation Hard copy port for output

Horizontal Commands

Horizontal commands control the time bases of the oscilloscope. You can set the time per division (or time per point) of both the main and delay time bases. You can also set the record lengths. Table 2 10: Horizontal Commands Header HORizontal? HORizontal:DELay? HORizontal:DELay:MODe HORizontal:DELay:SCAle HORizontal:DELay:SECdiv HORizontal:DELay:TIMe HORizontal:DELay:TIMe? Description Return horizontal settings Return delay time base settings Delay time base mode Delay time base time/division Same as HORizontal:DELay:SCAle Delay time Return delay time parameters

2 14

Syntax and Commands

Command Groups

Table 2 10: Horizontal Commands (Cont.) Header HORizontal:DELay:TIMe: RUNSAfter HORizontal:MAIn? HORizontal:MAIn:SCAle HORizontal:MAIn:SECdiv HORizontal:MODe HORizontal:POSition HORizontal:RECOrdlength? HORizontal:REF HORizontal:SCAle HORizontal:SECdiv HORizontal:TRIGger? HORizontal:TRIGger:POSition Description Time to wait in delay runs after main mode Returns time/division of main time base Main time base time/division Same as HORizontal:MAIn:SCAle Turn delay time base on or off Portion of waveform to display Return number of points in waveform record Position lock for REF waveforms Same as HORizontal:MAIn:SCAle Same as HORizontal:MAIn:SCAle Return trigger position 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 oscillo scope. In the commands, these four measurement readouts are named MEAS, where 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 measurement has no front panel equivalent, and the oscilloscope never displays immediate measurements. Because they are computed only when they are needed, immediate measurements slow the waveform update rate less than displayed measurements. Whether you are using displayed or immediate measurements, you use the VALue? query to obtain measurement results. 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.

TDS 310, TDS 320 & TDS 350 Programmer Manual

2 15

Command Groups

Table 2 11: Measurement Commands Header MEASUrement? MEASUrement:GATING MEASUrement:IMMed? MEASUrement:IMMed:SOUrce[1] MEASUrement:IMMed:TYPe MEASUrement:IMMed:UNIts? MEASUrement:IMMed:VALue? MEASUrement:MEAS? MEASUrement:MEAS: SOUrce[1] MEASUrement:MEAS:STATE MEASUrement:MEAS:TYPe MEASUrement:MEAS:UNIts? MEASUrement:MEAS:VALue? MEASUrement:METHod 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 MEASUrement:REFLevel: PERCent:MID Description Returns all measurement parameters Set or query measurement gating Return immediate measurement pa rameters Channel to take measurement from The measurement to be taken Return measurement units Return measurement result Return parameters on measurement Channel to take measurement from Turn measurement display on or off The measurement to be taken Units to use for measurement Measurement result query Method for calculating reference levels Returns reference levels The top level for risetime (90% level) The low level for risetime (10% level) Mid level for measurements Method to assign HIGH and LOW levels: either % or absolute volts The top level for risetime (90% level) The low level for risetime (10% level) Mid level for measurements

2 16

Syntax and Commands

Command Groups

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 12: Miscellaneous Commands Header AUTOSet *DDT FACtory HDR HEADer *IDN? *LRN? LOCk NEWpass PASSWord REM *RST RS232? RS232:BAUd RS232:CONTrol:RTS RS232:DCD RS232:HARDFlagging RS232:MODE RS232:PACE RS232:PARity RS232:PRESet RS232:SBITS Description Automatic oscilloscope setup Define group execute trigger (GET) Reset to factory default Same as HEADer Return command header with query Identification Learn device setting Lock front panel (local lockout) Change password for User Protected Data Access to change User Protected Data No action; remark only Return most settings to factory default Query RS232 parameters Set or query baud rate Set or query hard flagging Turns off DCD monitoring Set or query hard flagging Query always returns RAW Set or query soft flagging Set or query parity type Set default RS 232 parameters Set or query number of stop bits

TDS 310, TDS 320 & TDS 350 Programmer Manual

2 17

Command Groups

Table 2 12: Miscellaneous Commands (Cont.) Header RS232:SOFTFlagging RS232:STOPBits RS232:TRANsmit:DELay RS232:TRANsmit:TERMinator SET? TEKSecure *TRG *TST? UNLock VERBose Description Set or query soft flagging Set or query number of stop bits Set or query delay before query response Set or query end of line terminator Same as *LRN? Initialize waveforms and setups Perform Group Execute Trigger (GET) Self test Unlock front panel (local lockout) Return full command name or minimum spellings with query

Save and Recall Commands

Save and Recall commands allow you to store and retrieve internal wave forms and settings. When you save a setting," you save all the settings of the oscilloscope. When you then recall a setting," the oscilloscope restores itself to the state it was in when you originally saved that setting. Table 2 13: Save and Recall Commands Header *RCL RECAll:SETUp *SAV SAVe:SETUp SAVe:WAVEform Description Recall setting Recall saved oscilloscope setting Save setting Save oscilloscope setting Save waveform

2 18

Syntax and Commands

Command Groups

Status and Error Commands

Table 2 14 lists the status and error commands the oscilloscope supports. These commands let you determine the status of the oscilloscope, and control events. 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 14: Status and Error Commands Header ALLEv? BUSY? *CLS DESE *ESE *ESR? EVENT? EVMsg? EVQty? ID? *OPC *PSC *PUD *SRE *STB? *WAI Description Return all events Return scope status Clear status Device event status enable Event status enable Return standard event status register Return event code Return event code and message Return number of events in queue Identification Operation complete Power on status clear Query or set User Protected Data Service request enable Read status byte Wait to continue

Trigger Commands

Trigger commands control all aspects of oscilloscope triggering. You can set the main trigger to one of two modes: edge and video. Edge triggering is the most common mode. Edge triggering lets you display a waveform at or near the point where 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 310, TDS 320 & TDS 350 Programmer Manual

2 19

Command Groups

Table 2 15: Trigger Commands Header TRIGger TRIGger:MAIn TRIGger:MAIn:EDGE? TRIGger:MAIn:EDGE:COUPling TRIGger:MAIn:EDGE:SLOpe TRIGger:MAIn:EDGE:SOUrce TRIGger:MAIn:HOLDoff? TRIGger:MAIn:HOLdoff:VALue TRIGger:MAIn:LEVel TRIGger:MAIn:MODe TRIGger:MAIn:TYPe TRIGger:MAIn:VIDeo:FIELD TRIGger:MAIn:VIDeo:HOLdoff? TRIGger:MAIn:VIDeo: HOLdoff:VALue TRIGger:MAIn:VIDeo:SCAN TRIGger:MAIn:VIDeo:SOUrce TRIGger:STATE? Description Force trigger event; return parameters Main trigger level to 50% Return main edge trigger parameters Main trigger coupling Main trigger slope Main trigger source Main trigger holdoff value Main trigger holdoff value Main trigger le