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.
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.
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 TGF4042 | Keithley 3390 | |
|---|---|---|
| Commands in TestFlow's library | 68 | 88 |
| Queries (read a value or state) | 4 | 10 |
| Settings and actions | 64 | 78 |
| Subsystems | 29 | 19 |
| Distinct command headers | 30 | 74 |
| Headers the other lacks | 19 | 63 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | Not in library | SYSTem:ERRor? |
| Models on this command set | TGF4042, TGF4082, TGF4162, TGF4242 | 3390 |
11 command headers are in both libraries. Where the 3390 library writes the command differently, its form is shown under the TGF4042's.
| Command | What it does |
|---|---|
| OUTPUT ON | Turn On Output CH1. Enables the selected channel output. |
| FREQ <Freq>3390: FREQuency <Freq> | Set Frequency CH1. Sets the output frequency in Hz. |
| *TRG | Trigger Now. Issues a manual/bus trigger. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| *RST | Reset. Resets the instrument to its default state. |
| *CLS | Clear 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. |
| *WAI | Wait 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). |
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.
| Command | What it does |
|---|---|
| AMPL <Amp> | Set Amplitude CH1. Sets the output amplitude (Vpp). |
| Command | What it does |
|---|---|
| ARBLOAD <Name> | Set Arb Waveform CH1. Selects the arbitrary waveform by name. |
| Command | What it does |
|---|---|
| BEEPMODE ON | Beep On. Enables the beeper. |
| Command | What it does |
|---|---|
| BST OFF | Turn Off Burst CH1. Disables burst mode. |
| Command | What it does |
|---|---|
| BSTCOUNT <N> | Set Burst Count CH1. Sets the number of cycles per burst. |
| Command | What it does |
|---|---|
| BSTPHASE <Deg> | Set Burst Phase CH1. Sets the burst start phase. |
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.
| Command | What 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. |
| Command | What 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. |
| Command | What it does |
|---|---|
| BURSt:STATe ON | Enable 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. |
| Command | What 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. |
| Command | What 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. |
| Command | What it does |
|---|---|
| AM:STATe ON | Enable 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. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.