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.
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.
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()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.
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.
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.
| Command | What it does | Arguments |
|---|---|---|
| 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 OPEN | Set Output Load HighZ CH1. Sets the output load to high-impedance (open). | None |
| CHN 2 ; ZLOAD OPEN | Set 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 OFF | Turn Off Modulation CH1. Disables modulation for the selected channel. | None |
| CHN 2 ; MOD OFF | Turn 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 NCYC | Turn On Burst CH1. Enables burst mode. | None |
| CHN 2 ; BST NCYC | Turn On Burst CH2. Enables burst mode. | None |
| Command | What it does | Arguments |
|---|---|---|
| OUTPUT ON | Turn On Output CH1. Enables the selected channel output. | None |
| OUTPUT OFF | Turn Off Output CH1. Disables the selected channel output. | None |
| OUTPUT INVERT | Set Output Inverted On CH1. Sets the output to inverted polarity. | None |
| OUTPUT NORMAL | Set Output Normal CH1. Sets the output to normal polarity. | None |
| Command | What it does | Arguments |
|---|---|---|
| SWP ON | Turn On Sweep CH1. Enables the frequency sweep. | None |
| SWP OFF | Turn Off Sweep CH1. Disables the frequency sweep. | None |
| Command | What it does | Arguments |
|---|---|---|
| BEEPMODE ON | Beep On. Enables the beeper. | None |
| BEEPMODE OFF | Beep Off. Disables the beeper. | None |
| Command | What it does | Arguments |
|---|---|---|
| FREQ <Freq> | Set Frequency CH1. Sets the output frequency in Hz. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PER <Sec> | Set Period CH1. Sets the output period in seconds. | Number |
| Command | What it does | Arguments |
|---|---|---|
| AMPL <Amp> | Set Amplitude CH1. Sets the output amplitude (Vpp). | Number |
| Command | What it does | Arguments |
|---|---|---|
| DCOFFS <Volt> | Set DC Offset CH1. Sets the DC offset voltage. | Number |
| Command | What it does | Arguments |
|---|---|---|
| HILVL <Volt> | Set Voltage High CH1. Sets the high output-voltage level. | Number |
| Command | What it does | Arguments |
|---|---|---|
| LOLVL <Volt> | Set Voltage Low CH1. Sets the low output-voltage level. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PHASE <Deg> | Set Phase CH1. Sets the output phase in degrees. | Number |
| Command | What it does | Arguments |
|---|---|---|
| SQRSYMM <Pct> | Set Square Duty Cycle CH1. Sets the square-wave duty cycle percentage. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PULSWID <Sec> | Set Pulse Width CH1. Sets the pulse width in seconds. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PULSPER <Sec> | Set Pulse Period CH1. Sets the pulse period in seconds. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PULSEDGE <Sec> | Set Pulse Edge CH1. Sets the pulse edge (rise/fall) time. | Number |
| Command | What it does | Arguments |
|---|---|---|
| PULSDLY <Sec> | Set Pulse Delay CH1. Sets the pulse delay. | Number |
| Command | What it does | Arguments |
|---|---|---|
| ARBLOAD <Name> | Set Arb Waveform CH1. Selects the arbitrary waveform by name. | Text |
| Command | What it does | Arguments |
|---|---|---|
| MOD <Type> | Set Modulation Type CH1. Selects the modulation type. | Text: AM,FM,PM,FSK,BPSK,SUM,PWM,OFF |
| Command | What it does | Arguments |
|---|---|---|
| SWPBEGFREQ <Freq> | Set Sweep Start Freq CH1. Sets the sweep start frequency. | Number |
| Command | What it does | Arguments |
|---|---|---|
| SWPENDFREQ <Freq> | Set Sweep Stop Freq CH1. Sets the sweep stop frequency. | Number |
| Command | What it does | Arguments |
|---|---|---|
| SWPTIME <Sec> | Set Sweep Time CH1. Sets the sweep time in seconds. | Number |
| Command | What it does | Arguments |
|---|---|---|
| BST OFF | Turn Off Burst CH1. Disables burst mode. | None |
| Command | What it does | Arguments |
|---|---|---|
| BSTCOUNT <N> | Set Burst Count CH1. Sets the number of cycles per burst. | Number |
| Command | What it does | Arguments |
|---|---|---|
| BSTPHASE <Deg> | Set Burst Phase CH1. Sets the burst start phase. | Number |
| Command | What it does | Arguments |
|---|---|---|
| EER? | Read Error. Reads and clears the execution-error register. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Output Variable>=<Equation> | Math. Variable equals an equation like (${Var_name}= ${Var_name}/2) | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| wait(<ms>) | Wait. Waits for number of milliseconds | Number |
| Command | What it does | Arguments |
|---|---|---|
| save2var <Variable_name> | Save2Variable. Saves last measurement to a variable | Text |
| Command | What it does | Arguments |
|---|---|---|
| *TRG | Trigger Now. Issues a manual/bus trigger. | None |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). | None |
| *RST | Reset. Resets the instrument to its default state. | None |
| *CLS | Clear 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 |
| *WAI | Wait 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 |
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.
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.
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?.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.