AFG1022 Arbitrary Function Generator Programmer Manual
AFG1022 Arbitrary Function Generator Programmer Manual
*P077105700*
077-1057-00
AFG1022
Arbitrary Function Generator
Programmer Manual
www.tektronix.com
077-1057-00
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
Tektronix, Inc.
14150 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA
USB (type B)
connector
Using TekVISA
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 USB
instrument interface locally.
Installation Use an internet browser to access the Tektronix Web site (www.tektronix.com)
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 on TekVISA concepts and operations are explained in the
TekVISA Programmer Manual that can be also found on the Tektronix Web site.
Commands Commands cause the instrument to perform a specific function or change one of
its settings. Commands have the structure:
[:]<Header>[<Space><Argument>[<Comma><Argument>]...]
Queries Queries cause the instrument to return information about its status or settings.
Queries have the structure:
[:]<Header>?
[:]<Header>?[<Space><Argument>[<Comma><Argument>]...]
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 instrument, only the values are returned. When the
returned value is a mnemonic, it is noted in abbreviated format.
Creating Commands SCPI commands are created by stringing together the nodes of a subsystem
hierarchy and separating each node by a colon.
To create a SCPI command, start with the root node 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.
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.
Query Responses The query causes the instrument to return information about its status or settings.
When a query is sent to the instrument, only the values are returned. When the
returned value is a mnemonic, it is noted in abbreviated format.
Parameter Types Every parameter in the command and query descriptions is of a specified type.
(See Table 3.) The parameters are enclosed in brackets, such as <value>.
The parameter type is listed after the parameter and is enclosed in parentheses,
for example, (boolean). Some parameter types are defined specifically for the
instrument command set and some are defined by SCPI.
Special Characters The Line Feed (LF) character or the New Line (NL) character (ASCII 10), and all
characters in the range of ASCII 127-255 are defined as special characters. These
characters are used in arbitrary block arguments only; using these characters in
other parts of any command yields unpredictable results.
Abbreviating Commands, You can abbreviate most SCPI commands, queries, and parameters to an accepted
Queries, and Parameters 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 figure, 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.
NOTE: The numeric suffix of a command or query may be included in either the
long form or short form; the instrument will default to "1" if no suffix is used.
Chaining Commands and You can chain several commands or queries together into a single message. To
Queries 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 single chained message should end in a command or query, not a
semicolon. Responses to any queries in your message are separated by
semicolons.
If a command or query has the same root and lower-level nodes as the previous
command or query, you can omit these nodes.
Unit and SI Prefix If the decimal numeric argument refers to amplitude, frequency, or time, you can
express it using SI units 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, 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.
You can omit a unit in a command, but you must include the unit when using a SI
prefix. For example, frequency of 15 MHz can be described as follows
15.0E6, 1.5E7Hz, 15000000, 15000000Hz, 15MHz, etc.
("15M" is not allowed.)
General rules for using Here are three general rules for using SCPI commands, queries, and parameters:
SCPI commands 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.
SOURCE1:FREQUENCY 10MHZ
is the same as
source1:frequency 100mhz
and
SOURCE1:frequency 10MHZ
NOTE: Literal strings (quoted) are case sensitive, for example, file names.
Command and Query The syntax for an IEEE 488.2 common command is an asterisk (*) followed by a
Structure 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 last part of the Syntax
and Commands section. The following are examples of common commands:
*CLS
The following are examples of common queries
*IDN?
Mass Memory Commands Mass Memory commands let you change mass memory attributes. The
following table lists and describes the Mass Memory commands.
Output Commands Output commands let you set output attributes. The following table lists and
describes the Output commands.
Source Commands Source commands let you set waveform output parameters. The following table
lists and describes the Source commands.
Status Commands Status commands let you determine the status of the instrument. The following
table lists and describes the Status commands.
System Commands System commands let you control miscellaneous instrument functions. The
following table lists and describes the System commands.
Synchronization Commands Synchronization commands let you synchronize the operation of the
instrument. The following table lists and describes the Synchronization
commands.
Trace Commands Trace commands let you set the edit memory and user waveform memory. The
following table lists and describes the Trace commands.
Group Status
Syntax *CLS
Arguments None
Examples *CLS
Group System
Syntax *IDN?
Arguments None
where:
<Manufacturer>::= TEKTRONIX
<Model>::={AFG1022}
<Serial Number>
<Firmware Level>
Examples *IDN?
TEKTRONIX,AFG1022,1331030,V1.24
Syntax MMEMory:CATalog?
Arguments None
Returns <NR1>,<NR1>[,<file_name>,<file_type>,<file_size>]...
where:
The first <NR1> indicates that the total amount of storage currently used, in bytes.
The second <NR1> indicates that the free space of mass storage, in bytes.
<file_name> is the name of directory or file. If the name exceeds 22 characters in
length, it will be shortened to 8 characters (without suffix) in 8.3 name format.
<file_type> is DIR for directory, otherwise it is blank.
<file_size> is the size of the file, in bytes. This value will be 0 for directory.
Examples The USB memory includes the Case and PWS4000-Main-CPU-Update folders, a
SAMPLE1.tfw file, and a Test.zip file. The directory name PWS4000-Main-CPU-
Update will be shortened to PWS400~1.
MMEMory:CATalog? might return the following response:
32751616,27970560,"Case,DIR,0","PWS400~1,DIR,0",”SAMPLE1.tfw,
,5412”,”Test.zip,,1735”
MMEMory:CDIRectory
This command changes the current working directory in the mass storage system.
Returns <directory_name>::=<string>
Arguments <file_name>::=<string> specifies a file to be deleted and should include full path.
Group System
Syntax *OPT?
Arguments None
Returns <OPT>[,<OPT>[,<OPT>[,<OPT>]]]
Examples *OPT?
OUTPut[1|2][:STATe]
This command sets or query the instrument output state for the specified
channel.
Group Output
Returns <NR1>
Examples OUTPut1:STATe ON
sets the instrument CH 1 output to ON.
Group System
Syntax *RST
Arguments None
Examples *RST
[SOURce1]:AM:STATe
This command enables or disables AM modulation for the specified channel. The
query command returns the state of AM modulation.
Group Source
Returns <NR1>
Examples SOURce1:AM:STATe ON
[SOURce1]:BURSt:MODE
This command sets or queries the burst mode for the specified channel.
Group Source
Arguments TRIGgered means that triggered mode is selected for burst mode.
GATed means that gated mode is selected for burst mode.
Returns TRIG|GAT
[SOURce1]:BURSt:NCYCles
This command sets or queries the number of cycles (burst count) to be output in
burst mode for the specified channel. The query command returns 9.9E+37 if the
burst count is set to INFinity.
Group Source
Arguments <cycles>::=<NRf>
where:
<NRf> is the burst count. The burst count ranges from 1 to 50,000.
INFinity sets the burst count to infinite count.
MINimum sets the burst count to minimum count.
MAXimum sets the burst count to maximum count.
Returns <cycles>
Examples SOURce1:BURSt:NCYCles 2
[SOURce1]:BURSt:STATe
This command enables or disables the burst mode for the specified channel. The
query command returns the state of burst mode.
Group Source
Returns <NR1>
Examples SOURce1:BURSt:STATe ON
[SOURce1]:FM:STATe
This command enables or disables FM modulation. The query command returns
the state of FM modulation.
Group Source
Returns <NR1>
Examples SOURce1:FM:STATe ON
[SOURce[1|2]]:FREQuency:CONCurrent[:STATe]
This command enables or disables the function to copy the frequency (or period)
of one channel to another channel.
When the concurrent copy function is enabled, the FreqLock function is also
enabled automaticlly. You can use general knob to adjust frequency (or period) of
the two channels sychronously.
Group Source
Syntax [SOURce[1|2]]:FREQuency:CONCurrent
{ON|OFF|<NR1>}
[SOURce[1|2]]:FREQuency:CONCurrent?
Returns <NR1>
Examples SOURce1:FREQuency:CONCurrent ON
copies the frequency value of CH 1 to CH 2.
[SOURce[1|2]]:FREQuency[:CW|:FIXed]
This command sets or queries the frequency of output waveform for the specified
channel. This command is available when the Run Mode is set to other than
Sweep.
The setting range of output frequency depends on the type of output waveform. If
you change the type of output waveform, it might change the output frequency
because changing waveform types impacts on the setting range of output
frequency. The resolution is 1 μHz or 12 digits. For more information on the
setting range, refer to the AFG1022 Arbitrary Function Generator
Specifications and Performance Verification Technical Reference.
Group Source
Arguments <frequency>::=<NRf>[<units>]
where:
<NRf> is the output frequency.
Returns <frequency>
sets the CH 1 output frequency to 500 kHz when the Run Mode is set to other
than Sweep.
[SOURce1]:FREQuency:MODE
This command sets or queries the frequency sweep state. You can select sine,
square or ramp waveform for sweep.
Group Source
Returns CW|FIXed|SWEep
[SOURce1]:FSKey:STATe
This command enables or disables FSK modulation. The query command returns
the state of FSK modulation. You can select a sine, square, ramp, or arbitrary
waveform as the carrier waveform.
Group Source
Returns <NR1>
Examples SOURce1:FSKey:STATe ON
[SOURce[1|2]]:FUNCtion:EFILe
This command sets or queries an EFILe name used as an output waveform. A file
name must be specified in the mass storage system. This command returns “ ” if
there is no file in the mass storage.
Group Source
Arguments <file_name>::=<string> specifies a file name in the mass storage system. The
<file_name> includes path. Path separators are forward slashes (/).
Returns <file_name>
[SOURce[1|2]]:FUNCtion[:SHAPe]
This command sets or queries the shape of the output waveform. When the
specified user memory is deleted, this command causes an error if you select
the user memory.
Group Source
NOTE: The arguments defined in <Built_in> can not be abbreviated, all the
upper and lower case letters are needed.
The following table shows the combination of modulation type and the shape of
output waveform.
If you specify EFILe when there is no EFILe or the EFILe is not yet defined,
this command causes an error.
If you change the type of output waveform, it might change the output frequency
because changing waveform types impacts the setting range of output frequency.
USER[0]|USER1|…|USER255|EMEMory
A user defined waveform saved in the user waveform memory or the
EMEMory can be selected as an output waveform.
EFILe
EFILe is specified as an output waveform.
Returns SIN|SQU|PULS|RAMP|PRN|<Built_in>|
USER0|USER1|…|USER255|EMEMory|EFILe
[SOURce[1|2]]:PHASe[:ADJust]
This command sets or queries the phase of output waveform for the specified
channel. You can set the value in radians or degrees. If no units are specified, the
default is RAD. The query command returns the value in RAD.
This command is supported when the FreqLock function is enabled. You can
enable the FreqLock function using the
[SOURce[1|2]]:FREQuency:CONCurrent[:STATe] command.
Group Source
Arguments <phase>::=<NR3>[<units>]
where:
Returns <phase>
[SOURce1]:PM:STATe
This command enables or disables PM modulation. The query command returns
the state of PM modulation. You can select a sine, square, ramp, or arbitrary
waveform as the carrier waveform.
Group Source
Returns <NR1>
Examples SOURce1:PM:STATe ON
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:OFFSet
This command sets or queries the offset level for the specified channel.
Group Source
Syntax [SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:OFFSet
{<voltage>|MINimum|MAXimum}
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:OFFSet?
{MINimum|MAXimum}
Arguments <voltage>::=<NRf>[<units>]
where:
<NRf> is the offset voltage level.
<units>::=[mV | V]
Returns <voltage>
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]
This command sets or queries the output amplitude for the specified channel.
You can set the units of output amplitude by using the bezel menu selection.
Group Source
Syntax [SOURce[1|2]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]
{<amplitude>|MINimum|MAXimum}
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]?
{MINimum|MAXimum}
Arguments <amplitude>::=<NRf>[<units>]
where:
<NRf> is the output amplitude.
<units>::=[Vpp]
Returns <amplitude>
Group System
Syntax SYSTem:ERRor[:NEXT]?
Arguments None
<Error/event description>::=<string>
Examples SYSTEM:ERROR:NEXT?
If the instrument detects an error or an event occurs, the event number and event
message will be returned.
Group Trace
Syntax TRACe|DATA:CATalog?
Arguments None
Returns <string>
Examples TRACE|DATA:CATALOG?
Group Trace
Arguments <trace_name>::={USER[0]|USER1|…|USER255}
This command is invalid when <trace_name> is being output.
copies the waveform data in the edit memory to the user waveform memory
USER0.
DATA:COPY EMEMory,USER0
copies the waveform data in the user waveform memory USER0 to the edit
memory.
TRACe|DATA[:DATA]
This command transfers the waveform data from the external controller to the edit
memory in the instrument. The query command returns the binary block data.
Group Trace
Arguments <binary_block_data>
where <binary_block_data> is the waveform data in binary format.
Returns <binary_block_data>
transmits a waveform to the edit memory in the instrument. The block data
element #42000 indicates that 4 is the number of digits in 2000 (byte count) and
the 2000 bytes of binary data are to be transmitted.
TRACe|DATA[:DATA]:VALue
This command sets or queries the data value at the specified point in the edit
memory.
Group Trace
Arguments <point>::=<NR1>
where:
where:
<NR1> is the data value for the specified point number.
Returns <NR1>
sets the data value to 2047 for the point number 500 in the edit memory.
DATA:DATA:VALue? EMEMory,500
TRACe|DATA:POINts
This command sets or queries the number of data points for the waveform created
in the edit memory.
Group Trace
Arguments <points>::=<NR1>
where
<NR1> sets the number of points for the waveform created in the edit memory
that ranges from 2 to 8192.
Returns <NR1>
Group Synchronization
Syntax *WAI
Arguments None
Examples *WAI
prevents the instrument from executing any further commands or queries until all
pending commands that generate an OPC message are complete.
R
*RST, 17
S
[SOURce1]:AM:STATe, 18
[SOURce1]:BURSt:MODE, 18
[SOURce1]:BURSt:NCYCles, 19
[SOURce1]:BURSt:STATe, 19
[SOURce1]:FM:STATe, 20
[SOURce1]:FREQuency:MODE, 22
[SOURce[1|2]]:FREQuency:CONCurrent[:STATe], 20
[SOURce[1|2]]:FREQuency[:CW|:FIXed], 21
[SOURce1]:FSKey:STATe, 23
[SOURce[1|2]]:FUNCtion:EFILe, 23
[SOURce[1|2]]:FUNCtion[:SHAPe], 24
[SOURce[1|2]]:PHASe[:ADJust], 25
[SOURce1]:PM:STATe, 26
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]:
OFFSet, 26
[SOURce[1|2]]:VOLTage[:LEVel][:IMMediate]
[: AMPLitude], 27