RIGOL is registered trademark of RIGOL Technologies, Inc.
Notices
RIGOL products are protected by patent law in and outside of P.R. China.
RIGOL Technologies, Inc. reserves the right to modify or change part of or all
the specifications and pricing policies at company’s sole decision.
Information in this publication replaces all previously corresponding material.
RIGOL shall not be liable for losses caused no matter by incidental or by
consequential in connection with the furnishing, use or performance of this
manual as well as any information contained.
Any part of this document is forbidden to copy, photocopy or rearrange without
the express written approval of RIGOL.
Product Certification
RIGOLguarantees this product conforms to the standards of national and industrial.
Meanwhile, the related standards conform to other ISO will get further. At present,
DG1022 has passed CE, GOST and cTUVus certification.
Programming Guide for DG1022
RIGOL
II
Structure of this Document
Chapter 1 Programming Overview
This chapter introduces you how to programme DG1022 generator using commands
and how to input the commands in right format.
Chapter 2 DG1022 Commands System
This chapter gives detailed information on each command supported by DG1022,
including command format, function description, considerations when using command
as well as some application examples.
Chapter 3 Application Examples
This chapter shows you how to realize the examples in《DG1022 User’s Guide》via
command lines.
Appendix: Commands Reference A-Z
The Appendix lists all the commands alphabetically in favor of quick reference.
This chapter introduces you how to programme DG1022 generator using commands
and how to input commands in right format.
This chapter contains the following sections:
Communication Interfaces
Commands Introduction
Commands Format
Symbol Instruction
Parameter Types
Commands Abbreviation
Programming Guide for DG1022
RIGOL Programming Overview
1-2
Communication Interfaces
Computers communicate with the generator by sending and receiving messages over
an USB interface. Command word is sended and identified in the form of ASCII
character strings for users to easily control and do user-defined development.
Operations that you can do with a computer and a generator include:
Set the generator.
Output waveforms from the generator.
Connection:
Please connect the USB Device port of DG1022 with the corresponding USB interface
on the computer using an USB cable.
Programming Guide for DG1022
Programming Overview RIGOL
1-3
Commands Introduction
Commands Format
The commands system of DG1022 is a tree structure, and each of sub-system is
consists of a “root” keyword and multilayered keywords. The keywords are separated
by “:” and aoptional parameters are permitted to follow; “?” appeared following a
command line denotes to query this function; besides, “space” is used to divide
command and parameter.
For example:
FUNCtion:SQUare:DCYCle {<percent>|MINimum|MAXimum}
FUNCtion:SQUare:DCYCle? [MINimum|MAXimum]
FUNCtion is the root keyword of a commmand line, SQUare and DCYCle is the
second and third keyword, all of them are separated by “:”. <percent> denotes the
parameters permitted to be set by user; “?” denotes to query; the command
FUNCtion:SQUare:DCYCle and parameter are separated by “space”.
“,” is usually used to compart multiple parameters existed in one command, for
example:
DATA VOLATILE,<value>,<value>, . . .
Programming Guide for DG1022
RIGOL Programming Overview
1-4
Symbol Instruction
Following symbols are not included in commands, but whichi are usually used to assist
to explain the parameters containd in a command line.
1. Braces { }
The parameters or contents enclosed in a { } are reqired. Only one content or
parameter could be selected every time, and all the options are separated by “|”.
For example: {ON|OFF} indicateds that ON or OFF can be selected.
2. Square brackets [ ]
Some keywords or contents are enclosed by square bracket [ ], which indicates
that those parameters are optional and will be execute no matter whether been
ignored or not.
For example:
DATA:COPY <destination arb name>[,VOLATILE]
This command copys the wave from volatile memory to the specified nonvolatile
memory. Note: [,VOLATILE] may be ignored.
3. Triangle Brackets < >
An item enclosed in < > should be replaced by an effective value.
For example:
DISPlay:CONTRAST <value>
Note: <value> must be a numerical value, such as:
DISPlay:CONTRAST 25
Programming Guide for DG1022
Programming Overview RIGOL
1-5
Parameter Types
The commands contain 5 kinds of parameters, different parameters have different
setting methods.
1. Boolean Parameters
The parameters could be “OFF”, “ON” or “0”, “1”, for example:
AM:STATE {OFF|ON}
“OFF” denotes disable AM function. “On” denotes enable.
2. Consecutive Integer Parameters
The parameters could be a consecutive integer, for example:
DISPlay:CONTRAST <value>
<value> could be an integer between 0 and 31(including 0 and 31).
3. Consecutive Real Number Parameters
The parameters could be any value only in effective range and precision
permitted, for example:
FREQuency {<frequency>|MINimum|MAXimum}
As a sine wave, <frequency> should be any real number between 1uHz~20MHz.
4. Discrete Parameters
The parameters could be a cited value, for example,
MEMory:STATe:NAME? {0|1|2|3|4|5|6|7|8|9|10}
The parameter could only be 0, 1, 2, 3, 4, 5, 6. 7, 8, 9, 10.
5. ASCII Character String
The parameters should be composed of ASCII character string, for example,
DATA:COPY <destination arb name>[,VOLATILE]
<destination arb name> is a character string defined by user.
Programming Guide for DG1022
RIGOL Programming Overview
1-6
Commands Abbreviation
All the comands are case-insensitive, so you can use any kind of them. But if use
abbreviation, the capital letters specified in commands must be written completely.
For example:
FUNCtion:SQUare:DCYCle? also can be:
FUNC:SQU:DCYC? or func:squ:dcyc?
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-1
Chapter 2 DG1022 Commands System
This chapter gives detailed information on each command supported by DG1022,
including command format, function description, using considerations as well as some
application examples.
DG1022 contains following subcommands systems:
IEEE 488.2
APPLy
FUNCtion
FREQuency
VOLTage
OUTPut
PULSe
AM
FM
PM
FSKey
SWEep
TRIGger
BURSt
DATA
MEMory
SYSTem
PHASe
DISPlay
COUPling
Programming Guide for DG1022
RIGOL DG1022 Commands System
2-2
1. *IDN?
Command Format
*IDN?
Function
Query ID character string of instrument, including a field
separated by 4 “,”, manufactory, model, serial number and the
edition number that consists of numbers and separated by
“.” .
Return Format
RIGOL TECHNOLOGIES,DG1022,DG1000000002,
00.01.00.04.00
IEEE 488.2
IEEE standard has some common commands for querying some basic information
about instrument or executing, which usually begins with “*” and holds 3-character
long command keyword.
DG1022 supports following IEEE488.2 commands:
1. *IDN?
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-3
APPLy
APPLy commands provide the most straightforward method to program the
generator over remote interface. Among following commands, the instrument could
set and output waveforms if OUTPUT function is enable.
Generate an arbitrary wave selected by FUNCtion:USER:CH2
command with specific frequency, amplitude and DC offset.
Explanations
If the parameters you set are less than three, the sequence
would be: <frequency>, <amplitude>, <offset>.
The default units of <frequency>, <amplitude>, <offset> are:
Hz, Vpp, VDC.
Example
APPL:USER:CH2 1000,5.0,-1.5
16. APPLy:CH2?
Command
Format
APPLy:CH2?
Function
Query the current configuration of CH2 and the type of waves
outputted.
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-9
Explanations
The query returns a character string with double quotation marks,
including function, frequency, amplitude and offset.
Example
CH2:"SIN,1.000000e+03,5.000000e+00,-1.500000e+00"
Programming Guide for DG1022
RIGOL DG1022 Commands System
2-10
FUNCtion
FUNCtion commands are used for setting the output function and their parameters;
selecting carrier wave function in modulation mode; choosing any one from 48 built-in
arbitrary waveforms and 10 user-defined waveforms, or the waveform downloaded to
volatile memory currently.
DG1022 supports following FUNCtion commands:
1. FUNCtion
2. FUNCtion?
3. FUNCtion:USER
4. FUNCtion:USER?
5. FUNCtion:SQUare:DCYCle
6. FUNCtion:SQUare:DCYCle?
7. FUNCtion:RAMP:SYMMetry
8. FUNCtion:RAMP:SYMMetry?
9. FUNCtion:CH2
10. FUNCtion:CH2?
11. FUNCtion:USER:CH2
12. FUNCtion:USER:CH2?
13. FUNCtion:SQUare:DCYCle:CH2
14. FUNCtion:SQUare:DCYCle:CH2?
15. FUNCtion:RAMP:SYMMetry:CH2
16. FUNCtion:RAMP:SYMMetry:CH2?
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-11
1. FUNCtion
Command
Format
FUNCtion {SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER}
Function
Select the output function for CH1.
Explanations
If send FUNC DC and then FUNC USER, the output is still DC.
Example
FUNC SIN
2. FUNCtion?
Command
Format
FUNCtion?
Function
Query the output function from CH1.
Explanations
The query always returns CH1:ARB after sending FUNC DC or FUNC
USER.
Example
The query returns CH1:SIN, CH1:SQU, CH1:RAMP, CH1:PULS,
CH1:NOIS or CH1:ARB, the default is CH1:SIN.
3. FUNCtion:USER
Command
Format
FUNCtion:USER {<name of arbitrary wave>|VOLATILE}
Function
Separately select any one wave from built-in arbitrary waves and 10
user-defined waves for CH1 or select the wave that has been
downloaded into volatile memory.
Send FUNC DC command when use DC.
Abbreviation is invalid.
Example
FUNC:USER VOLATILE
4. FUNCtion:USER?
Command
Format
FUNCtion:USER?
Function
Query the name of arbitrary wave generated from CH1.
Return
Value
The query returns the name of built-in arbitrary wave that has been
selected. (such as EXP_RISE), VOLATILE or returns any name of
user-defined wave in nonvolatile memory. The default is EXP_RISE.
5. FUNCtion:SQUare:DCYCle
Command
Format
FUNCtion:SQUare:DCYCle {<percent>|MINimum|MAXimum}
Function
Set the duty cycle of square wave for CH1.
Explanations
<percent> is the percent of duty cycle selected, MIN is the
minimum duty cycle and MAX is the maximum.
Example
FUNC:SQU:DCYC 50
6. FUNCtion:SQUare:DCYCle?
Command
Format
FUNCtion:SQUare:DCYCle? [MINimum|MAXimum]
Function
Query the duty cycle of square wave from CH1.
Return
Value
The query returns current duty cycle settings with the format of
percent, such as 50.000000.
7. FUNCtion:RAMP:SYMMetry
Command
Format
FUNCtion:RAMP:SYMMetry {<percent>|MINimum|MAXimum}
Function
Set the symmetry of ramp wave for CH1.
Explanations
<percent> is the selected percent of symmetry; MIN=0%, MAX=
100%.
Example
FUNC:RAMP:SYMM 50
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-13
8. FUNCtion:RAMP:SYMMetry?
Command
Format
FUNCtion:RAMP:SYMMetry? [MINimum|MAXimum]
Function
Query the symmetry of ramp wave from CH1.
Return
Value
The query returns current symmetry settings with the format of
percent, such as 50.000000.
9. FUNCtion:CH2
Command
Format
FUNCtion:CH2 {SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER}
Function
Select the output function form CH2.
Explanations
If send FUNC:CH2 DC and then FUNC:CH2USER, the output is
still DC.
Example
FUNC:CH2 SIN
10. FUNCtion:CH2?
Command
Format
FUNCtion:CH2?
Function
Query the output function from CH2.
Explanations
The query always returns CH2:ARB after sending FUNC:CH2 DC or
FUNC:CH2 USER.
Example
The query returns CH2:SIN, CH2:SQU, CH2:RAMP, CH2:PULS,
CH2:NOIS or CH2:ARB, the default is CH2:SIN.
11. FUNCtion:USER:CH2
Command
Format
FUNCtion:USER:CH2 {< name of arbitrary wave >|VOLATILE}
Function
Separately select any one wave from built-in arbitrary waves and 10
user-defined waves for CH2 or select the wave that has been
loaded into volatile memory.
Send FUNC:CH2 DC command when use DC.
Abbreviation is invalid.
Example
FUNC:USER:CH2 SINC
12. FUNCtion:USER:CH2?
Command
Format
FUNCtion:USER:CH2?
Function
Query the name of arbitrary wave generated from CH2.
Return
Value
The query returns the name of built-in arbitrary wave that has been
selected. (such as EXP_RISE), VOLATILE or returns any name of
user-defined wave in nonvolatile memory. The default is EXP_RISE.
13. FUNCtion:SQUare:DCYCle:CH2
Command
Format
FUNCtion:SQUare:DCYCle:CH2 {<percent>|MINimum|MAXimum}
Function
Set the duty cycle of square wave for CH2.
Explanations
<percent> is the selected percent of duty cycle, MIN is the
minimum duty cycle and MAX is the maximum.
Example
FUNC:SQU:DCYC:CH2 50
14. FUNCtion:SQUare:DCYCle:CH2?
Command
Format
FUNCtion:SQUare:DCYCle:CH2? [MINimum | MAXimum]
Function
Query the duty cycle of square wave from CH2.
Return
Value
The query returns current duty cycle settings with the format of
percent, such as 50.000000.
<percent> is the selected percent of symmetry; MIN=0%, MAX=
100%.
Example
FUNC:RAMP:SYMM:CH2 50
16. FUNCtion:RAMP:SYMMetry:CH2?
Command
Format
FUNCtion:RAMP:SYMMetry:CH2? [MINimum|MAXimum]
Function
Query the symmetry of ramp wave from CH2.
Return
Value
The query returns current symmetry settings with the format of
percent, such as 50.000000.
Programming Guide for DG1022
RIGOL DG1022 Commands System
2-16
FREQuency
FREQuency commands are used for setting: the frequency of output function from
dual channels; the start/stop frequency, the center/span frequency in sweep mode,
the carrier frequency in modulation. Sweep and modulation are only valid for CH1.
DG1022 supports following FREQuency commands:
1. FREQuency
2. FREQuency?
3. FREQuency:CH2
4. FREQuency:CH2?
5. FREQuency:STARt
6. FREQuency:STARt?
7. FREQuency:STOP
8. FREQuency:STOP?
9. FREQuency:CENTer
10. FREQuency:CENTer?
11. FREQuency:SPAN
12. FREQuency:SPAN?
Programming Guide for DG1022
DG1022 Commands System RIGOL
2-17
1. FREQuency
Command
Format
FREQuency {<frequency>|MINimum|MAXimum}
Function
Set the frequency of output function for CH1.
Explanations
<frequency> is the frequency value set by user, the default unit is
Hz. MIN is the minimum frequency permitted by specified function,
MAX is the maxmum.
Example
FREQ MIN
2. FREQuency?
Command
Format
FREQuency? [MINimum|MAXimum]
Function
Query the frequency of output function from CH1.
Return Value
The query returns the frequency value that has been set in the
form of scientific notation in Hz, such as: 1.000000e-06.
3. FREQuency:CH2
Command
Format
FREQuency:CH2 {<frequency>|MINimum|MAXimum}
Function
Set the frequency of output function for CH2.
Explanations
<frequency> is the frequency value set by user, the default unit is
Hz. MIN is the minimum frequency permitted by specified function,
MAX is the maxmum.
Example
FREQ:CH2 MIN
4. FREQuency:CH2?
Command
Format
FREQuency:CH2? [MINimum|MAXimum]
Function
Query the frequency of output function from CH2.
Return Value
The query returns the frequency value that has been set in the
form of scientific notation in Hz, such as: CH2:1.000000e-06.
5. FREQuency:STARt
Command
Format
FREQuency:STARt {<frequency>|MINimum|MAXimum}
The detailed information of each command are:
Programming Guide for DG1022
RIGOL DG1022 Commands System
2-18
Function
Set the start frequency (used in conjunction with the stop
frequency) in sweep mode.
Example
FREQ:STAR MIN
6. FREQuency:STARt?
Command
Format
FREQuency:STARt? [MINimum|MAXimum]
Function
Query the start frequency in sweep mode.
Return Value
The query returns the start frequency that has been set in the form
of scientific notation in Hz, such as: 1.000000e-06.
7. FREQuency:STOP
Command
Format
FREQuency:STOP {<frequency>|MINimum|MAXimum}
Function
Set the stop frequency (used in conjunction with start frequency)
in sweep mode.
Example
FREQ:STOP MAX
8. FREQuency:STOP?
Command
Format
FREQuency:STOP? [MINimum|MAXimum]
Function
Query the stop frequency in sweep mode.
Return Value
The query returns the stop frequency that has been set in the form
of scientific notation in Hz, such as: 2.000000e+07.
9. FREQuency:CENTer
Command
Format
FREQuency:CENTer {<frequency>|MINimum|MAXimum}
Function
Set the center frequency (used in conjunction with span
frequency) in sweep mode.
Example
FREQ:CENT 10000000
10. FREQuency:CENTer?
Command
Format
FREQuency:CENTer? [MINimum|MAXimum]
Function
Query the center frequency in sweep mode.
Return Value
The query returns the center frequency that has been set in the
Programming Guide for DG1022
Loading...
+ 70 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.