Function Generator · SCPI command reference

UNI-T UTG1022X SCPI commands

The UNI-T UTG1022X function generator is controlled remotely with SCPI commands. TestFlow's instrument library holds 73 commands for it, 17 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the UTG1022X on a real bench.

Commands
73
Queries
17
Subsystems
6
Models covered
1

Control the UNI-T UTG1022X from Python

With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find the UNI-T UTG1022X's VISA address

# Paste the address of your UNI-T UTG1022X (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000  # ms

print(inst.query("*IDN?"))  # identify the instrument
inst.write(":CHANnel1:OUTPut ON")  # Turn On Output
print(inst.query(":SYSTem:CYMometer:FREQuency?"))  # Read Counter Frequency

inst.close()

Run a UTG1022X test without writing code

Describe the test in a sentence, for example “turn on output on the UTG1022X, then read counter frequency and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.

Get started

SCPI command reference

73 commands in 6 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.

Channels (CHANnel) (60)

CommandWhat it doesArguments
:CHANnel<Channel>:OUTPut ONTurn On Output. Turn the channel's output on (manual p.9).Number: 1,2
:CHANnel<Channel>:OUTPut OFFTurn Off Output. Turn the channel's output off (manual p.9).Number: 1,2
:CHANnel<Channel>:OUTPut?Read Output State. Return 1 when the channel's output is on, 0 when off (manual p.9).Number: 1,2
:CHANnel<Channel>:SELectSelect Channel. Make the channel the current one on the front panel (manual p.12).Number: 1,2
:CHANnel<Channel>:MODE <Mode>Set Mode. Signal mode: CONTinue (plain wave), MODulation, SWEep or BURSt (manual p.9).Number: 1,2; Text: CONTinue,MODulation,SWEep,BURSt
:CHANnel<Channel>:MODE?Read Mode. Return the channel's signal mode (manual p.9).Number: 1,2
:CHANnel<Channel>:LOAD <Ohm>Set Output Load. Load the amplitude is set for, in ohms; 10000 means high impedance (manual p.12).Number: 1,2; Number: 1 to 10000
:CHANnel<Channel>:LOAD?Read Output Load. Return the channel's load setting in ohms (manual p.12).Number: 1,2
:CHANnel<Channel>:INVersion OFFSet Output Polarity Normal. Output the wave as set (not inverted) (manual p.10).Number: 1,2
:CHANnel<Channel>:INVersion ONSet Output Polarity Inverted. Output the wave inverted (manual p.10).Number: 1,2
:CHANnel<Channel>:OUTPut:SYNC <State>Set Sync Output. Turn the channel's sync output on or off; only one channel can drive the sync connector (manual p.10).Number: 1,2; Text: ON,OFF
:CHANnel<Channel>:AMPLitude:UNIT <Unit>Set Voltage Unit. Unit of the amplitude setting; ignored in high/low level mode (manual p.11).Number: 1,2; Text: VPP,VRMS,DBM
:CHANnel<Channel>:BASE:WAVe <Shape>Set Function. Basic wave shape (manual p.13).Number: 1,2; Text: SINe,SQUare,PULSe,RAMP,ARB,NOISe,DC
:CHANnel<Channel>:BASE:WAVe?Read Function. Return the channel's basic wave shape (manual p.13).Number: 1,2
:CHANnel<Channel>:BASE:FREQuency <Freq>Set Frequency. Output frequency in Hz, from 1e-6 to the shape's maximum (manual p.13).Number: 1,2; Number: Hz
:CHANnel<Channel>:BASE:FREQuency?Read Frequency. Return the output frequency in Hz (manual p.13).Number: 1,2
:CHANnel<Channel>:BASE:PERiod <Sec>Set Period. Output period in s (manual p.13).Number: 1,2; Number: s
:CHANnel<Channel>:BASE:PERiod?Read Period. Return the output period in s (manual p.13).Number: 1,2
:CHANnel<Channel>:BASE:AMPLitude <Amp>Set Amplitude. Output amplitude in the channel's unit, from 1 mVpp to the maximum for the load (manual p.14).Number: 1,2; Number: in the amplitude unit
:CHANnel<Channel>:BASE:AMPLitude?Read Amplitude. Return the output amplitude (manual p.14).Number: 1,2
:CHANnel<Channel>:BASE:OFFSet <Volt>Set Voltage Offset. DC offset in V (manual p.15).Number: 1,2; Number: V
:CHANnel<Channel>:BASE:OFFSet?Read Voltage Offset. Return the DC offset in V (manual p.15).Number: 1,2
:CHANnel<Channel>:BASE:HIGH <Volt>Set Voltage High. High level of the output (manual p.15).Number: 1,2; Number: in the amplitude unit
:CHANnel<Channel>:BASE:HIGH?Read Voltage High. Return the high level of the output (manual p.15).Number: 1,2
:CHANnel<Channel>:BASE:LOW <Volt>Set Voltage Low. Low level of the output (manual p.15).Number: 1,2; Number: in the amplitude unit
:CHANnel<Channel>:BASE:LOW?Read Voltage Low. Return the low level of the output (manual p.15).Number: 1,2
:CHANnel<Channel>:BASE:PHASe <Deg>Set Phase. Output phase in degrees (manual p.14).Number: 1,2; Number: -360 to 360
:CHANnel<Channel>:BASE:PHAse?Read Phase. Return the output phase in degrees (manual p.14).Number: 1,2
:CHANnel<Channel>:BASE:DUTY <Pct>Set Square Duty Cycle. Duty cycle of the square or pulse wave in % (manual p.16).Number: 1,2; Number: 0 to 100
:CHANnel<Channel>:BASE:DUTY?Read Duty Cycle. Return the duty cycle in % (manual p.16).Number: 1,2
:CHANnel<Channel>:RAMP:SYMMetry <Pct>Set Ramp Symmetry. Symmetry of the ramp wave in % (manual p.16).Number: 1,2; Number: 0 to 100
:CHANnel<Channel>:PULSe:RISe <Sec>Set Pulse Rise Time. Rising edge time of the pulse wave in s (manual p.17).Number: 1,2; Number: s
:CHANnel<Channel>:PULSe:FALL <Sec>Set Pulse Fall Time. Falling edge time of the pulse wave in s (manual p.17).Number: 1,2; Number: s
:CHANnel<Channel>:BASE:ARB <Source>,"<File>"Set Arb Waveform. Load an arbitrary wave file as the basic wave, from INTernal or EXTernal storage (manual p.16).Number: 1,2; Text: INTernal,EXTernal; Text
:CHANnel<Channel>:LIMit:ENABle <State>Set Amplitude Limit. Turn the amplitude limit on or off (manual p.10).Number: 1,2; Text: ON,OFF
:CHANnel<Channel>:LIMit:LOWer <Volt>Set Amplitude Limit Lower. Lower amplitude limit, in the channel's unit (manual p.11).Number: 1,2; Number: in the amplitude unit
:CHANnel<Channel>:LIMit:UPPer <Volt>Set Amplitude Limit Upper. Upper amplitude limit, in the channel's unit (manual p.11).Number: 1,2; Number: in the amplitude unit
:CHANnel<Channel>:MODulate:TYPe <Type>Set Modulation Type. Modulation type; takes effect in MODulation mode (manual p.18).Number: 1,2; Text: AM,FM,PM,ASK,FSK,PSK,PWM
:CHANnel<Channel>:MODulate:TYPe?Read Modulation Type. Return the modulation type (manual p.18).Number: 1,2
:CHANnel<Channel>:MODulate:WAVe <Wave>Set Modulation Wave. Modulating wave shape (manual p.18).Number: 1,2; Text: SINe,SQUare,UPRamp,DNRamp,ARB,NOISe
:CHANnel<Channel>:MODulate:SOURce <Source>Set Modulation Source. Modulating signal from INTernal or EXTernal (manual p.18).Number: 1,2; Text: INTernal,EXTernal
:CHANnel<Channel>:MODulate:FREQuency <Freq>Set Modulation Frequency. Frequency of the modulating wave in Hz (manual p.19).Number: 1,2; Number: Hz
:CHANnel<Channel>:MODulate:DEPTh <Pct>Set Modulation Depth. Modulation depth in %, 0 to 100 (0 to 120 for AM) (manual p.19).Number: 1,2; Number: 0 to 120
:CHANnel<Channel>:MODulate:RATio <Hz>Set Modulation Rate. Keying rate in Hz for ASK, FSK and PSK (manual p.20).Number: 1,2; Number: Hz
:CHANnel<Channel>:FM:FREQuency:DEV <Freq>Set FM Deviation. FM frequency deviation in Hz, up to the carrier frequency (manual p.20).Number: 1,2; Number: Hz
:CHANnel<Channel>:PM:PHASe:DEV <Deg>Set PM Deviation. PM phase deviation in degrees (manual p.21).Number: 1,2; Number: 0 to 360
:CHANnel<Channel>:PWM:DUTY:DEV <Pct>Set PWM Deviation. PWM duty cycle deviation in % (manual p.21).Number: 1,2; Number: 0 to 100
:CHANnel<Channel>:FSK:FREQuency <Freq>Set FSK Hop Freq. FSK hop frequency in Hz; set the modulation type to FSK first (manual p.21).Number: 1,2; Number: Hz
:CHANnel<Channel>:PSK:PHASe <Deg>Set PSK Phase. PSK phase in degrees; set the modulation type to PSK first (manual p.22).Number: 1,2; Number: 0 to 360
:CHANnel<Channel>:SWEep:TYPe <Type>Set Sweep Spacing. LINe or LOG frequency sweep (manual p.22).Number: 1,2; Text: LINe,LOG
:CHANnel<Channel>:SWEep:FREQuency:STARt <Freq>Set Sweep Start Freq. Sweep start frequency in Hz (manual p.22).Number: 1,2; Number: Hz
:CHANnel<Channel>:SWEep:FREQuency:STOP <Freq>Set Sweep Stop Freq. Sweep stop frequency in Hz (manual p.23).Number: 1,2; Number: Hz
:CHANnel<Channel>:SWEEP:TIMe <Sec>Set Sweep Time. Sweep time in s (manual p.23).Number: 1,2; Number: 0.001 to 500
:CHANnel<Channel>:BURSt:TYPe <Mode>Set Burst Mode. Burst type: NCYC (N cycles), GATe or INFinit (manual p.24).Number: 1,2; Text: NCYC,GATe,INFinit
:CHANnel<Channel>:BURSt:CYCLes <N>Set Burst Cycles. Cycles per burst, an integer (manual p.25).Number: 1,2; Number: integer
:CHANnel<Channel>:BURSt:PERiod <Sec>Set Burst Period. Burst period in s (manual p.24).Number: 1,2; Number: s
:CHANnel<Channel>:BURSt:PHASe <Deg>Set Burst Phase. Burst start phase in degrees (manual p.24).Number: 1,2; Number: 0 to 360
:CHANnel<Channel>:BURSt:GATe:POLarity <Polarity>Set Burst Gate Polarity. Polarity of the gating signal (manual p.25).Number: 1,2; Text: POSitive,NEGative
:CHANnel<Channel>:TRIGger:SOURce <Src>Set Trigger Source. Burst trigger source; only valid for burst (manual p.25).Number: 1,2; Text: INTernal,EXTernal
:CHANnel<Channel>:BURSt:TRGEdge <Edge>Set Burst Trigger Edge. Edge of the external trigger that starts a burst (manual p.26).Number: 1,2; Text: RISe,FALL

System (SYSTem) (8)

CommandWhat it doesArguments
:SYSTem:BEEP ONEnable Beeper. Turn the beeper on (manual p.6).None
:SYSTem:BEEP OFFDisable Beeper. Turn the beeper off (manual p.6).None
:SYSTem:PHASe:MODe <Mode>Set Interchannel Phase Mode. INDependent channels, or SYNChronization to keep the two channels' start phases locked (manual p.6).Text: INDependent,SYNChronization
:SYSTem:CYMometer ONEnable Counter. Turn the built-in frequency counter on (manual p.7).None
:SYSTem:CYMometer OFFDisable Counter. Turn the built-in frequency counter off (manual p.7).None
:SYSTem:CYMometer:FREQuency?Read Counter Frequency. Return the counter's measured frequency in Hz (manual p.8).None
:SYSTem:CYMometer:PERiod?Read Counter Period. Return the counter's measured period in s (manual p.8).None
:SYSTem:CYMometer:DUTY?Read Counter Duty. Return the counter's measured duty cycle in % (manual p.8).None

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last measurement to a variableText

IEEE 488.2 common commands (2)

CommandWhat it doesArguments
*IDN?Identify. Return maker, model, serial number and software version (manual p.5).None
*RSTReset. Restore the factory settings and clear the error and I/O buffers (manual p.5).None

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from UNI-T's programming documentation for the UTG1022X and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by UNI-T's programming manual: check it before you rely on an edge case. Last updated October 25, 2026.

Frequently asked questions

Does the UNI-T UTG1022X support SCPI remote control?

Yes. The UNI-T UTG1022X accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 73 SCPI commands for it: 17 queries that read values or state, and 56 settings and actions.

How do I control the UNI-T UTG1022X from Python?

Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :CHANnel1:OUTPut ON and :SYSTem:CYMometer:FREQuency?.

Which command reads a value from the UNI-T UTG1022X?

:SYSTem:CYMometer:FREQuency? (read counter frequency). Return the counter's measured frequency in Hz (manual p.8). The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the UNI-T UTG1022X without writing code?

Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the UNI-T UTG1022X through the TestFlow desktop app, and writes the report from the measured results.

Your next test, automated today

Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.