Tektronix AFG31252, AFG31021, AFG31022, AFG31051, AFG31052 Programmer Manual

...
x

AFG31000 Series Arbitrary Function Generator Programmer's Manual

ZZZ
*P077148803*
077-148-803
AFG31000 Series Arbitrary Function Generator
Programmer's Manual
tek.com
*P077148803*
077148803
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. Specifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting Tektronix, Inc.
Tektronix, Inc. 14150 SW Karl Braun Drive P.O. Box 500 Beaverton, OR 97077 USA
For product information, sales, service, and technical support:
- In North America, call 1-800-833-9200.
- Worldwide, visit tek.com to find 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 are excluded from this warranty. Parts, modules and replacement products used by Tektronix for 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 of 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 center is located. Customer shall be responsible for paying all shipping charges, duties, taxes, and any other charges for products returned to any other locations.
This warranty shall not apply to any defect, failure or damage caused by improper use or improper or inadequate maintenance and care. Tektronix shall not be obligated to furnish service under this warranty a) to repair damage resulting from attempts by personnel other than Tektronix representatives to install, repair or service the product; b) to repair damage resulting from improper use or connection to incompatible equipment; c) to repair any damage or malfunction caused by the use of non-Tektronix supplies; or d) to service a product that has been modified or integrated with other products when the effect of such modification or integration increases the time or difficulty of servicing the product.
THIS WARRANTY IS GIVEN BY TEKTRONIX WITH RESPECT TO THE PRODUCT IN LIEU OF ANY OTHER WARRANTIES, EXPRESS OR IMPLIED. TEKTRONIX AND ITS VENDORS DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
TEKTRONIX' RESPONSIBILITY TO REPAIR OR REPLACE DEFECTIVE PRODUCTS IS THE SOLE AND EXCLUSIVE REMEDY PROVIDED TO THE CUSTOMER FOR BREACH OF THIS WARRANTY. TEKTRONIX AND ITS VENDORS WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IRRESPECTIVE OF WHETHER TEKTRONIX OR THE VENDOR HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
[W16 – 15AUG04]
AFG31000 Series Arbitrary Function Generator Programmer's Manual v
Important safety information .................................................................................................. xi

Table of Contents

Important safety information ................................................................................................................ xi
General safety summary ...................................................................................................................... xi
To avoid fire or personal injury ................................................................................................................... xi
Terms in this manual .......................................................................................................................... xiii
Service safety summary ..................................................................................................................... xiii
Symbols and terms on the product .................................................................................................... xiv
Introduction ............................................................................................................................... 1
Getting started ....................................................................................................................................... 1
Extended warranty ................................................................................................................................ 1
General model information .................................................................................................................... 1
Manual overview ................................................................................................................................... 2
Contact information ............................................................................................................................... 2
Using the GPIB port .............................................................................................................................. 2
GPIB requirements ...................................................................................................................................... 3
Setting the GPIB address...................................................................................................................... 4
Using Virtual Instrument Software Architecture .................................................................................... 4
Installation ................................................................................................................................................... 5
Syntax and commands ............................................................................................................. 7
Syntax and commands.......................................................................................................................... 7
Command syntax .................................................................................................................................. 7
Backus-Naur form definition ........................................................................................................................ 7
Command and query structure .................................................................................................................... 8
Command message elements ..................................................................................................................... 9
SCPI commands and queries.................................................................................................................... 10
IEEE 488.2 common commands ............................................................................................................... 15
Command groups ................................................................................................................................ 16
Calibration and diagnostic commands ...................................................................................................... 16
Display commands .................................................................................................................................... 16
Mass memory commands ......................................................................................................................... 17
Memory commands ................................................................................................................................... 18
Output commands ..................................................................................................................................... 18
Source commands .................................................................................................................................... 19
Status commands ..................................................................................................................................... 21
System commands .................................................................................................................................... 22
Synchronization commands ...................................................................................................................... 22
Trace commands ...................................................................................................................................... 22
Trigger commands .................................................................................................................................... 23
Table of Contents
vi AFG31000 Series Arbitrary Function Generator Programmer's Manual
AFG control command .............................................................................................................................. 23
Screen copy command ............................................................................................................................. 23
License commands ................................................................................................................................... 24
Sequence commands ............................................................................................................................... 25
Waveform list commands .......................................................................................................................... 25
Sequence control group commands .......................................................................................................... 26
InstaView commands ................................................................................................................................ 26
Command descriptions .......................................................................................................... 27
Command descriptions ....................................................................................................................... 27
Manual conventions .................................................................................................................................. 27
ABORt (no query form) ............................................................................................................................. 27
AFGControl:CSCopy (no query form) ....................................................................................................... 28
*CAL? (query only) .................................................................................................................................... 29
CALibration[:ALL] ................................................................................................................................ ...... 30
*CLS (no query form) ................................................................................................................................ 31
DIAGnostic[:ALL] ....................................................................................................................................... 31
DISPlay:BRIGhtness ................................................................................................................................. 32
DISPlay:SAVer:IMMediate (no query form) ............................................................................................... 32
DISPlay:SAVer[:STATe] ............................................................................................................................ 33
DISPlay[:WINDow]:TEXT[:DATA] ............................................................................................................. 33
DISPlay[:WINDow]:TEXT:CLEar (no query form) ..................................................................................... 34
*ESE ......................................................................................................................................................... 35
*ESR? (query only) ................................................................................................................................... 36
HCOPy:SDUMp[:IMMediate] (no query form) ........................................................................................... 36
*IDN? (query only) ..................................................................................................................................... 37
INSTaview[1|2]:MEASUrement:DELay ..................................................................................................... 37
INSTaview[1|2]:MEASUrement:MAXimum (query only) ................................ ................................ ............ 38
INSTaview[1|2]:MEASUrement:MINimum (query only) ............................................................................. 38
INSTaview[1|2]:STATe ................................ ................................ .............................................................. 39
LICense:HID? (query only) ........................................................................................................................ 39
LICense: INSTall (no query form) .............................................................................................................. 40
LICense: UNINstall? .................................................................................................................................. 40
LICense:LIST? (query only) ...................................................................................................................... 41
LICense:ERRor? (query only) ................................................................................................................... 41
LICense: GMT? (query only) ..................................................................................................................... 42
LICense: IDN? (query only) ....................................................................................................................... 42
LICense: COUNT? (query only) ................................................................................................................ 43
LICense: ITEM? (query only) .................................................................................................................... 44
LICense: VALidate? (query only) .............................................................................................................. 45
MEMory:STATe:DELete (no query form) .................................................................................................. 45
MEMory:STATe:LOCK .............................................................................................................................. 46
MEMory:STATe:RECall:AUTo .................................................................................................................. 47
MEMory:STATe:VALid? (query only) ........................................................................................................ 48
MMEMory:CATalog? (query only) ............................................................................................................. 49
MMEMory:CDIRectory .............................................................................................................................. 50
MMEMory:DELete (no query form) ........................................................................................................... 50
MMEMory:LOAD:STATe (no query form) ................................................................................................. 51
MMEMory:LOAD:TRACe (no query form) ................................................................................................. 52
MMEMory:LOCK[:STATe] ......................................................................................................................... 53
MMEMory:MDIRectory (no query form) .................................................................................................... 53
MMEMory:STORe:STATe (no query form) ............................................................................................... 54
MMEMory:STORe:TRACe (no query form) ............................................................................................... 55
MMEMory:OPEN:SEQuence (no query form) ........................................................................................... 56
MMEMory:SAVE:SEQuence (no query form)............................................................................................ 57
*OPC ......................................................................................................................................................... 58
*OPT? (query only) ................................................................................................................................... 58
OUTPut[1|2]:IMPedance ........................................................................................................................... 59
OUTPut[1|2]:POLarity ............................................................................................................................... 60
OUTPut[1|2][:STATe] ................................................................................................................................ 61
Table of Contents
AFG31000 Series Arbitrary Function Generator Programmer's Manual vii
OUTPut:TRIGger:MODE ........................................................................................................................... 62
*PSC ......................................................................................................................................................... 63
*RCL (no query form) ................................................................................................................................ 64
RECALL:SETUp (no query form) .............................................................................................................. 64
*RST (no query form) ................................................................................................................................ 65
*SAV (no query form) ................................................................................................................................ 65
SAVe:SETUp (no query form) ................................................................................................................... 66
SEQControl:RMODe ................................................................................................................................. 67
SEQControl:RUN[:IMMediate] (no query form) ......................................................................................... 68
SEQControl:STOP[:IMMediate] (no query form) ....................................................................................... 68
SEQControl:RESET[:IMMediate] (no query form) ..................................................................................... 69
SEQControl:STATe ................................................................................................................................... 69
SEQControl:RSTATe? (query only) .......................................................................................................... 70
SEQControl:SRATe .................................................................................................................................. 70
SEQControl:DELay ................................................................................................................................... 71
SEQControl:SOURce[n]:SCALe ................................................................................................................ 72
SEQControl:SOURce[n]:OFFSet .............................................................................................................. 73
SEQControl:TIMer ..................................................................................................................................... 74
SEQuence:ELEM[n]:GOTO:INDex ............................................................................................................ 75
SEQuence:ELEM[n]:GOTO:STATe .......................................................................................................... 76
SEQuence:ELEM[n]:MARKer:STATe ....................................................................................................... 77
SEQuence:ELEM[n]:JTARget:INDex ........................................................................................................ 78
SEQuence:ELEM[n]:JTARget:TYPE ......................................................................................................... 79
SEQuence:ELEM[n]:JUMP:EVENt ............................................................................................................ 80
SEQuence:ELEM[n]:JUMP:SLOPe ........................................................................................................... 81
SEQuence:ELEM[n]:LOOP:COUNt ........................................................................................................... 82
SEQuence:ELEM[n]:LOOP:INFinite .......................................................................................................... 83
SEQuence:ELEM[n]:TWAit[:STATe] ......................................................................................................... 84
SEQuence:ELEM[n]:TWAit:EVENt ............................................................................................................ 85
SEQuence:ELEM[n]:TWAit:SLOPe ........................................................................................................... 86
SEQuence:ELEM[n]:WAVeform[m] ........................................................................................................... 87
SEQuence:LENGth ................................................................................................................................... 88
SEQuence:NEW (No Query Form) ........................................................................................................... 88
[SOURce[1|2]]:AM[:DEPTh] ...................................................................................................................... 89
[SOURce[1|2]]:AM:INTernal:FREQuency.................................................................................................. 90
[SOURce[1|2]]:AM:INTernal:FUNCtion ..................................................................................................... 91
[SOURce[1|2]]:AM:INTernal:FUNCtion:EFILe ........................................................................................... 92
[SOURce[1|2]]:AM:SOURce ...................................................................................................................... 93
[SOURce[1|2]]:AM:STATe ......................................................................................................................... 94
[SOURce[1|2]:]BURSt:INFInite:REARm (no query form) .......................................................................... 94
[SOURce[1|2]:]BURSt:IDLE ...................................................................................................................... 95
[SOURce[1|2]]:BURSt:MODE ................................................................................................................... 96
[SOURce[1|2]]:BURSt:NCYCles ............................................................................................................... 97
[SOURce[1|2]]:BURSt[:STATe] ................................................................................................................. 98
[SOURce[1|2]]:BURSt:TDELay ................................................................................................................. 99
[SOURce[1|2]]:COMBine:FEED .............................................................................................................. 100
[SOURce[1|2]]:FM[:DEViation] ................................................................................................................ 101
[SOURce[1|2]]:FM:INTernal:FREQuency ................................................................................................ 102
[SOURce[1|2]]:FM:INTernal:FUNCtion .................................................................................................... 103
[SOURce[1|2]]:FM:INTernal:FUNCtion:EFILe ......................................................................................... 104
[SOURce[1|2]]:FM:SOURce .................................................................................................................... 104
[SOURce[1|2]]:FM:STATe ....................................................................................................................... 105
[SOURce[1|2]]:FREQuency:CENTer ....................................................................................................... 106
[SOURce[1|2]]:FREQuency:CONCurrent[:STATe] .................................................................................. 107
[SOURce[1|2]]:FREQuency[:CW|:FIXed] ................................................................................................ 108
[SOURce[1|2]]:FREQuency:MODE ......................................................................................................... 109
[SOURce[1|2]]:FREQuency:SPAN .......................................................................................................... 110
[SOURce[1|2]]:FREQuency:STARt ......................................................................................................... 111
[SOURce[1|2]]:FREQuency:STOP .......................................................................................................... 112
[SOURce[1|2]]:FSKey[:FREQuency] ....................................................................................................... 113
[SOURce[1|2]]:FSKey:INTernal:RATE .................................................................................................... 114
[SOURce[1|2]]:FSKey:SOURce .............................................................................................................. 115
Table of Contents
viii AFG31000 Series Arbitrary Function Generator Programmer's Manual
[SOURce[1|2]]:FSKey:STATe ................................................................................................................. 116
[SOURce[1|2]]:FUNCtion:EFILe .............................................................................................................. 117
[SOURce[1|2]]:FUNCtion:RAMP:SYMMetry ........................................................................................... 118
[SOURce[1|2]]:FUNCtion[:SHAPe] .......................................................................................................... 119
[SOURce[1|2]]:PHASe[:ADJust] .............................................................................................................. 120
[SOURce[1|2]]: PHASe:CONCurrent[:STATe] ........................................................................................ 121
[SOURce[1|2]]:PHASe:INITiate (no query form) ..................................................................................... 121
[SOURce[1|2]]:PM[:DEViation] ................................................................................................................ 122
[SOURce[1|2]]:PM:INTernal:FREQuency................................................................................................ 123
[SOURce[1|2]]:PM:INTernal:FUNCtion ................................................................................................... 124
[SOURce[1|2]]:PM:INTernal:FUNCtion:EFILe ......................................................................................... 125
[SOURce[1|2]]:PM:SOURce .................................................................................................................... 125
[SOURce[1|2]]:PM:STATe ....................................................................................................................... 126
[SOURce[1|2]]:PULSe:DCYCle ............................................................................................................... 127
[SOURce[1|2]]:PULSe:DELay ................................................................ ................................................. 128
[SOURce[1|2]]:PULSe:HOLD .................................................................................................................. 129
[SOURce[1|2]]:PULSe:PERiod ................................................................................................................ 130
[SOURce[1|2]]:PULSe:TRANsition[:LEADing] ......................................................................................... 131
[SOURce[1|2]]:PULSe:TRANsition:TRAiling ........................................................................................... 132
[SOURce[1|2]]:PULSe:WIDTh ................................................................................................................. 133
[SOURce[1|2]]:PWM:INTernal:FREQuency ............................................................................................ 134
[SOURce[1|2]]:PWM:INTernal:FUNCtion ................................................................................................ 135
[SOURce[1|2]]:PWM:INTernal:FUNCtion:EFILe ..................................................................................... 136
[SOURce[1|2]]:PWM:SOURce ................................................................................................................ 136
[SOURce[1|2]]:PWM:STATe ................................................................................................................... 137
[SOURce[1|2]]:RMODe? ......................................................................................................................... 137
[SOURce[1|2]]:PWM[:DEViation]:DCYCle ............................................................................................... 138
[SOURce]:ROSCillator:SOURce ............................................................................................................. 139
[SOURce[1|2]]:SWEep:HTIMe ................................................................................................................ 140
[SOURce[1|2]]:SWEep:MODE ................................................................................................................ 141
[SOURce[1|2]]:SWEep:RTIMe ................................................................................................................ 142
[SOURce[1|2]]:SWEep:SPACing ............................................................................................................ 143
[SOURce[1|2]]:SWEep:TIME .................................................................................................................. 144
[SOURce[1|2]]:VOLTage:CONCurrent[:STATe] ...................................................................................... 145
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:HIGH ............................................................................... 146
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:LOW ............................................................................... 147
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:OFFSet ........................................................................... 148
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] .................................................................... 149
[SOURce[1|2]]:VOLTage:LIMit:HIGH ...................................................................................................... 150
[SOURce[1|2]]:VOLTage:LIMit:LOW ....................................................................................................... 151
[SOURce[1|2]]:VOLTage:UNIT ............................................................................................................... 152
SOURce<3|4>:POWer[:LEVel][:IMMediate][:AMPLitude]........................................................................ 153
*SRE ....................................................................................................................................................... 154
STATus:OPERation:CONDition? (query only) ........................................................................................ 155
STATus:OPERation:ENABle ................................................................................................................... 155
STATus:OPERation[:EVENt]? (query only) ............................................................................................. 156
STATus:PRESet (no query form) ............................................................................................................ 156
STATus:QUEStionable:CONDition? (query only) .................................................................................... 157
STATus:QUEStionable:ENABle .............................................................................................................. 157
STATus:QUEStionable[:EVENt]? (query only) ........................................................................................ 158
*STB? (query only) .................................................................................................................................. 158
SYSTem:BEEPer:STATe ........................................................................................................................ 159
SYSTem:ERRor[:NEXT]? (query only) .................................................................................................... 159
SYSTem:BEEPer[:IMMediate] (no query form) ....................................................................................... 160
SYSTem:KCLick[:STATe] ....................................................................................................................... 160
SYSTem:KLOCk[:STATe] ....................................................................................................................... 161
SYSTem:MACADDress?......................................................................................................................... 162
SYSTem:PASSword:CDISable (no query form) ...................................................................................... 163
SYSTem:PASSword[:CENable] (no query form) ..................................................................................... 164
SYSTem:PASSword[:CENable]:STATe? (query only) ............................................................................ 165
SYSTem:PASSword:NEW (no query form) ............................................................................................. 166
SYSTem:RESTart ................................ ................................ ................................................................ ... 166
Table of Contents
AFG31000 Series Arbitrary Function Generator Programmer's Manual ix
SYSTem:SECurity:IMMediate (no query form)........................................................................................ 167
SYSTem:ULANguage ............................................................................................................................. 167
SYSTem:VERSion? (query only) ............................................................................................................ 168
TRACe|DATA[:DATA] ............................................................................................................................. 168
*TRG (no query form) .............................................................................................................................. 169
TRIGger[:SEQuence]:SLOPe.................................................................................................................. 169
TRIGger[:SEQuence]:SOURce ............................................................................................................... 170
TRIGger[:SEQuence]:TIMer ................................................................ .................................................... 170
TRIGger[:SEQuence][:IMMediate] (no query form) ................................................................................. 171
*TST? (query only) .................................................................................................................................. 171
*WAI (no query form) .............................................................................................................................. 172
WLISt:NAME? (query only) ..................................................................................................................... 172
WLISt:SIZE? (query only)........................................................................................................................ 173
WLISt:WAVeform:DELete (no query form) .............................................................................................. 174
WLISt:WAVeform:IMPort (no query form) ............................................................................................... 175
WLISt:WAVeform:LENGth? (query only) ................................................................................................ 176
Status and events ................................................................................................................. 177
Status and events ............................................................................................................................. 177
Status reporting structure ........................................................................................................................ 177
Registers ................................................................................................................................................. 178
Queues ................................................................................................................................................... 184
Messages and codes .............................................................................................................................. 185
Programming examples ....................................................................................................... 193
Programming examples .................................................................................................................... 193
Example 1 ......................................................................................................................................... 194
Example 2 ......................................................................................................................................... 195
Default settings ..................................................................................................................... 196
AFG31000 Series Arbitrary Function Generator Programmer's Manual xi
Important safety information
This manual contains information and warnings that must be followed by the user for safe operation and to keep the product in a safe condition.
To safely perform service on this product, additional information is provided at the end of this section. See Service safety summary (on page xiii).

General safety summary

Use the product only as specified. Review the following safety precautions to avoid injury and prevent damage to this product or any products connected to it. Carefully read all instructions. Retain these instructions for future reference.
Comply with local and national safety codes. For correct and safe operation of the product, it is essential that you follow generally accepted safety
procedures in addition to the safety precautions specified in this manual. The product is designed to be used by trained personnel only.
Only qualified personnel who are aware of the hazards involved should remove the cover for repair, maintenance, or adjustment.
Before use, always check the product with a known source to be sure it is operating correctly. This product is not intended for detection of hazardous voltages.
Use personal protective equipment to prevent shock and arc blast injury where hazardous live conductors are exposed.
While using this product, you may need to access other parts of a larger system. Read the safety sections of the other component manuals for warnings and cautions related to operating the system.
When incorporating this equipment into a system, the safety of that system is the responsibility of the assembler of the system.

To avoid fire or personal injury

Use proper power cord. Use only the power cord specified for this product and certified for the
country of use. Do not use the provided power cord for other products. Use proper voltage setting. Before applying power, make sure that the line selector is in the proper
position for the source being used or make sure the line voltage is corrected based on the published specifications.
Ground the product. This product is grounded through the grounding conductor of the power cord. To avoid electric shock, the grounding conductor must be connected to earth ground. Before making connections to the input or output terminals of the product, make sure that the product is properly grounded.

Important safety information

Important safety information
xii AFG31000 Series Arbitrary Function Generator Programmer's Manual
Do not disable the power cord grounding connection. Power disconnect. The power cord disconnects the product from the power source. See instructions
for the location. Do not position the equipment so that it is difficult to operate the power cord; it must remain accessible to the user at all times to allow for quick disconnection if needed.
Connect and disconnect properly. Do not connect or disconnect instruments while they are connected to a voltage source.
Use only connectors and adapters supplied with the product, or indicated by Tektronix to be suitable for the product.
Observe all terminal ratings. To avoid fire or shock hazard, observe all ratings and markings on the product. Consult the product manual for further ratings information before making connections to the product. Do not exceed the Measurement Category (CAT) rating and voltage or current rating of the lowest rated individual component.
Do not apply a potential to any terminal, including the common terminal, that exceeds the maximum rating of that terminal.
Do not float the common terminal above the rated voltage for that terminal. Do not operate without covers. Do not operate this product with covers or panels removed, or with
the case open. Hazardous voltage exposure is possible. Avoid exposed circuitry. Do not touch exposed connections and components when power is
present. Do not operate with suspected failures. If you suspect that there is damage to this product, have it
inspected by qualified service personnel. Disable the product if it is damaged. Do not use the product if it is damaged or operates incorrectly. If in
doubt about safety of the product, turn it off and disconnect the power cord. Clearly mark the product to prevent its further operation.
Examine the exterior of the product before you use it. Look for cracks or missing pieces. Use only specified replacement parts.
Wear eye protection. Wear eye protection if exposure to high-intensity rays or laser radiation exists. Do not operate in wet/damp conditions. Be aware that condensation may occur if a unit is moved
from a cold to a warm environment.
Do not operate in an explosive atmosphere. Provide proper ventilation. Refer to the installation instructions in the manual for details on installing
the product so it has proper ventilation. Slots and openings are provided for ventilation and should never be covered or otherwise obstructed.
Do not push objects into any of the openings. Provide a safe working environment. Always place the product in a location convenient for viewing
the display and indicators.
Important safety information
AFG31000 Series Arbitrary Function Generator Programmer's Manual xiii
Avoid improper or prolonged use of keyboards, pointers, and button pads. Improper or prolonged keyboard or pointer use may result in serious injury.
Be sure your work area meets applicable ergonomic standards. Consult with an ergonomics professional to avoid stress injuries.
Use care when lifting and carrying the product. This product is provided with handles for lifting and carrying.
Use only the Tektronix rack-mount hardware specified for this product. Keep product surfaces clean and dry. Remove the input signals before you clean the product.
Inspect the instrument as often as operating conditions require. To clean the exterior surface, perform the following steps:
1. Remove loose dust on the outside of the instrument with a lint-free cloth. Use care to avoid scratching the clear glass display filter.
2. Use a soft cloth dampened with water to clean the instrument. Use an aqueous solution of 75% isopropyl alcohol for more efficient cleaning.
CAUTION. Avoid getting moisture inside the unit during external cleaning. Use only enough cleaning solution to dampen the cloth or swab. To avoid damage to the instrument, do not expose it to sprays, liquids, or solvents, and do not use any abrasive or chemical cleaning agents.

Terms in this manual

These terms may appear in this manual:
WARNING. Warning statements identify conditions or practices that could result in injury or loss of life.
CAUTION. Caution statements identify conditions or practices that could result in damage to this product or
other property.

Service safety summary

This section contains additional information required to safely perform service on the product. Only qualified personnel should perform service procedures. Read this Service safety summary and the General safety summary before performing any service procedures.
To avoid electric shock. Do not touch exposed connections. Do not service alone. Do not perform internal service or adjustments of this product unless another
person capable of rendering first aid and resuscitation is present.
Important safety information
xiv AFG31000 Series Arbitrary Function Generator Programmer's Manual
Disconnect power. To avoid electric shock, switch off the product power and disconnect the power cord from the mains power before removing any covers or panels, or opening the case for servicing.
Use care when servicing with power on. Dangerous voltages or currents may exist in this product. Disconnect power, remove battery (if applicable), and disconnect test leads before removing protective panels, soldering, or replacing components.
Verify safety after repair. Always recheck ground continuity and mains dielectric strength after performing a repair.

Symbols and terms on the product

These terms may appear on the product:
DANGER indicates an injury hazard immediately accessible as you read the marking. WARNING indicates an injury hazard not immediately accessible as you read the marking. CAUTION indicates a hazard to property including the product.
When this symbol is marked on the product, be sure to consult the manual to
find out the nature of the potential hazards and any actions which have to be taken to avoid them. (This symbol may also be used to refer the user to ratings in the manual.)
The following symbol(s) may appear on the product:
AFG31000 Series Arbitrary Function Generator Programmer's Manual 1

Getting started

Thank you for choosing a Tektronix product. The AFG31000 Series Arbitrary Function Generator (AFG) instruments are high-performance instruments with built-in waveform generation applications, real-time waveform monitoring called InstaViewTM, and an improved user interface for higher test efficiency.

Extended warranty

Additional years of warranty coverage are available on many products. These valuable contracts protect you from unbudgeted service expenses and provide additional years of protection at a fraction of the price of a repair. Extended warranties are available on new and existing products. Contact your local Tektronix office, sales partner, or distributor for details (refer to Contact information (on page 2) for details).

General model information

This manual provides operation information for the following products. Unless otherwise noted, "AFG31000 Series" refers to the models in the following table.
Table 1: AFG31000 models
Model
Bandwidth
Sample rate
Channel
Waveform memory size
Optional
AFG31021
25 MHz
250 MS/s
1
16 MS/CH
128 MS/CH
AFG31022
25 MHz
250 MS/s
2
16 MS/CH
128 MS/CH
AFG31051
50 MHz
1 GS/s
1
16 MS/CH
128 MS/CH
AFG31052
50 MHz
1 GS/s
2
16 MS/CH
128 MS/CH
AFG31101
100 MHz
1 GS/s
1
16 MS/CH
128 MS/CH
AFG31102
100 MHz
1 GS/s
2
16 MS/CH
128 MS/CH
AFG31151
150 MHz
2 GS/s
1
16 MS/CH
128 MS/CH
AFG31152
150 MHz
2 GS/s
2
16 MS/CH
128 MS/CH
AFG31251
250 MHz
2 GS/s
1
16 MS/CH
128 MS/CH
AFG31252
250 MHz
2 GS/s
2
16 MS/CH
128 MS/CH
Each AFG31000 Series provides a:
25 MHz to 250 MHz function signal generator 20 MHz to 160 MHz pulse generator
The AFG31000 Series also provides 14-bit vertical resolution.

Introduction

Introduction 2 AFG31000 Series Arbitrary Function Generator Programmer's Manual

Manual overview

This manual consists of the following sections:
Syntax and Commands: defines the command syntax and processing conventions, and
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.
Supported SCPI commands: contains a list of commands and SCPI information.

Contact information

If you have any questions after you review the information in this documentation, please contact your local Tektronix office, sales partner, or distributor. You can also call the corporate headquarters of Tektronix in North America at 1-800-833-9200. Visit tek.com to find contacts in your area.

Using the GPIB port

The arbitrary function generator has Talk and Listen functions through which it can communicate with other devices, as well as the external controller, using a GPIB cable.
Figure 1: AFG31000 GPIB connection
Introduction AFG31000 Series Arbitrary Function Generator Programmer's Manual 3

GPIB requirements

Observe the following rules when you use your arbitrary function generator with a GPIB cable:
Assign a unique device address to each device that uses the GPIB cable (this is also known as
the bus). 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 2 meters (6 feet) of cable used. Do not use more than 20 meters (65 feet) of cable to connect devices to a bus. Turn on at least two-thirds, or 67%, of the devices on the network while using the network. Connect the devices on the network in a star or linear configuration, as shown in the next figure.
Do not use parallel or loop configurations.
Figure 2: Typical GPIB network configuration
Introduction 4 AFG31000 Series Arbitrary Function Generator Programmer's Manual

Setting the GPIB address

When you use the GPIB port to communicate with an external controller, follow these steps to set the address of the arbitrary function generator.
To set the GPIB address:
1. Select Utility.
2. Select I/O Interface.
3. Select the GPIB Address text box.
4. Input the correct address and select Enter on the touchscreen keyboard.
NOTE. The GPIB address cannot be initialized by an *RST command.
Figure 3: Set the GPIB address

Using Virtual Instrument Software Architecture

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 specification for controlling GPIB and serial (RS-232) instrument interfaces locally or remotely via an Ethernet LAN connection.
Introduction AFG31000 Series Arbitrary Function Generator Programmer's Manual 5

Installation

Use an internet browser to access the Tektronix Web site (www.tektronix.com/downloads) and download the current TekVISA to your PC. Unzip the downloaded file in a temporary directory of your choice and run Setup.exe.
NOTE. The details about TekVISA concepts and operations are explained in the TekVISA Programmer Manual that can also be found on the Tektronix website. This manual describes TekVISA, the Tektronix
implementation of the VISA Application Programming Interface (API). TekVISA provides the interface-independent functionality needed to control and access the embedded software of Tektronix test and measurement equipment in following ways: Using virtual GPIB software running locally on Windows-based instruments using physical GPIB controller hardware using asynchronous serial controller hardware.
AFG31000 Series Arbitrary Function Generator Programmer's Manual 7
Syntax and commands
This section provides the following information:
Command Syntax (on page 7) defines the command syntax and processing conventions. Command Groups (on page 16) describes command groups which lists the commands by
function.
Command Descriptions (on page 27) describes the notation of each of the commands in
alphabetical order.

Command syntax

You can control the operations and functions of the AFG 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 uses to process them. See Command groups (on page 16) for a list of the commands by command group.

Backus-Naur form definition

This manual may describe commands and queries using the Backus-Naur Form (BNF) notation. The next table defines the standard BNF symbols.
Table 2: Table: BNF symbols and meanings
Symbol
Meaning
< >
Defined element
:=
Is defined as
l
Exclusive OR
{ }
Group; one element is required
[ ]
Optional; can be omitted
. . .
Previous elements may be repeated
( )
Comment

Syntax and commands

Syntax and commands 8 AFG31000 Series Arbitrary Function Generator Programmer's Manual

Command and query structure

Commands consist of set commands and query commands. Commands change instrument settings or perform a specific action. Queries cause the instrument to return data and information about its status.
Most commands have both a set form and a query form. If the set form parameter has a minimum and maximum, it will also support a query.
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:BRIGhtness has a query form DISPlay:BRIGhtness?. 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 action. For example, the *CAL? 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 query. Command messages consist of five element types.
A command message is a command or query name, followed by any information the instrument needs to execute the command or query. Command messages consist of five element types.
Table 3: Commands, queries, and query response definitions
Commands:
Commands cause the instrument to perform a specific function or change one of its settings. Commands have the following structure:
[:]<Header>[<Space><Argument>[<Comma><Argument>]...]
Queries:
Queries cause the AFG to return information about its status or settings. Queries have the following structure:
[:]<Header>?
[:]<Header>?[<Space><Argument>[<Comma><Argument>]...]
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.
Query Responses:
When a query is sent to the AFG, only the values are returned. When the returned value is a mnemonic, it is noted in abbreviated format.
Syntax and commands AFG31000 Series Arbitrary Function Generator Programmer's Manual 9

Command message elements

Symbol
Meaning
<Header>
The basic command name. If the header ends with a question mark, the command is a query. The header may begin with a colon (:); 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 (*).
<Mnemonic>
A header subfunction. Some command headers have only one mnemonic. If a command header has multiple mnemonics, they are always separated from each other by a colon (:).
<Argument>
A quantity, quality, restriction, or limit associated with the header. Not all commands have an argument, while other commands have multiple arguments. Arguments are separated from the header by a <Comma>.
<Comma>
A single comma between arguments of multiple-argument commands. It may optionally have white space characters before and after the comma.
<Space>
A white space character between command header and argument. It may optionally consist of multiple white space characters.
The following figure shows the five command message elements.
Figure 4: Command message elements
Command entry
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 through 32 decimal).
The instrument ignores commands that consists of just a combination of white space
characters and line feeds.
Syntax and commands 10 AFG31000 Series Arbitrary Function Generator Programmer's Manual

SCPI commands and queries

The AFG 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 consistent programming environment for instrument control and data transfer. This environment uses defined 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 next figure that represents a subsystem. The top level of the tree is the root node; it is followed by one or more lower-level nodes.
Example of SCPI subsystem hierarchy tree
Figure 5: SCPI command structure
You can create commands and queries from these subsystem hierarchy trees. Commands specify actions for the instrument to perform. Queries return measurement data and information about parameter settings.
Creating commands
SCPI commands are created by stringing together the nodes of a subsystem hierarchy and separating each node by a colon.
In the previous figure, TRIGger is the root node and EVENt, GATed, INPut, and SOURce are lower-level nodes. To create a SCPI command, start 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 valid values for all parameters.
For example, TRIGger:EVENt:SOURce EXTernal is a valid SCPI command created from the hierarchy tree (see previous figure).
Creating queries
To create a query, start at the root node of a tree structure, move down to the end of a branch, and add a question mark, TRIGger:EVENt:SOURce? is an example of a valid SCPI query using the hierarchy tree in the next figure.
Syntax and commands AFG31000 Series Arbitrary Function Generator Programmer's Manual 11
Query responses
The query causes the AFG to return information about its status or settings. When a query is sent to the AFG, only the values are returned. When the returned value is a mnemonic, it is noted in abbreviated format, as shown in the next table.
Table 4: Query response examples
Symbol
Meaning
SOURce:PULSe:DCYcle?
50.0
OUTPut:POLarity?
NORM
Parameter types
Every parameter in the command and query descriptions is of a specified type. Parameters are indicated by angle brackets, such as <file_name>. There are several different types of parameters. The parameter type is listed after the parameter and is enclosed in parentheses, for example, (boolean). Some parameter types are defined specifically for the arbitrary or function generator command set and some are defined by SCPI.
Parameter types used in syntax descriptions
Parameter type
Description
Example
arbitrary block*
A specified length 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 numbers or values
ON or ≠ 0 OFF or 0
discrete
a LIST OF SPECIFIC VALUES
min, max
binary
Binary numbers
#B0110
octal
Octal numbers
#Q57, #Q3
hexadecimal**
Hexadecimal numbers (0-9, A, B, C, D, E, F)
#HAA, #H1 NR1** numeric
Integers
0, 1, 15, -1
NR2***, numeric
Decimal numbers
1.2, 3.141516, -6.5
NR3** numeric
Floating point numbers
3.1415E-9, -16.1E5
NRf** numeric
Flexible decimal number that may be type NR1, NR2 or NR3
See NR1, NR2, and NR3 examples
string****
Alphanumeric characters (must be within quotation marks)
"Testing 1, 2, 3"
*
Defined in ANSI/IEEE 488.2 as "Definite Length Arbitrary Block Response Data."
**
An ANSI/IEEE 488.2-1992-defined parameter type.
***
Some commands and queries will accept an octal or hexadecimal value even though the parameter type is
defined as NR1.
****
Defined 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 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.
Syntax and commands 12 AFG31000 Series Arbitrary Function Generator Programmer's Manual
Abbreviating commands, queries, and parameters
You can abbreviate most SCPI commands, 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 next figure, 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 instrument.
Figure 6: Example of abbreviating a command
NOTE. The numeric suffix of a command or query may be included in either the long form or short form; the AFG will default to "1" if no suffix is used.
Chaining commands and queries
You can chain several commands or queries together into a single message. To create a chained message, first create a command or query, add a semicolon (;), and then add more commands or queries and semicolons until the message is complete. If the command following a semicolon is a root node, precede it with a colon (:). The next figure 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.
Figure 7: Chaining commands and queries
Syntax and commands AFG31000 Series Arbitrary Function Generator Programmer's Manual 13
If a command or query has the same root and lower-level nodes as the previous command or query, you can omit these nodes. In the next figure, the second command has the same root node (TRIGger:SEQuence) as the first command, so these nodes can be omitted.
Figure 8: Example of omitting root and lower-level nodes in a chained message
Syntax and commands 14 AFG31000 Series Arbitrary Function Generator Programmer's Manual
Unit and SI prefix
If the decimal numeric argument refers to amplitude, frequency, or time, you can express it using the International System of Units (SI) instead of 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.
Table 5: Available units
Symbol
Meaning
dB
decibel (relative amplitude)
dBm
decibel (absolute amplitude)
DEG
degree (phase)
Hz
hertz (frequency)
PCT
percent (%)
s
second (time)
V
volt
Table 6: Available SI prefixes
SI prefix
Corresponding power
Z
10
-21
A
10
-18
F
10
-15
P
10
-12
N
10-9 U 10-6
M
10-3 K 10+3
MA1
10+6 G 10+9
T
10
+12
PE
10
+15
EX
10
+18
When the unit is "Hz", "M" may be used instead of "MA" so that the frequency can be represented by "MHz".
You can omit a unit in a command, but you must include the unit when using the SI prefix. For example, frequency of 15 MHz can be described as follows:
15.0E6, 1.5E7 Hz, 15000000, 15000000 Hz, 15MHz, etc. ("15 M" is not allowed.)
You can use either lower or upper case units and prefixes. The next examples have the same result, respectively.
170 mHz, 170 mHz, 170 MHz, etc. 250 mv, 250 mV, 250 MV, etc.
Syntax and commands AFG31000 Series Arbitrary Function Generator Programmer's Manual 15
General rules for using SCPI commands
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
NOTE. Literal strings (quoted) are case sensitive, for example, file names.
No embedded spaces are allowed between or within nodes.
correct :OUTPUT:FILTER:LPASS:FREQUENCY 200MHZ incorrect :OUTPUT: FILTER: LPASS:FREQUENCY 200MHZ

IEEE 488.2 common commands

ANSI/IEEE Standard 488.2 defines the codes, formats, protocols, and usage of common commands and queries used on the interface between the controller and the instruments. The AFG complies with this standard.
Command and query structure
The syntax for IEEE 488.2 common commands (on page 15) is an asterisk (*) followed by a command and, optionally, a space and parameter value. The syntax for an IEEE 488.2 common query is an asterisk (*) followed by a query and a question mark. All of the common commands and queries are listed in the Command groups (on page 16) and Command descriptions (on page 27). The following are examples of common commands:
*ESE 16 *CLS
The following are examples of common queries:
*ESR? *IDN?
Syntax and commands 16 AFG31000 Series Arbitrary Function Generator Programmer's Manual

Command groups

Header
Description
*CAL? (on page 29)
Perform self-calibration and return result status
CALibration[:ALL] (on page 30)
Perform self-calibration
DIAGnostic[:ALL] (on page 31)
Perform self-test
*TST? (on page 171)
Perform self-test and return result status
Header
Description
Display:BRIGhtness (on page 32)
Set or query the LCD display brightness
DISPlay:SAVer:IMMediate (on page 32)
Set screen saver
DISPlay:SAVer[:STATe] (on page 33)
Set or query the screen saver settings
Set or query the text message display
DISPlay[:WINDow]:TEXT:CLEar (on page 34)
Delete text message
This section lists the commands organized by functional group. The Command Descriptions section lists all commands alphabetically.

Calibration and diagnostic commands

Calibration and Diagnostic commands let you initiate the instrument self-calibration routines and examine the results of diagnostic tests. The following table describes the calibration and diagnostic commands.

Display commands

Display commands let you change the graticule style, displayed brightness, and other display attributes. The next table lists and describes Display commands.
DISPlay[:WINDow]:TEXT[:DATA(on page 33)
Syntax and commands AFG31000 Series Arbitrary Function Generator Programmer's Manual 17

Mass memory commands

Mass memory commands let you change mass memory attributes. The following table lists and describes Mass Memory commands.
The instrument stores waveforms and setups to the USB drive or internal flash memory. That means the commands must identify the full path including the drive letter and the folder path; a virtual disk is used.
Virtual Disk:
U: USB mass memory M: Internal flash mass memory P: Internal flash mass memory where predefined waveforms are stores, This is read-only
storage.
For example, MMEMORY:DELETE “U:/TEK001.TFWX, deletes TEK001.TFWX in the USB memory root folder.
And relative folder is supported, for example:
MMEMory:CDIRectory “U:/” MMEMORY:DELETE “TEK001.TFWX”
The above two commands produce the same results as
MMEMORY:DELETE “U:/TEK001.TFWX.”
Header
Description
MMEMory:CATalog? (on page 49)
Query the status of mass memory
MMEMory:CDIRectory (on page 50)
Set/query current directory
MMEMory:DELete (on page 50)
Delete file or directory in mass memory
MMEMory:LOAD:STATe (on page 52)
Copy instrument setting in mass memory to setup memory
MMEMory:LOAD:TRACe (on page 52)
Copy waveform data file in mass memory to edit memory
MMEMory:LOCK[:STATe] (on page 53)
Set/query the lock of mass memory overwrite and deletion
MMEMory:MDIRectory (on page 53)
Create directory in mass memory
MMEMory:STORe:STATe (on page 54)
Save the setup memory status to mass memory
MMEMory:STORe:TRACe (on page 55)
Save waveform data file in edit memory to mass memory
MMEMory:OPEN:SEQuence (on page 56)
Loads a single desired sequence from a file
MMEMory:SAVE:SEQuence (on page 57)
Exports a sequence given a unique name to an eligible storage location as a .SEQ file type.
RECALL:SETUp (on page 64)
Load a settings file in mass memory
SAVe:SETUp (on page 66)
Save a settings file to msss memory
Syntax and commands 18 AFG31000 Series Arbitrary Function Generator Programmer's Manual

Memory commands

Memory commands let you change setup memory attributes. The next table lists and describes Memory commands.
Header
Description
MEMory:STATe:DELete (on page 45)
Delete the setup memory
MEMory:STATe:LOCK (on page 46)
Set or query the lock of setup memory overwrite and deletion
MEMory:STATe:RECall:AUTo (on page 47)
Set or query the recall of last set memory
MEMory:STATe:VALid? (on page 48)
Query the availability of setup memory
*RCL (on page 64)
Recall instrument setting from setup memory
*SAV (on page 65)
Save instrument setting to setup memory

Output commands

Output commands let you set output attributes. The next table lists and describes Output commands.
Header
Description
OUTPut[1|2]:IMPedance (on page 59)
Set or query impedance
OUTPut[1|2]:POLarity (on page 60)
Set or query polarity
OUTPut[1|2][:STATe] (on page 61)
Set or query output on or off
OUTPut:TRIGger:MODE (on page 62)
Set or query the mode of Trigger Output
Loading...
+ 181 hidden pages