Tektronix DG2020A Programmer Manual

Programmer Manual
DG2020A Data Generator
071-0054-50
www.tektronix.com
Copyright © T ektronix, Inc. All rights reserved. T ektronix 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. T ektronix, Inc., P.O. Box 500, Beaverton, OR 97077 TEKTRONIX and TEK are registered trademarks of T ektronix, Inc.

Table of Contents

Getting Started
Command Syntax
Preface v. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Choosing an Interface 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing for GPIB Communication 1-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing for RS-232-C Communication 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Syntax 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Notation 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program and Response Messages 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command and Query Structure 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Character Encoding 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Syntactic Delimiters 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
White Space 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Characters 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arguments 2-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Header 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Concatenating Commands 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Query Responses 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other General Command Conventions 2-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Groups 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Summaries 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Command Descriptions 2-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving Response Messages 2-113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Status and Event Reporting
Status and Event Reporting 3-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Registers 3-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Queues 3-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing Sequence 3-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Messages 3-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Examples
Programming Examples 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of the Sample Programs 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Required Execution Environment 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floppy Disk Files 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing and Compiling the Programs 4-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Program Functions and Usage 4-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DG2020A Programmer Manual
i
Table of Contents
Appendices
Glossary & Index
Appendix A: Character Charts A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix B: Reserved Words B–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix C: Interface Specification C–1. . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix D: Factory Initialization Settings D–1. . . . . . . . . . . . . . . . . . . . .
Glossary Glossary–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index Index–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
DG2020A Programmer Manual

List of Figures

Table of Contents
Figure 1-1: Functional layers in gpib system 1-1. . . . . . . . . . . . . . . . . . . .
Figure 1-2: GPIB connector 1-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 1-3: GPIB system configurations 1-4. . . . . . . . . . . . . . . . . . . . . . . .
Figure 1-4: GPIB parameter settings 1-5. . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 1-5: RS-232-C point-to-point connection 1-6. . . . . . . . . . . . . . . . .
Figure 1-6: RS-232-C port 1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 1-7: Pin assignments of 9-pin and
25-pin D-type shell connector 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 1-8: Typical RS-232-C cable wiring requirements 1-8. . . . . . . . . .
Figure 1-9: RS-232-C parameter settings 1-9. . . . . . . . . . . . . . . . . . . . . . .
Figure 2-1: Command and query structure flowchart 2-2. . . . . . . . . . . .
Figure 2-2: ABSTouch arguments and associated controls 2-20. . . . . . . . .
Figure 2-3: GPIB: Retrieving response messages 2-113. . . . . . . . . . . . . . . . .
Figure 2-4: RS-232-C: Retrieving response messages 2-113. . . . . . . . . . . . .
Figure 3-1: Standard event status (SESR) 3-2. . . . . . . . . . . . . . . . . . . . . .
Figure 3-2: Status byte register (SBR) 3-3. . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 3-3: Device event status enable register (DESER) 3-4. . . . . . . . . .
Figure 3-4: event status enable register (ESER) 3-4. . . . . . . . . . . . . . . . . .
Figure 3-5: Service request enable register (SRER) 3-5. . . . . . . . . . . . . . .
Figure 3-6: Status and event handling process overview 3-7. . . . . . . . . . .
DG2020A Programmer Manual
iii
Table of Contents

List of Tables

Table 1-1: GPIB and RS-232-C comparison 1-2. . . . . . . . . . . . . . . . . . . .
Table 2-1: BNF symbols and meanings 2-1. . . . . . . . . . . . . . . . . . . . . . . .
Table 2-2: Decimal numeric notation 2-4. . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-3: Header in query responses 2-9. . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-4: DATA commands 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-5: DIAGNOSTIC commands 2-12. . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-6: DISPLAY commands 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-7: HARDCOPY commands 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-8: MEMORY commands 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-9: MODE commands 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-10: OUTPUT commands 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-11: SOURCE commands 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 2-12: STATUS & EVENT commands 2-16. . . . . . . . . . . . . . . . . . . .
Table 2-13: SYNCHRONIZATION commands 2-17. . . . . . . . . . . . . . . . . .
Table 2-14: SYSTEM commands 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-1: SESR bit functions 3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-2: SBR bit functions 3-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-3: Definition of event codes 3-9. . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-4: Normal condition 3-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-5: Command errors (CME bit:5) 3-10. . . . . . . . . . . . . . . . . . . . . .
Table 3-6: Execution errors (EXE bit:4) 3-12. . . . . . . . . . . . . . . . . . . . . . .
Table 3-7: Internal device errors (DDE bit:3) 3-14. . . . . . . . . . . . . . . . . . .
Table 3-8: System event and query errors 3-14. . . . . . . . . . . . . . . . . . . . . .
Table 3-9: Warnings (EXE bit:4) 3-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 3-10: Device-dependent command execution errors 3-15. . . . . . . . .
Table 3-11: Extended device specific errors 3-17. . . . . . . . . . . . . . . . . . . . .
Table A–1: DG2020A character set A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table A–2: ASCII & GPIB code chart A–2. . . . . . . . . . . . . . . . . . . . . . . . . .
Table C–1: GPIB interface function implementation C–1. . . . . . . . . . . . .
Table C–2: GPIB interface messages C–2. . . . . . . . . . . . . . . . . . . . . . . . . .
Table D–1: Factory initialized settings D–1. . . . . . . . . . . . . . . . . . . . . . . . .
iv
DG2020A Programmer Manual

Preface

This is the Programmer Manual for the DG2020A Data Generator and Pods. This manual provides information on operating these instruments using General Purpose Interface Bus (GPIB) interface and RS-232-C interface.
This manual provides the following information:
H Getting Started describes how to connect and set up for remote operation. H Syntax and Commands defines the command syntax and processing
conventions and describes each command in the data generator command
set. H Status and Events explains the status information and event messages
reported by the data generator.
H Appendices contains various topics of use to the programmer. H Glossary and Index contains a glossary of common terms and an index to
this manual.

Related Manuals

Other documentation for the data generator includes: H The User Manual that describes the operation of the Data Generator that was
supplied as a standard accessory with the instrument. H The Service Manual (optional accessory) provides information for maintain-
ing and servicing the Data Generator.
DG2020A Programmer Manual
v
Preface
vi
DG2020A Programmer Manual

Getting Started

Overview

The Data Generator has two interfaces for remote operation — the GPIB interface and the RS-232-C interface. All menu controlled and front-panel controlled functions, except the ON/STBY function, the edit function, and the GPIB and RS-232-C parameter setup functions, can be controlled through the GPIB or the RS-232-C interface using the programming command set (see Section 2).
The GPIB interface conforms to ANSI/IEEE Std 488.1-1987, which specifies the hardware interface, its basic functional protocol, and a set of interface messages (codes) that control the interface functions. This instrument also conforms to ANSI/IEEE Std 488.2-1987 which specifies Codes, Formats, Protocols, and Common Commands to support the system application. The functional layers of the GPIB system are shown in Figure 1-1.
BUS
DeviceĆspecific Messages
Common Commands and Queries
Syntax and Data Structures
Remote INTFC Messages
D
CBA ABCD
System Component x System Component y
Specified
by
Device
IEEE 488.2
Standard
A: Interface Function Layer B: Message Communication Function Layer C: Common System Function Layer D: Device Function Layer
IEEE 488.1
Standard
Figure 1Ć1: Functional layers in gpib system
IEEE 488.2
Standard
Specified
by
Device
DG2020A Programmer Manual
1Ć1
Getting Started

Choosing an Interface

The RS-232-C interface, which was established by the Electronic Industries Association (EIA), provides a common basis of communication between devices that exchange data. This interface has long been used on terminals, modems, printers, and other devices. The RS-232-C interface that the data generator provides also uses most of the same Codes, Formats, Protocols, and Common Commands as are used with the GPIB interface (ANSI/IEEE Std 488.2-1987).
Your system hardware may let you choose which interface to use with your system; if so, you should consider the comparative advantages and disadvantages 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-C 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-C interface.
Table 1Ć1: GPIB and RSĆ232ĆC comparison
Operating attribute GPIB RSĆ232ĆC
Cable ANSI/IEEE Std 488 9Ćwire (DCE)
Data flow control Hardware, 3Ćwire handshake Flagging: soft (XON/XOFF),
hard (DTR/CTS)
Data format 8Ćbit parallel 8Ćbit serial
Interface control Operator lowĆlevel control
message
Interface messages Most ANSI/IEEE Std 488 Device clear via ASCII break
Interrupts reported Service requests
status and event code
Message termination (Receive)
Message termination (Transmit)
Timing Asynchronous Asynchronous
Transmission path length 2 meters between devices;
Speed 200 Kbytes/sec 19,200 bits/sec
Hardware EOI, software LF, or both
Hardware EOI, and softwareLFSoftware LF
20 meters total cabling for GPIB system
None
signal
Status and event code (no service requests)
Software CR, LF, or CR and LF
15 meters
1Ć2
System environment Multiple devices (15) Single terminal (point to point
connection)
DG2020A Programmer Manual

Installing for GPIB Communication

With the power off, connect a GPIB cable from the GPIB controller to the ANSI/IEEE Std 488 port (GPIB) connector on the rear panel of the data generator (see Figure 1-2). For example, when using an MS-DOS compatible controller, connect the GPIB cable between the National Instrument PC2A GPIB board and the data generator GPIB connector.
GPIB Connector
Getting Started
POD C
POD B
POD A
IEEE STD 488 PORT
RS-232-C
CALIBRATION
CLOCK IN
CLOCK OUT
Figure 1Ć2: GPIB connector
Instruments can be connected to the GPIB in linear or star configurations or in a combination of both configurations. A linear hookup is one where a GPIB cable is used to string one device to a second, and then another GPIB cable is used to string from a second to a third, and so on until all devices in the system are connected. A star setup is one where one end of all the GPIB cables in the system are attached to one device. Refer to Figure 1-3 for these GPIB system configurations.
DG2020A Programmer Manual
1Ć3
Getting Started
C
Star Configuration
B D
A
Restrictions
F
A
D
B C D E F
E
A
C
E
Linear Configuration
Combination of Star and Linear Configurations
F
G H
B
Figure 1Ć3: GPIB system configurations
Consider the following rules when distributing instruments on the GPIB:
1Ć4
1. No more than 15 total devices (including the controller) can be included on a
signal bus.
2. In order to maintain the electrical characteristics of the bus, one device load
must be connected for every two meters of cable (most often, each device represents one device load to the bus).
3. The total cable length (cumulative) must not exceed 20 meters.
4. At least two-thirds of the device loads must be powered on.
DG2020A Programmer Manual
Getting Started
Setting the GPIB
Parameters
To set the GPIB parameters, proceed as follows:
1. Press the UTILITY button in the MENU column to the right of the screen.
The UTILITY menu appears above the bottom menu buttons.
2. Press the System bottom menu button to display the System menu (See
figure 1-4).
3. Select the Configure item from the GPIB menu using the up and down arrow
buttons. Set the GPIB operating mode using the left and right arrow buttons.
H Talk/Listen. Sets the communications mode to talk/listen.
H Talk Only. Sets the communications mode to talk only, which is used for
hardcopy output.
H Off Bus. Logically disconnect the data generator from GPIB system.
NOTE. The data generator accepts as a terminator either the software LF (Line Feed), sent as the last data byte, or the hardware EOI, with the EOI line asserted concurrently with the last data byte sent.
4. Select the Address item from the GPIB menu using the up and down arrow
buttons. Then use the rotary knob to set the primary address to a value in the
range 0 to 30.
GPIB Menu
5. Select the Remote Port item using the up and down arrow buttons, and
additionally, highlight ”GPIB” using the left and right arrow buttons. This
selects the GPIB as the remote interface.
Figure 1Ć4: GPIB parameter settings
DG2020A Programmer Manual
1Ć5
Getting Started
Installing for RSĆ232ĆC Communication
Connect an RS-232-C cable from the computer terminal to the RS-232-C connector on the rear panel of the data generator. Use a configuration based on the settings for the data flow control (flagging).
The RS-232-C provides a point-to-point connected communication interface between devices (see Figure 1-5). The data generator can transmit and receive the same message serially over the RS-232-C interface as it can in parallel over the GPIB interface.
Controller
Figure 1Ć5: RSĆ232ĆC pointĆtoĆpoint connection
Several connectors are used with the RS-232-C interface: a DTE device uses a standard 25-pin male D-type shell connector; a DCE device uses a standard 25-pin female D-type shell connector. Some recent computers implement the RS-232-C interface using 9-pin D-type connector.
This data generator uses a standard 9-pin D-type shell connector, provided on the rear panel (see Figure 1-6), along with a 9-pin male to 25-pin male conversion cable. Figure 1-7 on page 1-8 shows both 9-pin and 25 pin connectors with their pin number assignments.
DG2020A
1Ć6
DG2020A Programmer Manual
IEEE STD 488 PORT
Getting Started
POD C
POD B
POD A
RS-232-C
CLOCK IN
CLOCK OUT
RSĆ232ĆC
Connector
CALIBRATION
Figure 1Ć6: RSĆ232ĆC port
This data generator is designed as DCE device. You may connect it up to 15 meters (50 feet) from a DTE device using a straight-through male-to-female cable. However, if the other device is instead configured as a DCE device, you will need a special adapter or null-modem cable for local DCE-to-DCE communications. Refer to the wiring examples in the Figure 1-8 for the proper signal connections between devices.
NOTE.
available.
In this data generator, only TxD, RxD, DTR, CTS pins and Signal Ground are
DG2020A Programmer Manual
1Ć7
Getting Started
Pin
9ĆPIN DĆSHELL
1
2
6
7 8
9
NOTE: TxD, RxD, DTR, CTS and Ground lines are only available
in the data generator.
Receive Data (RxD) 3
2
3 Transmit Data (TxD) 2
3
4 Data Terminal Ready (DTR) 20
4
5 Signal Ground 7
5
8 Clear to Send (CTS) 5
25ĆPIN DĆSHELL
14
15
16
17
18
19
20
21
22
23
24
25
1
2
3
4
5
6
7
8
9
10
11
12
13
Figure 1Ć7: Pin assignments of 9Ćpin and 25Ćpin DĆtype shell connector
Pin Pin Pin
2
3
4
5
8
9Ćpin DCE to 9Ćpin DTE 9Ćpin DCE to 9Ćpin DCE
2
3
4
5
8
2
3
4
5
8
2
3
4
5
8
Pin Pin
2
3
4
5
8
9Ćpin DCE to 25Ćpin DTE
NOTE: When using software flow control, the CTSĆDTR lines do not need to be connected.
2
3
5
7
20
Pin Pin
2
3
4
5
8
Figure 1Ć8: Typical RSĆ232ĆC cable wiring requirements
1Ć8
2
3
5
7
20
9Ćpin DCE to 25Ćpin DCE
DG2020A Programmer Manual
Getting Started
Setting the RSĆ232
Parameters
To set the RS-232-C parameters, perform the following steps:
1. Press the UTILITY button in the MENU column to the right of the screen.
The UTILITY menu appears above the bottom menu buttons.
2. Press the System bottom menu button to display the System menu (See
figure 1-9).
3. Select the Baudrate item from the Serial menu using the up and down arrow
buttons. Here select the data transfer rate using the left and right arrow
buttons. The rate can be set to 300, 600, 1200, 2400, 4800, 9600, or 19200
baud.
4. Select the Data Bits item from the Serial menu using the up and down arrow
buttons. Then use the left and right arrow buttons to select the data bit length
for each character. The bit length can be set to either 7 or 8 bits.
5. Select the Parity item from the Serial menu using the up and down arrow
buttons. Then use the left and right arrow buttons to set the error check bit
for each character. The error bit can be set to None, Even, or Odd parity.
6. Select the Stop Bits item from the Serial menu using the up and down arrow
buttons. Then use the left and right arrow buttons to select the number of
stop bits sent after each character. The number of stop bits can be set to
either 1 or 2.
Serial Menu
7. Select the Handshake item from the Serial menu using the up and down
arrow buttons. Then use the left and right arrow buttons to select the method
of controlling the flow of data between devices. The data flow method can
be set to Hard (DTR/CTS), Soft (XON/XOFF), and Off (no flow control).
8. Select the Remote Port item using the up and down arrow buttons, and
additionally, highlight ”RS232C” using the left and right arrow buttons. This
selects the RS-232-C interface as the remote interface.
Figure 1Ć9: RSĆ232ĆC parameter settings
DG2020A Programmer Manual
1Ć9
Getting Started
1Ć10
DG2020A Programmer Manual

Command Syntax

A large set of commands can be used to control the operations and functions of the data generator from an external controller. This section describes the syntax and communication rules for using these commands to operate the data generator.

Command Notation

The command syntax is in extended BNF (Backus-Naur Form) notation. The extended BNF symbols used in the command set are shown in the following table.
Table 2Ć1: BNF symbols and meanings
Symbol Meaning
<ą> Indicates a defined element
| Delimits Exclusive OR elements
{ą} Delimits a group of elements one of which the programmer must select
[ą] Delimits an optional element that the programmer may omit
[ą]... Delimits an optional element that the programmer may omit or may repeat one
::= Indicates that the left member is defined as shown by the the right member

Program and Response Messages

Programs created or placed in an external controller are transferred to the data generator as a program message. A program message is a sequence of zero or more program message units delimited by the program message unit delimiter, the semicolon (;).
A program message unit is a set command or query command. The data generator performs a function or changes a setting or mode when it receives a set command; when it receives a query command, it returns measurement data, settings, status codes and/or status messages. The data generator transfers these response messages to the external controller.
or more times
DG2020A Programmer Manual
2Ć1
Command Syntax

Command and Query Structure

Commands are either set commands or query commands (usually just called commands and queries in this manual). Most commands have both a set form and query form. The query form of a command is the same as the set form, except that the query form ends with a question mark.
Figure 2-1 shows a flowchart of the structure of the commands and queries. The structure of the header is described in detail in Header on page 2-6.
Command
,

Character Encoding

Header
Mnemonic
Argument
,
?
:
:
Header
Mnemonic
Argument
?
,
Argument
,
Argument
Command
Query
Query
Query
Command
Command
Figure 2Ć1: Command and query structure flowchart
The program can be described using the American Standard Code for Informa­tion Interchange (ASCII) character encoding.
2Ć2
This seven-bit ASCII code is used for the majority of syntactic elements and semantic definitions. In special cases, an eight-bit ASCII Code is allowed in the arbitrary block arguments described on page 2-5. The ASCII code character set table is found in Appendix A.
DG2020A Programmer Manual

Syntactic Delimiters

Command Syntax
Syntactic elements in a program message unit are delimited (differentiated) with colons, white space, commas, or semicolons.
Colon (:). Typically delimits the compound command header.
MMEMORY:DELETE:ALL, SOURCE:OSCILLATOR:SOURCE
White Space. Typically delimits command/query headers from the argument.
DIAGNOSTIC:SELECT ALL
SYSTEM:DATE 1995,3,4 DIAGNOSTIC:SELECT and SYSTEM:DATE are the command headers, and ALL and
1995,3,4 are the arguments.
Comma (,). Typically delimits between multiple arguments. In the above example, a comma delimits the multiple arguments 1995, 3 and 4.

White Space

Special Characters

Semicolon (;). Typically delimits between multiple commands (or multiple
program message units). For more information about using the semicolon, refer to Concatenating Commands on page 2-8.
White space, which is used to delimit certain syntactic elements in a command, is defined in the data generator as a single ASCII-encoded byte in the range ASCII 0-32 (decimal). This range consists of the standard ASCII characters exclusively except for ASCII 10, which is the Line Feed (LF) or New Line (NL) character.
The Line Feed (LF) character or the New Line (NL) character (ASCII 10) and all characters in the range of ASCII 127-255 are defined as special characters. These characters are used in arbitrary block arguments only; using these characters in other parts of any command yields unpredictable results.
DG2020A Programmer Manual
2Ć3
Command Syntax

Arguments

In a command or query, one or more arguments follow the command header. The argument, sometimes called program data, is a quantity, quality, restriction, or limit associated with the command or query header. Depending on the command or query header given, the argument is one of the following types:
H Decimal Numeric H String H Arbitrary Block
Decimal Numeric
The data generator defines a decimal numeric argument as one expressed in one of three numeric representations — NR1, NR2, or NR3. This definition complies with that found in ANSI/IEEE Std 488.2-1987. Any commands that use arguments in any of the the first three notations can use a fourth notation NRf (for Numerical Representation flexible). The four formats are shown in Table 2-2.
Table 2Ć2: Decimal numeric notation
Type Format Examples
NR1 implicitĆpoint (integer) 1, +3, -2, +10, -20
NR2 explicitĆpoint unscaled
(fixed point)
NR3 explicitĆpoint scaled (floating point) 1E+2, +3.36E-2, -1.02E+3
NRf numeric representationĆflexible; any of
NR1, NR2, and NR3 may be used
1, 2, +23.5, -0.15
1, +23.5, -1.02E+3
As just implied, you can use NRf notation for arguments in your programs for any commands that this manual lists as using any of NR1, NR2, or NR3 notation in its arguments. Be aware, however, that query response will still be in the format specified in the command. For example, if the command description is :DESE <NR1>, you can substitute NR2 or NR3 when using the command in a program. However, if you use the query :DESE?, the data generator will respond in the format <NR1> to match the command description in this manual.
2Ć4
Unit and SI Prefix
If the decimal numeric argument refers to a voltage or frequency, you can express it using SI units instead of in the scaled explicit point input value format <NR3>. (SI units are units that conform to the Systeme International d’Unites standard.) For example, you can use the input format 200mV or 1.0MHz instead of 200.0E–3 or 1.0E+6, respectively, to specify voltage or frequency.
DG2020A Programmer Manual
Command Syntax
You can omit the unit, but you must include the SI unit prefix. You can use either upper or lowercase units.
V or v for voltage
Hz, HZ, or hz for frequency The SI prefixes, which must be included, are shown below. Note that either
lower or upper case prefixes can be used.
String
SI prefix
Corresponding Power 10
1
1
Note that the prefix m/M indicates 10-3when the decimal numeric argument denotes voltage, but 10
6
when it denotes frequency.
m/M k/K m/M
-3
10
3
10
6
String, sometimes referred to as a string literal, a literal, or just a string, is defined as a series of characters enclosed by double quotation marks (”) as in:
"This is a string constant"ąąorąą"0 .. 127"
To include a double quoted character in the string, insert an additional double quote character ahead of the double quote character in the string. For example, the string:
serial number "B010000"
would be defined as:
"serial number ""B010000"""
Single quotation marks (’) can also be used instead of double quotation marks. For instance:
Arbitrary Block
DG2020A Programmer Manual
'serial number ''B010000'''
String constants may be of any length up to the memory limits of the instrument in which the message is parsed.
An arbitrary block argument is defined as:
#<byte count digit><byte count>[<contiguous eightĆbit data
byte>]...
or:
#<contiguous eightĆbit data byte]... <terminator>
2Ć5
Command Syntax

Header

where: <byte count digit>::= a nonzero digit in the range ASCII 1–9 that defines the
number of digits (bytes) in the <byte count> field. <byte count>::= any number of digits in the range ASCII 0–9 that define how
many bytes are in the <contiguous 8Ćbit data byte> field. <contiguous 8Ćbit data byte>::= a <byte count> number of 8-bit bytes in
the range ASCII 0–255 that define the message. Each byte defines one character.
<terminator>::= a software LF followed by a hardware EOI. For example,
#16AB4ZLT<LF><&EOI>
Header Mnemonic
Pod and Channel
Representation
Header Structure
The header mnemonic represents a header node or a header subfunction. The command or query header comprises one or more header mnemonics that are delimited with the colon (:).
The pod and channel can be specified by using the OUTPut:POD<s>:CH<n> header mnemonic in commands and query commands. The term <s> is either A, B, or C, and expresses the connected pattern data output connector for the pod being specified. The term <n> is a number between 0 and 11 that expresses the specified channel.
Commands and queries can be structured into six basic forms.
H Simple command header H Simple query header H Compound command header H Compound query header H Common command header H Common query header
2Ć6
Figure 2-1 on page 2-2 shows the syntax for all possible structures, and each of the six basic forms are explained below.
DG2020A Programmer Manual
Command Syntax
Simple Command Header. A command that contains only one header mnemonic. It may also contain one or more arguments. Its message format is:
[:]<Header Mnemonic> [<Argument>[,<Argument>]...]
such as:
START
or
STOP
Simple Query Header. A command that contains only one header mnemonic followed by a question mark (?). Its message format is:
[:]<Header Mnemonic>? [<Argument>[,<Argument>]...]
such as:
HCOPY?
or
TRIGGER?
Compound Command Header. A command that contains multiple header mnemonics plus argument(s). Its message format is:
[:]<Header Mnemonic>[:<Header Mnemonic>]...
[<Argument>[,<Argument>]...]
such as:
MMEMORY:INITIALIZE HD1
or
SYSTEM:SECURITY:STATE ON
Compound Query Header. A command that contains multiple header mnemonics followed by a question mark (?). Its message format is:
[:]<Header Mnemonic>[:<Header Mnemonic>]...?
[<Argument>[,<Argument>]...] such as:
DIAGNOSTIC:RESULT?
or
DATA:BLOCK:SIZE? "BLOCK1"
DG2020A Programmer Manual
2Ć7
Command Syntax
Common Command Header. A command that precedes its header mnemonic with an asterisk (*). Its message format is:
<Header Mnemonic> [<Argument>[,<Argument>]...]
such as:
*RST
The common commands are defined by IEEE Std 488.2 and are common to all devices which support IEEE Std 488.2 on the GPIB bus.
Common Query Header. A command that precedes its header mnemonic with an asterisk (*) and follows it with a question mark (?). Its message format is:
<Header Mnemonic>? [<Argument>[,<Argument>]...]
such as:
*IDN?
The common commands are defined by IEEE Std 488.2 and are common to all devices which support the IEEE Std 488.2 on the GPIB bus.

Concatenating Commands

Most of the compound command headers are in a tree structure. The tree structure of an example command is diagrammed below. Note that the top of the structure always begins with a colon (:).
BLOCK GROUP MSIZE PATTERN SEQUENCE UPDATE
ADD ADDADD DEFINE DEFINE ... DEFINEBIT BITDELETE ... DELETE ...WORD
The following example of a compound command combines three headers delimited by semicolons:
:DATA:
:DATA:BLOCK:ADD 512,"BLOCK3"; :DATA:BLOCK:DELETE "BLOCK2"; :DATA:BLOCK:SIZE "BLOCK1",512
2Ć8
You must include the complete path in each header when there is no common complete path to the start of the tree structure (the colon). However, note that part of each header in the above example has a common path :DATA:BLOCK. You
DG2020A Programmer Manual
Command Syntax
may shorten compound command structures with such headers. For example, the command above may be rewritten as follows.
:DATA:BLOCK:ADD 512,"BLOCK3"; DELETE "BLOCK2"; SIZE
"BLOCK1",512
Note that the mnemonics :DATA and :BLOCK are assumed from the first header by the headers that follow. The following command descriptions are valid examples of commands shortened using the principle just described. (Note that the insertion of common command (*SRE) between headers does not prevent the headers that follow from assuming the earlier header mnemonics.)
:DATA:BLOCK:ADD 512,"BLOCK3"; DELETE "BLOCK2";
:DATA:GROUP:DELETE "GROUP4"
:DATA:MSIZE 16384; BLOCK:ADD 512,"BLOCK3"; DELETE "BLOCK2"
:DATA:BLOCK:ADD 512,"BLOCK3"; *SRE?; DELETE "BLOCK2"; SIZE
"BLOCK1",512
The following examples have been shortened incorrectly and cause errors.

Query Responses

:DATA:BLOCK:DELETE "BLOCK2"; DATA:GROUP:DELETE "GROUP4"
:DATA:BLOCK:ADD 512,"BLOCK3"; GROUP:DELETE "GROUP4"
:DATA:BLOCK:DELETE "BLOCK2"; MSIZE 16384
The query causes the data generator to return information about its status or settings. A few queries also initiate an operation action before returning information; for instance, the *TST? query performs the self test.
If the programmer has enabled headers to be returned with query responses, the data generator formats a query response like the equivalent set-command header followed by its argument(s). When headers are turned off for query responses, only the values are returned. Table 2-3 shows the difference in query responses.
Table 2Ć3: Header in query responses
Query Header on Header off
DATA:MSIZE? :DATA:MSIZE 16384 16384
DIAGNOSTIC:SELECT? :DIAGNOSTIC:SELECT PMEMORY PMEMORY
DG2020A Programmer Manual
2Ć9
Command Syntax
Use the command HEADER ON when you want the header returned along with the information. You can save such a response and send it back as a set-command later. Use HEADER OFF when you want only the information back.

Other General Command Conventions

Upper and Lower Case
Abbreviation
The instrument accepts upper, lower, or mixed case alphabetic messages. The following three commands are recognized as identical.
HEADER ON
or
header on
or
header On
Any header, argument, or reserved word that is sent to the data generator can be abbreviated. The minimum required spelling is shown in upper case throughout the subsection Command Groups beginning on page 2-11. The command
TRIGger:SLOPe POSitive can be rewritten in either of the following forms.
TRIGGER:SLOPE POSITIVE
or
TRIG:SLOP POS
2Ć10
DG2020A Programmer Manual

Command Groups

This subsection describes the organization of the DG2020A Data Generator command as a number of functional groups. (See subsection Command Descriptions on page 2-19 for a complete description of each command in alphabetical order.)
Throughout this section, the parenthesized question symbol (?) follows the command header to indicate that both a command and query form of the command can be used.

Command Summaries

Tables 2-4 through 2-14 describe each command in each of the 11 functional groups.
DATA Commands
The DATA commands are used to define blocks, groups, and sequences, to set up pattern data, and to set which sequence controls become valid when the run mode is set to Enhanced.
Table 2Ć4: DATA commands
Header Description
DATA? Query the settings related to pattern data
DATA:BLOCk:ADD Add a block definition
DATA:BLOCk:DEFine(?) Set the block definitions
DATA:BLOCk:DELete Delete a block definition
DATA:BLOCk:DELete:ALL Delete all block definitions
DATA:BLOCk:REName Change a block name
DATA:BLOCk:SIZe(?) Change the size of a block
DATA:GROUp:ADD Add a group definition
DATA:GROUp:BIT(?) Change a groups bit structure
DATA:GROUp:DEFine(?) Sets the group definitions
DATA:GROUp:DELete Delete a group definition
DATA:GROUp:DELete:ALL Delete all group definitions
DG2020A Programmer Manual
DATA:GROUp:NAME? Query the name of a group
DATA:GROUp:REName Change a group name
DATA:MSIZe(?) Set the pattern data memory size
2Ć11
Command Groups
Table 2Ć4: DATA commands (Cont.)
Header Description
DATA:PATTern:BIT(?) Set individual pattern data bits
DATA:PATTern[:WORD](?) Set pattern data in word units
DATA:SEQuence:ADD Add a sequence step
DATA:SEQuence:DEFine(?) Set the sequence definitions
DATA:SEQuence:DELete Delete a sequence step
DATA:SEQuence:DELete:ALL Delete all sequence definitions
DATA:SEQuence:EVJ(?) Set the event jump on/off state
DATA:SEQuence:EVJTO(?) Set the event jump destination
DATA:SEQuence:LOOP(?) Set the infinite loop on/off state
DATA:SEQuence:REPeat(?) Set the repeat count
DATA:SEQuence:TWAIT(?) Set the trigger wait on/off state
DATA:SUBSequence:ADD Add a subĂsequenceĂstep
DIAGNOSTIC Commands
DATA:SEBSequence:CLEAr DeleteĂall subĂsequence definitions
DATA:SUBSequence:DEFine(?) Set orĂqueryĂthe subĂsequence definitions
DATA:SUBSequence:DELete Delete a sub sequence step DATA:SUBSequence:DELete:ALL Delete a sub sequence definition
DATA:SUBSequence:REPeat(?) Set orĂqueryĂthe repeat countĂofĂaĂsubĂseĆ
quenceĂstepĂ
DATA:UPDate Forcibly update the pattern and other data
The DIAGNOSTIC commands select and execute the self–test routines, which are classified by function.
Table 2Ć5: DIAGNOSTIC commands
Header Description
DIAGnostic? Query all current settings related to self test
DIAGnostic:RESUlt? Query selfĆtest result
DIAGnostic:SELect(?) Select selfĆtest routine
DIAGnostic:STATe Perform self test
2Ć12
*TST? Perform self test
DG2020A Programmer Manual
Loading...
+ 150 hidden pages