In TestFlow's instrument library, the Aim-TTi TG2512A takes 63 SCPI commands, 0 of them queries, and the Tektronix AFG31022 takes 95 SCPI commands, 12 of them queries. That is 32 more on the AFG31022. Counting distinct command headers (the command path without its arguments), 0 are accepted by both, 36 exist only on the TG2512A, and 81 only on the AFG31022. None of the TG2512A's command headers appears in the AFG31022 library, so a script written for one needs every command rewritten for the other.
Both libraries have commands under OUTPUT. Only the TG2512A has MOD, MODSHAPE, MODFREQ, MODDEV, ZLOAD, and CHN and 29 more. Only the AFG31022 has SOURce, TRIGger, SYSTem, and DISPlay.
Only the AFG31022 library has an operation-complete command (*OPC?); the TG2512A library has none. Only the AFG31022 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. TestFlow's library gives the AFG3102C, AFG31052, AFG31102, AFG31152, AFG31252, and AFG3252C the same command set as the AFG31022, so the AFG31022 column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Aim-TTi TG2512A or Tektronix AFG31022 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 TG2512A | Tektronix AFG31022 | |
|---|---|---|
| Commands in TestFlow's library | 63 | 95 |
| Queries (read a value or state) | 0 | 12 |
| Settings and actions | 63 | 83 |
| Subsystems | 56 | 9 |
| Distinct command headers | 36 | 81 |
| Headers the other lacks | 36 | 81 |
| Command language | SCPI | SCPI |
| Operation complete | Not in library | *OPC? |
| Error queue | Not in library | SYSTem:ERRor? |
| Models on this command set | TG2512A, TG5011A, TG5012A | AFG31022, AFG3102C, AFG31052, AFG31102, AFG31152, AFG31252, AFG3252C |
None. No command header in TestFlow's TG2512A library matches one in its AFG31022 library, so every command needs its own version for each instrument.
36 command headers in the TG2512A library have no match in the AFG31022 library. Below are 6 of them from the 6 largest subsystems; the full list is in the Aim-TTi TG2512A command reference.
| Command | What it does |
|---|---|
| ALIGN | Align zero phase ref. Align waveform phase to zero reference. |
| Command | What it does |
|---|---|
| AMPLRNG <cpd> | Amplitude range. Set amplitude autorange mode (AUTO or HOLD). |
| Command | What it does |
|---|---|
| AMPUNIT <unit> | Amplitude units. Select amplitude unit (Vpp, Vrms or dBm). |
| Command | What it does |
|---|---|
| BST <Mode> | Burst mode. Select burst mode type. |
| Command | What it does |
|---|---|
| BSTCOUNT <Cycles> | Burst count. Set number of cycles in burst mode. |
| Command | What it does |
|---|---|
| BSTPHASE <Degree> | Burst phase. Set starting phase for burst mode. |
81 command headers in the AFG31022 library have no match in the TG2512A library. Below are 19 of them from the 6 largest subsystems; the full list is in the Tektronix AFG31022 command reference.
| Command | What it does |
|---|---|
| SOURce<Channel>:FUNCtion:SHAPe <Shape> | Set Function. Sets the output waveform shape for the selected channel. |
| SOURce<Channel>:FUNCtion:SHAPe? | Read Function. Reads the output waveform shape for the selected channel. |
| SOURce<Channel>:FREQuency:FIXed <Freq> | Set Frequency. Sets the output frequency in Hz for the selected channel. |
| SOURce<Channel>:FREQuency:FIXed? | Read Frequency. Reads the output frequency for the selected channel. |
| Command | What it does |
|---|---|
| *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 event registers and the error queue. |
| *TST? | Self Test. Runs the self-test and returns 0 for pass. |
| Command | What it does |
|---|---|
| OUTPut<Channel>:STATe ON | Turn On Output. Enables the selected channel output. |
| OUTPut<Channel>:STATe? | Read Output State. Reads whether the selected channel output is on. |
| OUTPut<Channel>:IMPedance <Ohm> | Set Output Impedance. Sets the the selected channel output load impedance in ohms (1 to 10k). |
| OUTPut<Channel>:IMPedance? | Read Output Impedance. Reads the the selected channel output load impedance. |
| Command | What it does |
|---|---|
| TRIGger:SEQuence:SOURce <Src> | Set Trigger Source. Sets the trigger source. |
| TRIGger:SEQuence:SLOPe <Slope> | Set Trigger Slope. Sets the external trigger slope. |
| TRIGger:SEQuence:TIMer <Sec> | Set Trigger Timer. Sets the internal trigger timer period. |
| TRIGger:SEQuence:IMMediate | Trigger Now. Issues an immediate (manual) trigger. |
| Command | What it does |
|---|---|
| SYSTem:ERRor? | Read Error. Reads and clears the next error-queue entry. |
| SYSTem:BEEPer:STATe ON | Enable Beeper. Enables the beeper. |
| Command | What it does |
|---|---|
| DISPlay:BRIGhtness <Level> | Enable Display. Sets the display brightness (0 to 1). |
With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, the two libraries have no common command with a worked example on both, so each instrument uses its own: OUTPUT ON on the TG2512A and SOURce:ROSCillator:SOURce INTernal on the AFG31022. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: SYSTem:ERRor? on the AFG31022. 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_AFG31022_ADDRESS") # Tektronix AFG31022
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# No shared setting with an example on both, so each uses its own command
a.write("OUTPUT ON") # Turn on
b.write("SOURce:ROSCillator:SOURce INTernal") # Set Clock Internal
# No shared reading with an example on both, so each uses its own command
print(b.query("SYSTem:ERRor?")) # Read Error
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Aim-TTi TG2512A or Tektronix AFG31022 and writes the report from the measured results.
In TestFlow's library the TG2512A has 63 SCPI commands and the AFG31022 has 95 SCPI commands. 0 command headers are common to both, 36 are only on the TG2512A (mostly ALIGN and AMPLRNG), and 81 are only on the AFG31022 (mostly SOURce and IEEE 488.2 common (*)).
Not without changes. None of the 36 command headers in the TG2512A library matches one of the 81 in the AFG31022 library: the TG2512A uses commands such as ALIGN and the AFG31022 uses commands such as SOURce<Channel>:FUNCtion:SHAPe. PyVISA opens both the same way, but each command needs its own version for each instrument.
The AFG31022: 63 commands for the TG2512A against 95 for the AFG31022 in TestFlow's library. Of those, 0 on the TG2512A and 12 on the AFG31022 are queries that read a value or state, and the library splits them into 56 and 9 subsystems.
Only the AFG31022 library has an operation-complete command (*OPC?); the TG2512A library has none. Only the AFG31022 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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.