Function Generator · SCPI command reference

Aim-TTi TGF4042, TGF4082, TGF4162, and TGF4242 SCPI commands

The Aim-TTi TGF4042, TGF4082, TGF4162, and TGF4242 function generator is controlled remotely with SCPI commands. TestFlow's instrument library holds 68 commands for it, 4 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 TGF4042 on a real bench.

Commands
68
Queries
4
Subsystems
29
Models covered
4

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Aim-TTi TGF4042, TGF4082, TGF4162, or TGF4242 and writes the report from the measured results.

Get started

Control the Aim-TTi TGF4042 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 Aim-TTi TGF4042's VISA address

# Paste the address of your Aim-TTi TGF4042 (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("OUTPUT ON")  # Turn On Output CH1
print(inst.query("EER?"))  # Read Error

inst.close()

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Aim-TTi TGF4042, TGF4082, TGF4162, or TGF4242 and writes the report from the measured results.

Get started

Run a TGF4042 test without writing code

Describe the test in a sentence, for example “turn on output ch1 on the TGF4042, then read error 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

68 commands in 29 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The TGF4042, TGF4082, TGF4162, and TGF4242 share this command set in TestFlow's library.

CHN subsystem (27)

CommandWhat it doesArguments
CHN <Channel>Select Channel. Selects the channel as the destination for subsequent commands.Number: 1,2
CHN 1 ; ZLOAD <Ohm>Set Output Load CH1. Sets the output load in ohms; use OPEN for high-Z.Number: 1-10000
CHN 2 ; ZLOAD <Ohm>Set Output Load CH2. Sets the output load in ohms; use OPEN for high-Z.Number: 1-10000
CHN 1 ; ZLOAD OPENSet Output Load HighZ CH1. Sets the output load to high-impedance (open).None
CHN 2 ; ZLOAD OPENSet Output Load HighZ CH2. Sets the output load to high-impedance (open).None
CHN 1 ; WAVE <Shape>Set Waveform CH1. Sets the output waveform shape.Text: SINE,SQUARE,RAMP,TRIANG,PULSE,NOISE,PRBSPN7,PRBSPN9,PRBSPN11,PRBSPN15,PRBSPN20,PRBSPN23,PRBSPN29,PRBSPN31,ARB
CHN 2 ; WAVE <Shape>Set Waveform CH2. Sets the output waveform shape.Text: SINE,SQUARE,RAMP,TRIANG,PULSE,NOISE,PRBSPN7,PRBSPN9,PRBSPN11,PRBSPN15,PRBSPN20,PRBSPN23,PRBSPN29,PRBSPN31,ARB
CHN 1 ; RMPSYMM <Pct>Set Ramp Symmetry CH1. Sets the ramp symmetry percentage.Number
CHN 2 ; RMPSYMM <Pct>Set Ramp Symmetry CH2. Sets the ramp symmetry percentage.Number
CHN 1 ; MOD OFFTurn Off Modulation CH1. Disables modulation for the selected channel.None
CHN 2 ; MOD OFFTurn Off Modulation CH2. Disables modulation for the selected channel.None
CHN 1 ; MODAMDEPTH <Pct>Set AM Depth CH1. Sets the AM depth percentage.Number
CHN 2 ; MODAMDEPTH <Pct>Set AM Depth CH2. Sets the AM depth percentage.Number
CHN 1 ; MODFMDEV <Freq>Set FM Deviation CH1. Sets the FM frequency deviation in Hz.Number
CHN 2 ; MODFMDEV <Freq>Set FM Deviation CH2. Sets the FM frequency deviation in Hz.Number
CHN 1 ; MODPMDEV <Deg>Set PM Deviation CH1. Sets the PM phase deviation in degrees.Number
CHN 2 ; MODPMDEV <Deg>Set PM Deviation CH2. Sets the PM phase deviation in degrees.Number
CHN 1 ; MODHOPFREQ <Freq>Set FSK Hop Freq CH1. Sets the FSK hop frequency in Hz.Number
CHN 2 ; MODHOPFREQ <Freq>Set FSK Hop Freq CH2. Sets the FSK hop frequency in Hz.Number
CHN 1 ; MOD<Type>SRC <Src>Set Mod Source CH1. Sets the modulation source.Text: AM,FM,PM,PWM,SUM,FSK,BPSK,ASK; Text: INT,EXT
CHN 2 ; MOD<Type>SRC <Src>Set Mod Source CH2. Sets the modulation source.Text: AM,FM,PM,PWM,SUM,FSK,BPSK,ASK; Text: INT,EXT
CHN 1 ; MOD<Type>FREQ <Freq>Set Mod Freq CH1. Sets the internal modulating-waveform frequency.Text: AM,FM,PM,PWM,SUM; Number
CHN 2 ; MOD<Type>FREQ <Freq>Set Mod Freq CH2. Sets the internal modulating-waveform frequency.Text: AM,FM,PM,PWM,SUM; Number
CHN 1 ; SWPTYPE <Type>Set Sweep Type CH1. Sets the sweep spacing type.Text: LINUP,LINDN,LOGUP,LOGDN
CHN 2 ; SWPTYPE <Type>Set Sweep Type CH2. Sets the sweep spacing type.Text: LINUP,LINDN,LOGUP,LOGDN
CHN 1 ; BST NCYCTurn On Burst CH1. Enables burst mode.None
CHN 2 ; BST NCYCTurn On Burst CH2. Enables burst mode.None

OUTPUT subsystem (4)

CommandWhat it doesArguments
OUTPUT ONTurn On Output CH1. Enables the selected channel output.None
OUTPUT OFFTurn Off Output CH1. Disables the selected channel output.None
OUTPUT INVERTSet Output Inverted On CH1. Sets the output to inverted polarity.None
OUTPUT NORMALSet Output Normal CH1. Sets the output to normal polarity.None

SWP subsystem (2)

CommandWhat it doesArguments
SWP ONTurn On Sweep CH1. Enables the frequency sweep.None
SWP OFFTurn Off Sweep CH1. Disables the frequency sweep.None

BEEPMODE subsystem (2)

CommandWhat it doesArguments
BEEPMODE ONBeep On. Enables the beeper.None
BEEPMODE OFFBeep Off. Disables the beeper.None

Frequency (FREQuency) (1)

CommandWhat it doesArguments
FREQ <Freq>Set Frequency CH1. Sets the output frequency in Hz.Number

PER subsystem (1)

CommandWhat it doesArguments
PER <Sec>Set Period CH1. Sets the output period in seconds.Number

AMPL subsystem (1)

CommandWhat it doesArguments
AMPL <Amp>Set Amplitude CH1. Sets the output amplitude (Vpp).Number

DCOFFS subsystem (1)

CommandWhat it doesArguments
DCOFFS <Volt>Set DC Offset CH1. Sets the DC offset voltage.Number

HILVL subsystem (1)

CommandWhat it doesArguments
HILVL <Volt>Set Voltage High CH1. Sets the high output-voltage level.Number

LOLVL subsystem (1)

CommandWhat it doesArguments
LOLVL <Volt>Set Voltage Low CH1. Sets the low output-voltage level.Number

PHASE subsystem (1)

CommandWhat it doesArguments
PHASE <Deg>Set Phase CH1. Sets the output phase in degrees.Number

SQRSYMM subsystem (1)

CommandWhat it doesArguments
SQRSYMM <Pct>Set Square Duty Cycle CH1. Sets the square-wave duty cycle percentage.Number

PULSWID subsystem (1)

CommandWhat it doesArguments
PULSWID <Sec>Set Pulse Width CH1. Sets the pulse width in seconds.Number

PULSPER subsystem (1)

CommandWhat it doesArguments
PULSPER <Sec>Set Pulse Period CH1. Sets the pulse period in seconds.Number

PULSEDGE subsystem (1)

CommandWhat it doesArguments
PULSEDGE <Sec>Set Pulse Edge CH1. Sets the pulse edge (rise/fall) time.Number

PULSDLY subsystem (1)

CommandWhat it doesArguments
PULSDLY <Sec>Set Pulse Delay CH1. Sets the pulse delay.Number

ARBLOAD subsystem (1)

CommandWhat it doesArguments
ARBLOAD <Name>Set Arb Waveform CH1. Selects the arbitrary waveform by name.Text

Modulation (1)

CommandWhat it doesArguments
MOD <Type>Set Modulation Type CH1. Selects the modulation type.Text: AM,FM,PM,FSK,BPSK,SUM,PWM,OFF

SWPBEGFREQ subsystem (1)

CommandWhat it doesArguments
SWPBEGFREQ <Freq>Set Sweep Start Freq CH1. Sets the sweep start frequency.Number

SWPENDFREQ subsystem (1)

CommandWhat it doesArguments
SWPENDFREQ <Freq>Set Sweep Stop Freq CH1. Sets the sweep stop frequency.Number

SWPTIME subsystem (1)

CommandWhat it doesArguments
SWPTIME <Sec>Set Sweep Time CH1. Sets the sweep time in seconds.Number

BST subsystem (1)

CommandWhat it doesArguments
BST OFFTurn Off Burst CH1. Disables burst mode.None

BSTCOUNT subsystem (1)

CommandWhat it doesArguments
BSTCOUNT <N>Set Burst Count CH1. Sets the number of cycles per burst.Number

BSTPHASE subsystem (1)

CommandWhat it doesArguments
BSTPHASE <Deg>Set Burst Phase CH1. Sets the burst start phase.Number

EER subsystem (1)

CommandWhat it doesArguments
EER?Read Error. Reads and clears the execution-error register.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 (9)

CommandWhat it doesArguments
*TRGTrigger Now. Issues a manual/bus trigger.None
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).None
*RSTReset. Resets the instrument to its default state.None
*CLSClear Status. Clears all status registers.None
*TST?Self Test. Runs the self-test and returns 0 for pass.None
*OPC?Operation Complete. Returns 1 when all pending operations are complete.None
*WAIWait To Continue. Waits until all pending operations are complete.None
*SAV <Slot>Save Setup. Stores the current setup to a memory slot (0 to 9).Number
*RCL <Slot>Recall Setup. Recalls a setup from a memory slot (0 to 9).Number

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Aim-TTi's programming documentation for the TGF4042, TGF4082, TGF4162, and TGF4242 and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Aim-TTi's programming manual: check it before you rely on an edge case. Last updated November 17, 2026.

Frequently asked questions

Does the Aim-TTi TGF4042 support SCPI remote control?

Yes. The Aim-TTi TGF4042 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 68 SCPI commands for it: 4 queries that read values or state, and 64 settings and actions.

How do I control the Aim-TTi TGF4042 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?, OUTPUT ON and EER?.

Which command reads a value from the Aim-TTi TGF4042?

EER? (read error). Reads and clears the execution-error register. The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Aim-TTi TGF4042 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 Aim-TTi TGF4042 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.