Function Generator · SCPI command comparison

Aim-TTi TGF4042 vs Keithley 3390: SCPI commands and remote control compared

In TestFlow's instrument library, the Aim-TTi TGF4042 takes 68 SCPI commands, 4 of them queries, and the Keithley 3390 takes 88 SCPI commands, 10 of them queries. That is 20 more on the 3390. Counting distinct command headers (the command path without its arguments), 11 are accepted by both, 19 exist only on the TGF4042, and 63 only on the 3390. 37% of the TGF4042's command headers also exist on the 3390.

Both libraries have commands under OUTPUT, FREQ, and PULSWID. Only the TGF4042 has CHN, SWP, BEEPMODE, PER, AMPL, and DCOFFS and 12 more. Only the 3390 has VOLTage, APPLy, BURSt, FUNCtion, AM, and FM and 6 more.

Both libraries synchronise with *OPC?. Only the 3390 library has an error-queue read (SYSTem:ERRor?); the TGF4042 library has none.

TestFlow's library gives the TGF4082, TGF4162, and TGF4242 the same command set as the TGF4042, so the TGF4042 column applies to them too.

TGF4042 commands
68
3390 commands
88
Shared headers
11
Unique headers
82

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Aim-TTi TGF4042 or Keithley 3390 and writes the report from the measured results.

Get started

TGF4042 vs 3390 at a glance

Counts come from TestFlow's instrument library, the command sets its AI agent uses to drive each instrument. A distinct command header is the command path without its arguments, so :OUTPut ON and :OUTPut OFF count once.

Aim-TTi TGF4042Keithley 3390
Commands in TestFlow's library6888
Queries (read a value or state)410
Settings and actions6478
Subsystems2919
Distinct command headers3074
Headers the other lacks1963
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueNot in librarySYSTem:ERRor?
Models on this command setTGF4042, TGF4082, TGF4162, TGF42423390

Commands both accept

11 command headers are in both libraries. Where the 3390 library writes the command differently, its form is shown under the TGF4042's.

CommandWhat it does
OUTPUT ONTurn On Output CH1. Enables the selected channel output.
FREQ <Freq>3390: FREQuency <Freq>Set Frequency CH1. Sets the output frequency in Hz.
*TRGTrigger Now. Issues a manual/bus trigger.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
*RSTReset. Resets the instrument to its default state.
*CLSClear Status. Clears all status registers.
*TST?Self Test. Runs the self-test and returns 0 for pass.
*OPC?Operation Complete. Returns 1 when all pending operations are complete.
*WAIWait To Continue. Waits until all pending operations are complete.
*SAV <Slot>Save Setup. Stores the current setup to a memory slot (0 to 9).
*RCL <Slot>Recall Setup. Recalls a setup from a memory slot (0 to 9).

Only on the Aim-TTi TGF4042

19 command headers in the TGF4042 library have no match in the 3390 library. Below are 6 of them from the 6 largest subsystems; the full list is in the Aim-TTi TGF4042 command reference.

AMPL (1 only on the TGF4042)

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

ARBLOAD (1 only on the TGF4042)

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

BEEPMODE (1 only on the TGF4042)

CommandWhat it does
BEEPMODE ONBeep On. Enables the beeper.

BST (1 only on the TGF4042)

CommandWhat it does
BST OFFTurn Off Burst CH1. Disables burst mode.

BSTCOUNT (1 only on the TGF4042)

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

BSTPHASE (1 only on the TGF4042)

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

Only on the Keithley 3390

63 command headers in the 3390 library have no match in the TGF4042 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Keithley 3390 command reference.

VOLTage (7 only on the 3390)

CommandWhat it does
VOLTage <Amp>Set Amplitude. Sets the output amplitude (Vpp).
VOLTage?Read Amplitude. Reads the output amplitude.
VOLTage:OFFSet <Volt>Set Voltage Offset. Sets the DC offset voltage.
VOLTage:OFFSet?Read Voltage Offset. Reads the DC offset voltage.

APPLy (6 only on the 3390)

CommandWhat it does
APPLy:SINusoid <Freq>,<Amp>,<Offset>Apply Sine. Sets sine with the given frequency, amplitude and offset.
APPLy:SQUare <Freq>,<Amp>,<Offset>Apply Square. Sets square with the given frequency, amplitude and offset.
APPLy:RAMP <Freq>,<Amp>,<Offset>Apply Ramp. Sets ramp with the given frequency, amplitude and offset.
APPLy:PULSe <Freq>,<Amp>,<Offset>Apply Pulse. Sets pulse with the given frequency, amplitude and offset.

BURSt (5 only on the 3390)

CommandWhat it does
BURSt:STATe ONEnable Burst. Enables burst mode.
BURSt:MODE <Mode>Set Burst Mode. Sets the burst mode.
BURSt:NCYCles <N>Set Burst Cycles. Sets the number of cycles per burst.
BURSt:INTernal:PERiod <Sec>Set Burst Period. Sets the internal burst period.

FREQuency (5 only on the 3390)

CommandWhat it does
FREQuency?Read Frequency. Reads the output frequency.
FREQuency:STARt <Freq>Set Sweep Start Freq. Sets the sweep start frequency.
FREQuency:STOP <Freq>Set Sweep Stop Freq. Sets the sweep stop frequency.
FREQuency:CENTer <Freq>Set Sweep Center Freq. Sets the sweep center frequency.

FUNCtion (5 only on the 3390)

CommandWhat it does
FUNCtion <Shape>Set Function. Sets the output waveform shape.
FUNCtion?Read Function. Reads the output waveform shape.
FUNCtion:RAMP:SYMMetry <Pct>Set Ramp Symmetry. Sets the ramp symmetry percentage.
FUNCtion:SQUare:DCYCle <Pct>Set Square Duty Cycle. Sets the square-wave duty cycle percentage.

AM (4 only on the 3390)

CommandWhat it does
AM:STATe ONEnable AM. Enables AM modulation.
AM:DEPTh <Pct>Set AM Deviation. Sets the AM depth percentage.
AM:SOURce <Src>Set AM Source. Sets the AM modulation source.
AM:INTernal:FREQuency <Freq>Set AM Int Freq. Sets the internal AM modulating frequency.

Control both from Python

With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, both libraries hold OUTPUT (turn on output ch1), and the same line runs on each. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: EER? on the TGF4042 and OUTPut? on the 3390. For the basics, see the PyVISA tutorial.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find both VISA addresses

a = rm.open_resource("PASTE_TGF4042_ADDRESS")  # Aim-TTi TGF4042
b = rm.open_resource("PASTE_3390_ADDRESS")  # Keithley 3390
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Turn On Output CH1
a.write("OUTPUT ON")
b.write("OUTPut ON")

# No shared reading with an example on both, so each uses its own command
print(a.query("EER?"))  # Read Error
print(b.query("OUTPut?"))  # Read Output State

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Aim-TTi TGF4042 or Keithley 3390 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Aim-TTi TGF4042 and the Keithley 3390 for remote control?

In TestFlow's library the TGF4042 has 68 SCPI commands and the 3390 has 88 SCPI commands. 11 command headers are common to both, 19 are only on the TGF4042 (mostly AMPL and ARBLOAD), and 63 are only on the 3390 (mostly VOLTage and APPLy).

Can I use the same SCPI code for the Aim-TTi TGF4042 and the Keithley 3390?

Partly. 11 command headers are accepted by both, including OUTPUT and FREQ. 82 are not, for example AMPL on the TGF4042 and VOLTage on the 3390, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the TGF4042 or the 3390?

The 3390: 68 commands for the TGF4042 against 88 for the 3390 in TestFlow's library. Of those, 4 on the TGF4042 and 10 on the 3390 are queries that read a value or state, and the library splits them into 29 and 19 subsystems.

How do the TGF4042 and 3390 signal operation complete and report errors?

Both libraries synchronise with *OPC?. Only the 3390 library has an error-queue read (SYSTem:ERRor?); the TGF4042 library has none. Each command named here is listed in the tables on this page and on each instrument's command reference.

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.