Tektronix AFG3102C, AFG3051C, AFG3251C, AFG3252C, AFG3101 Programmer Manual

...
xx
AFG3000 Series
ZZZ
Arbitrary Function Generators
Programmer Manual
*P077074302*
077-0743-02
xx
AFG3000 Series
ZZZ
Arbitrary Function Generators
www.tektronix.com
077-0743-02
Copyright © Tektronix. All rights reserved. Licensed software products are owned by Tektronix or its subsidiaries or suppliers, and are protected by national copyright laws and international treaty provisions.
Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material. Specica tions and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting
Tektronix, Inc. 14150 SW Karl Braun Drive P.O . Bo x 50 Beaverton, OR 97077 USA
For product information, sales, service, and technical support:
In North America, call 1-800-833-9200. World w i
Tektronix
0
de, visit www.tektronix.com to nd contacts in your area.
Warranty
Tektronix warrants that the product will be free from defects in materials and workmanship for a period of three (3) years from the date of original purchase from an authorized Tektronix distributor. If the 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. Batteries a warranty work may be new or reconditioned to like new performance. All replaced parts, modules and products become the property of Tektronix.
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, shipping charges prepaid, and with a copy of customer proof o f purchase. 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 other charges for products returned to any other locations.
re excluded from this warranty. Parts, modules and replacement products used by Tektronix for
center is located. Customer shall be responsible for paying all shipping charges, duties, taxes, and any
This wa inadequate maintenance and care. Tektronix shall not be obligated to furnish service under this warranty a) to repair damage resulting from attempts by personnel other than Tektronix representatives to install, repair or service the product; b) to repair damage resulting from improper use or connection to incompatible equipment; c) to repair any damage or malfunction caused by the use of non-Tektronix supplies; or d) to service a product that has been modied or integrated with other products when the effect of such modication or integration incr
THIS WARRANTY IS GIVEN BY TEKTRONIX WITH RESPECT TO THE PRODUCT IN LIEU OF ANY OTH IMPLIED WARRANTIES OF MER CHA NTABILITY 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 T
[W16 – 15AUG04]
rranty shall not apply to any defect, failure or damage caused by improper use or improper or
eases the time or difculty of servicing the product.
ER WARRANTIES, EXPRESS OR IMPLIED. TEKTRONIX AND ITS VENDORS DISCLAIM ANY
HE VENDOR HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
Table of Contents
Preface .............................................................................................................. iii
Documentation................................................................................................ iii
Getting Started
Getting Started . ... . ... ... ... . ... ... . ... ... ... . ... ... . .. . ... ... . ... ... ... . ... ... . ... ... ... . ... ... . .. . ... ... . ... ... . 1-1
Overview of the Manual ... ................................ .................................. ............... 1-1
Connecting the Interface .................................................................................... 1-2
Using the GPIB Port............................ ................................ ............................. 1-3
Setting the GPIB Address.. . ... ... . ... ... . ... ... . .. . ... . . .. . ... . . .. . ... . . .. . ... . . .. . ... . . .. . ... ... . ... ... . .. 1-4
Using TekVISA .............................................................................................. 1-4
Syntax and Commands
Syntax and Commands........................................................................................... 2-1
Command Syntax................ ................................ .................................. ............... 2-2
Backus-Naur Form Denition . . ... ... . ... ... ... . ... ... . . .. . ... ... . .. . ... ... . .. . ... ... . ... ... ... . ... ... . . .. . 2-2
Command and Query Structure ............................................................................ 2-2
SCPI Commands and Queries .............................................................................. 2-4
IEEE 488.2 Common Commands............................. .................................. ........... 2-9
Command Groups .............................................................................................. 2-11
Command Descriptions ........................................................................................ 2-19
Status and Events
Status and Events ................................................................................................. 3-1
Status Reporting Structure .................................................................................. 3-1
Registers ................... ................................ .................................. ................. 3-3
Queues ...................................................................................................... 3-12
Messages and Codes........................ .................................. ............................. 3-12
Programming Examples
Programming Examples ............................ .................................. ........................... 4-1
Appendices
Appendix A: SCPI Conformance Information . .................................. ............................ A-1
Appendix B: EMEMory detailed description..................................... ............................ B-1
AFG3000 Series Arbitrary Function Generator Programmer Manual i
Table of Contents
ii AFG3000 Series Arbitrary Function Generator Programmer Manual
Preface
This manual provides operating information for the following products:
Table i: Supported products
AFG3011 AFG3021B AFG3011C
AFG3101 AFG3022B AFG3021C
AFG3102 AFG3022C
AFG3251 AFG3051C
AFG3252 AFG3052C
AFG3101C
AFG3102C
AFG3151C
AFG3152C
AFG3251C
AFG3252C
The manual consists of the following sections:
Getting Started covers operating principles of the instrument, which helps you understand how your generator operates.
Documentation
Syntax and Commands denes the command syntax and processing conventions, describes command notation.
Status and Events explains the status information and event messages reported by the instrument.
Programming Examples contains remote interface application programs to help you develop programs for your application.
Appendix A: SCPI Conformance Information contains a list of commands and SCPI information.
The following table lists related documentation available for your instrument. The documentation is available on the Document CD and on the Tektronix Web site (www.tektronix.com/downloads).
AFG3000 Series Arbitrary Function Generator Programmer Manual iii
Preface
Item Purpose Location
Compliance an Safety Instructions
User Manual Unpacking,
Programmer Manual (this document)
Service Manual Self-service and
d
Compliance, s introduction to UI, basic turn on/off
Installation, Tutorials, Operation, and Overviews available in English, German, French, Italian, Portuguese, Spanish, Korean, Russian, Japanese, Simplied Chinese, and Traditional Chinese
Menu structures, user interface, and programming commands
performance test
afety,
Technical Reference
ArbExpress AXW100 Software and use documents
r
Specications and perf verication procedures
Waveform creation
Import from oscilloscope or PC
ormance
waveforms
iv AFG3000 Series Arbitrary Function Generator Programmer Manual
Getting Started
Getting Started
Overview of the Manual
To help you get started with programming the arbitrary function generator, this section includes the following subsections
Overview of the Manual
Summarizes each major section of this manual.
Connecting the Interface
Describes how to physically connect the arbitrary function generator to a controlle
Using the GPIB Port
Describe
Setting the GPIB Address
Describ
Using TekVISA
Descri
The in
r.
s how to use the GPIB port.
es how to set the GPIB parameters from the front panel.
bes how to use the TekVISA communication protocol.
formation contained in each major section of this manual is described below.
Syntax and Commands
Syntax and Commands, describes the structure and content of the messages your program sends to the arbitrary function generator. The following gure shows
mand parts as described in the Command Syntax subsection.
com
gure 1-1: Command parts
Fi
AFG3000 Series Arbitrary Function Generator Programmer Manual 1-1
Getting Star ted
Section 2 also d of how you might use it. The Command Groups subsection provides lists by functional areas. The commands are listed alphabetically in the Command Descriptions section.
Figure 1-2: Functional groupings and an alphabetical list of commands
Status and Even ts
The program may request information from the instrument. The instrument provides information in the form of status and error messages. The following gure illustrates the basic operation of this system. Section 3, Status and Events, describes how to get status or event information from the program and details the event and error messages.
escribes the effect of each command and provides examples
Connecting the Interface
The instrument has a 24-pin GPIB connector on its rear panel, as shown in the following gure. This connector has a D-type shell and conforms to IEEE Std
488.1-1987. Attach an IEEE Std 488.1-1987 GPIB cable (Tektronix part number 012-0991-00) to this connector.
1-2 AFG3000 Series Arbitrary Function Generator Programmer Manual
Getting Started
Using the GPIB Port
Figure 1-3:
The arbitrary function generator has Talk/Listen functions through which it can communicate with other devices, as well as the external controller, located on the bus.
Figure 1-4: GPIB connection
GPIB connector (rear panel)
rve the following rules when you use your arbitrary function generator with
GPIB Requirements
AFG3000 Series Arbitrary Function Generator Programmer Manual 1-3
Obse aGPIBnetwork
ign a unique device address to each device on the bus. No two devices
Ass cansharethesamedeviceaddress.
not connect more than 15 devices to any one bus.
Do
Connect one device for every 2 m (6 ft) of cable used.
Do not use more than 20 m (65 ft) of cable to connect devices to a bus.
Turn on at least 2/3 of the devices on the network while using the network.
Connect the devices on the network in a star or linear conguration, as shown in the following gure. Do not use loop or parallel congurations.
Getting Star ted
Figure 1-5: Typical GPIB network congurations
Setting the GPIB Address
When you use the GPIB port to comm unicate with an external controller, follow these steps to set the address of the arbitrary function generator.
1. Press the Utility button.
2. Press the I/O Interface button.
Using TekVISA
3. Press the GPIB button.
4. Press the Address button.
5. Turn the general purpose knob to set the GPIB Address. The GPIB address
must be from 0 to 30.
6. Press the Return to top menu button when you have set the GPIB address to save the setting.
7. Press the Conguration button to toggle the instrument communications to Talk/Listen to remotely control the instrument from an e xternal host computer.
NOTE. The GPIB address cannot be initialized by the *RST command.
TekVISA is Tektronix implementation of VISA (Virtual Instrument Software Architecture), an industry-standard communication protocol. VISA provides a common standard for software developers so that software from multiple vendors, such as instrument drivers, can run on the same platform. TekVISA is industry-compliant software, available with selected Tektronix instruments. You can use this software to write (or draw) interoperable instrument drivers in a variety of Application Development Environments (ADEs). It implements a subset of Version 2.2 of the VISA specication for controlling GPIB and serial (RS-232) instrument interfaces locally or remotely via an Ethernet LAN connection.
1-4 AFG3000 Series Arbitrary Function Generator Programmer Manual
Getting Started
Installation
Use an internet (www.tektronix.com/downloads) and download the current TekVISA to your PC. Unzip the downloaded le in a temporary directory of your choice and run Setup.exe.
NOTE. The details on TekVISA concepts and operations are explained in the
TekVISA Programmer M anual that can be also found on the Tektronix Web site.
browser to access the Tektronix Web site
AFG3000 Series Arbitrary Function Generator Programmer Manual 1-5
Getting Star ted
1-6 AFG3000 Series Arbitrary Function Generator Programmer Manual
Syntax and Commands
Syntax and Commands
This section provides the following information:
Command Syntax denes the command syntax and processing conventions.
Command Groups describes command groups which lists the commands
by function.
Command Descriptions describes the notation of each of the commands in alphabetical order.
AFG3000 Series Arbitrary Function Generator Programmer Manual 2-1
Command Syntax
Command Synta
x
You ca n c ont r through the GPIB interface using commands and queries. The related topics listed below describe the syntax of these commands and queries. The topics also describe the conventions that the instrument u se s to process them. See Command Groups ((See page 2-11.)) for a listing of the commands by command group, or use the index to locate a specic command.
Backus-Naur Form Denition
This manual may describe commands and queries using the Backus-Naur Form (BNF) notation. The following table denes the standard BNF symbols.
Table 2-1: BNF symbols and meanings
Symbol
<>
:=
| Exclusive OR
{ } Group; one element is required
[] .. .
( ) Comment
ol the operations and functions of the arbitrary function generator
Meaning
Dened element
Is dened as
Optional; can be omitted
Previous element(s) may be repeated
Command and Query Structure
Commands consist of set commands and query commands (usually simply called commands and queries). Commands change instrument settings or perform a specic action. Queries cause the instrum enttoreturndataandinformationabout its status.
Most commands have both a set form a nd a query form. The query form of the command is the same as the set form except that it ends with a question mark. For example, the set command
DISPlay:CONTrast?. Not all commands have both a set and a query form;
some commands are set only and some are query only.
A few commands do both a set and query a ction. For example, the command runs a self-calibration program on the instrument, then returns the result of the calibration.
A command message is a command or query name, followed by any information the instrument needs to execute the command or que ry. Command messa ges consist of ve element types.
DISPlay:CONTrast h as a query form
*CAL?
2-2 AFG3000 Series Arbitrary Function Generator Programmer Manual
Command Syntax
Table 2-2: Comm
Symbol Meaning
<Header>
<Mnemonic>
<Argument
<Comma> A single c
<Space>
>
and message elements
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 comman colon is required. The beginning colon can never be used with command headers beginning with a star (*).
A header subfunction. Some command headers have only one mnemonic. If a command from each other by a colon (:) character.
A quantity all commands have an argument, while other commands have multiple arguments. Arguments are separated from the header by a Arguments are separa
may optionally have white space characters before and after the comma.
Awhites optionally consist of multiple white space characters.
d is concatenated with other commands the beginning
header has multiple mnemonics, they are always separated
, quality, restriction, or limit associated with the header. Not
ted from each other by a <Comma>.
omma between arguments of multiple-argument commands. It
pace character between command header and argument. It may
The following gure shows the ve command message elements.
Commands. Commands cause the instrument to perform a specic function or change one of its settings. Commands have the structure:
[:]<Header>[<Space><Argument>[<C omm a>< Arg ume nt> ].. .]
mmand header is made up of one or more mnemonics arranged in a
Aco hierarchical or tree structure. The rst mnemonic is the base or root of the tree and each subsequent mnemonic is a level or branch of the previous one. Commands at a higher level in the tree m ay affect those at a lower level. The leading colon (:) always returns you to the base of the command tree.
ueries. Queries cause the arbitrary function generator to return information
Q
about its status or settings. Queries have the structure:
[:]<Header>?
[:]<Header>?[<Space><Argument>[< Com ma> <Ar gume nt> ].. .]
AFG3000 Series Arbitrary Function Generator Programmer Manual 2-3
Command Syntax
Command Entry
You can specify otherwise noted. These branch queries return information about all the mnemonics below the specied branch or level.
Query Responses. When a query is sent to the arbitrary function generator, only the values are returned. When the returned value is a mnemonic, it is noted in abbreviated format, as shown in the following table.(See Table 2-3.).
Table 2-3: Query response examples
Symbol Meaning
SOURce:PULSe:DCYcle?
OUTPut:POLarity? NORM
Follow these general rules when entering commands:
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 t
The instrument ignores commands that consists o f just a combination of white space characters and line feed
a query command at any level within the command tree unless
50.0
hrough 32 decimal).
s.
SCPI Commands and Queries
The arbitrary function generator uses a command language based on the SCPI standard. The SCPI (Standard Commands for Programmable Instruments) standard was created by a consortium to provide guidelines for remote programming of instruments. These guidelines provide a consist environment for instrument control and data transfer. This environment uses dened programming messages, instrument responses and data formats that operate across all SCPI instruments, regardless of manufacturer.
The SCPI language is based on a hierarchical or tree structure as shown in the following gure that represents a subsystem. The top level of the tree is the root node; it is followed by one or more lower-level nodes.
Figure 2-1: Example of SCPI subsystem hierarchy tree
ent programming
2-4 AFG3000 Series Arbitrary Function Generator Programmer Manual
Command Syntax
Creating Commands
Parameter Types
You can create c Commands specify actions for the instrument to perform. Queries return measurement data and information about parameter settings.
SCPI command hierarchy and separating each node by a colon.
In the gure SOURce are lower-level nodes. To create a SCPI command, sta rt with the root node TRIGger and move down the tree structure adding nodes until you reach the end of a branch. Most commands and some queries have parameters; you must include a value for these parameters. If you specify a parameter value that is out of range, the parameter will be set to a default value. The command descriptions, list the
For example, TRIGgerEVENt:SOURce EXTRear is a valid SCPI command created
Parameters are indicated by angle brackets, such as <le_name>.There are several different types of parameters. (See Table 2-4.) The parameter type is listed after the pa function generator command set and some are dened by SCPI.
valid values for all parameters.
from the hierarchy tree. (See Figure 2-1.)
rameter. Some parameter types are dened specically for the arbitrary/
ommands and queries from these subsystem hierarchy trees.
s are created by stringing together the nodes of a subsystem
above, TRIGger is the root node and EVENt, GATed, INPut, and
Creating Queries
Query Responses
Parameter Types
To create a que ry, start at the root node of a tree structure, move down to the end
branch, and add a question mark. TRIGgerEVENt:SOURce? is an example
of a of a valid SCPI query using the hierarchy tree in the gure. (SeeFigure2-1.)
The query causes the arbitrary function generator to return information about its
atus or settings. When a query is sent to the arbitrary function generator, only
st the values a re returned. When the returned value is a mnemonic, it is noted in abbreviated format, as shown in the following table.
Every parameter in the command and query descriptions is of a specied type. The parameters are enclosed in brackets, such as <value>. The parameter type is listed after the p arameter and is e nclosed in parentheses, for example, (boolean). Some parameter types are dened specically for the arbitrary function generator command set and some are denedbySCPI.
AFG3000 Series Arbitrary Function Generator Programmer Manual 2-5
Command Syntax
Table 2-4: Para
Parameter typ
arbitrary block
meter types used in syntax descriptions
e
1
Description Example
A specied len
gth of
arbitrary data
#512234xxxxx
...where 5 indicates that the following 5 digits (12234) specify the length of the
data in bytes; xxxxx ... indicates the data or
#0xxxxx...<LF><&EOI>
boolean Boolean num
bers or values
ON or ≠ 0
OFF or 0
discrete
a LIST OF SPECIFIC VALUES
binary Binary numbers
octal
hexadecimal
2
Octal numbers #Q57, #Q3
Hexadecimal numbers
min, max
#B0110
#HAA, #H1
(0-9,A,B,C,D,E,F)
NR12numeric Integers 0, 1, 15, -1
NR223n
umeric
Decima
l numbers
1.2, 3.
141516, -6.5
NR32numeric Floating point numbers 3.1415E-9, -16.1E5
NRf2numeric
4
string
Flexible decimal number that may be type NR1, NR2 or NR3
anumeric characters (must
Alph
See NR1, NR2, and NR3
les
examp
"Testing 1, 2, 3"
be within quotation marks)
1
Dened in ANSI/IEEE 488.2 as "Denite Length Arbitrary Block Response Data."
2
3
4
SI/IEEE 488.2-1992-dened parameter type.
An AN
Some commands and queries will accept an octal or hexadecimal value even though the parameter type is dened as NR1.
Dened in ANSI/IEEE 488.2 as "String Response Data."
Special Characters
The Line Feed (LF) character (ASCII 10), and all characters in the range of ASCII 127-255 are dened as special characters. These characters are used in arbitrary block arguments only; using these characters in other parts of any command yields unpredictable results.
Abbreviating Commands,
Queries, and Parameters
You can abbreviate most SCPI com mands, queries, and parameters to an accepted short form. This manual shows these short forms as a combination of upper and lower case letters. The upper case letters indicate the accepted short form of a command. As shown in the following gure, you can create a short form by using only the upper case letters. The accepted short form and the long form are equivalent and request the same action of the instrum ent.
2-6 AFG3000 Series Arbitrary Function Generator Programmer Manual
Command Syntax
Chainin
g Commands and
Queries
Figure 2-2:
NOTE. The numeric sufx of a command or query may be included in either the
long form or short form; the arbitrary function generator will default to "1" if no sufxisused.
You can chain several commands or queries together into a single message. To create a chained message, rst create a command or query, add a semicolon (;), and then add more commands or queries and semicolons until the message is comp with a colon (:). The following gure illustrates a chained message consisting of several commands and queries. The single chained message should end in a command or query, not a semicolon. Responses to any queries in your message are separated by semicolons.
Example of abbreviating a command
lete. If the command following a semicolon is a root node, precede it
gure 2-3: Example of chaining commands and queries
Fi
f a command o r query has the same root and lower-level nodes a s the previous
I command or query, you can omit these nodes. In the following gure, the second command has the same root node (TRIGger:SEQuence) as the rst command, so these nodes can be omitted.
AFG3000 Series Arbitrary Function Generator Programmer Manual 2-7
Command Syntax
Figure 2-4: Example of omitting root and lower-level nodes in a chained message
Unit and SI Prefix
If the decimal numeric argument refers to amplitude, frequency, or time, you can express it using SI units instead o f using 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 200 mV or 1.0 MHz instead of 200.0E-3 or 1.0E+6, respectively, to specify voltage or frequency.
The following table lists the available units.
Table 2-5: Available units
Symbol
dB
dBm
DEG degree (phase)
Hz
PCT percent (%) s
Vvolt
Meaning
decibel (relative amplitude)
decibel (absolute amplitude)
hertz (frequency)
second (time)
TheavailableSIprefixes are shown in the following table.
Table 2-6: Available SI prefixes
10
1
GT PEEX
+6
10
+9
10
+12
SI prexZAFPNUMKMA
-21
Corresponding power
1
When the unit is "Hz", "M" may be used instead of "MA" so that the frequency can be represented by "MHz".
10
10
-18
10
-15
10
-12
10
-9
10
-6
10
-3
10
+3
10
+15
10
+18
You can omit a unit in a command, but you must include the unit when using a SI prex. For e xample, frequency of 15 MHz c an be described as follows
15.0E6, 1.5E7Hz, 15000000, 15000000Hz, 15MHz, etc. ("15M" is not allowed.)
Note that you can use either lower or upper case units and prexes. The following examples have the same result, respectively.
2-8 AFG3000 Series Arbitrary Function Generator Programmer Manual
Command Syntax
General rules for using
SCPI commands
170mHz, 170mHz 250mv, 250mV, 250MV, etc.
Here are three general rules for using SCPI commands, queries, and parameters:
You can use single (‘ ’) or double (“ ”) quotation marks for quoted strings, but you cannot use both types of quotation marks for the same string.
correct "This string uses quotation marks correctly."
correct ‘This string also uses quotation marks correctly.'
incorrect "This string does not use quotation marks correctly.'
You can use upper case, lower case, or a mixture of both cases for all commands, queries, and parameters.
:SOURCE:FREQUENCY 10MHZ
is the same as
:source:frequency 100mhz
and
SOURCE:frequency 10MHZ
, 170MHz, etc.
NOTE. Literal strings (quoted) are case sensitive, for example, le names.
No embedded spaces are allowed between or within nodes.
correct
incorrect :OUTPUT: FILTE R: LPASS:FREQUE NCY 200MHZ
IEEE 488.2 Common Commands
Description
Command and Query
Structure
ANSI/IEEE Standard 488.2 denes the codes, formats, protocols, common commands and queries used on the interface between the controller and the instruments. The arbitrary function generator complies with this standard.
The syntax for an IEEE 488.2 common command is an asterisk (*) followed by a command and, optionally, a space and parameter value. The syntax for an IEEE
488.2commonqueryisanasterisk(*)followedbyaqueryandaquestionmark. All of the common commands and queries are listed in the last part of the Syntax and Commands section. The following are examples of common commands:
*ESE 1 6
:OUTPUT:FILTER:LPASS:FREQUENCY 200MHZ
and usage of
*CLS
AFG3000 Series Arbitrary Function Generator Programmer Manual 2-9
Command Syntax
The following a
*ESR
*IDN
re examples of common queries:
2-10 AFG3000 Series Arbitrary Function Generator Programmer Manual
Loading...
+ 137 hidden pages