Function Generator · SCPI command comparison

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

In TestFlow's instrument library, the Aim-TTi TG2512A takes 63 SCPI commands, 0 of them queries, and the Keithley 3390 takes 88 SCPI commands, 10 of them queries. That is 25 more on the 3390. Counting distinct command headers (the command path without its arguments), 2 are accepted by both, 34 exist only on the TG2512A, and 72 only on the 3390. 6% of the TG2512A's command headers also exist on the 3390.

Both libraries have commands under OUTPUT, FREQ, and PULSFREQ. Only the TG2512A has MOD, MODSHAPE, MODFREQ, MODDEV, ZLOAD, and CHN and 27 more. Only the 3390 has VOLTage, APPLy, BURSt, FUNCtion, AM, and FM and 6 more.

Only the 3390 library has an operation-complete command (*OPC?); the TG2512A library has none. Only the 3390 library has an error-queue read (SYSTem:ERRor?); the TG2512A library has none.

TestFlow's library gives the TG5011A and TG5012A the same command set as the TG2512A, so the TG2512A column applies to them too.

TG2512A commands
63
3390 commands
88
Shared headers
2
Unique headers
106

Run this on your bench

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

Get started

TG2512A 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 TG2512AKeithley 3390
Commands in TestFlow's library6388
Queries (read a value or state)010
Settings and actions6378
Subsystems5619
Distinct command headers3674
Headers the other lacks3472
Command languageSCPISCPI
Operation completeNot in library*OPC?
Error queueNot in librarySYSTem:ERRor?
Models on this command setTG2512A, TG5011A, TG5012A3390

Commands both accept

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

CommandWhat it does
OUTPUT ONTurn on. Enable output for active channel.
FREQ <Hz>3390: FREQuency <Freq>Set frequency. Set output frequency in Hz.

Only on the Aim-TTi TG2512A

34 command headers in the TG2512A 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 TG2512A command reference.

ALIGN (1 only on the TG2512A)

CommandWhat it does
ALIGNAlign zero phase ref. Align waveform phase to zero reference.

AMPLRNG (1 only on the TG2512A)

CommandWhat it does
AMPLRNG <cpd>Amplitude range. Set amplitude autorange mode (AUTO or HOLD).

AMPUNIT (1 only on the TG2512A)

CommandWhat it does
AMPUNIT <unit>Amplitude units. Select amplitude unit (Vpp, Vrms or dBm).

BST (1 only on the TG2512A)

CommandWhat it does
BST <Mode>Burst mode. Select burst mode type.

BSTCOUNT (1 only on the TG2512A)

CommandWhat it does
BSTCOUNT <Cycles>Burst count. Set number of cycles in burst mode.

BSTPHASE (1 only on the TG2512A)

CommandWhat it does
BSTPHASE <Degree>Burst phase. Set starting phase for burst mode.

Only on the Keithley 3390

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

IEEE 488.2 common (*) (9 only on the 3390)

CommandWhat it does
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
*RSTReset. Resets the instrument to its default state.
*CLSClear Status. Clears all event registers and the error queue.
*TST?Self Test. Runs the self-test and returns 0 for pass.

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.

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), 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: 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_TG2512A_ADDRESS")  # Aim-TTi TG2512A
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
a.write("OUTPUT ON")
b.write("OUTPut ON")

# No shared reading with an example on both, so each uses its own command
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 TG2512A or Keithley 3390 and writes the report from the measured results.

Get started

Frequently asked questions

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

In TestFlow's library the TG2512A has 63 SCPI commands and the 3390 has 88 SCPI commands. 2 command headers are common to both, 34 are only on the TG2512A (mostly ALIGN and AMPLRNG), and 72 are only on the 3390 (mostly IEEE 488.2 common (*) and VOLTage).

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

Partly. 2 command headers are accepted by both, including OUTPUT and FREQ. 106 are not, for example ALIGN on the TG2512A and *IDN? on the 3390, so a script that uses those needs a separate branch for each instrument.

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

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

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

Only the 3390 library has an operation-complete command (*OPC?); the TG2512A library has none. Only the 3390 library has an error-queue read (SYSTem:ERRor?); the TG2512A 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.