-
Notifications
You must be signed in to change notification settings - Fork 1
Workbench and Instruments
A workbench is a JSON file in workbenches/ that describes your connected instruments. One is symlinked as workbenches/active.json — this is what the GUI and all scripts use by default.
Each instrument entry looks like:
{
"resource": "USB0::0x2A8D::0x1302::MY12345::INSTR",
"connection": "USB",
"manufacturer": "Keysight",
"model": "EDU36311A",
"serial": "MY12345",
"type": "psu",
"role": "psu",
"family_id": "keysight_edu36311a"
}| Field | Description |
|---|---|
resource |
PyVISA resource string — uniquely identifies the physical instrument |
connection |
USB, TCPIP, or ASRL (serial) |
type |
Instrument class: scope, psu, awg, dmm, load, smu
|
role |
How scripts find the instrument: scope, psu, generator, dmm, load, smu
|
family_id |
Key into eewBackbone.json — determines which SCPI commands are used |
role is the field scripts use to look up instruments. This means your test scripts work regardless of which USB port or IP address an instrument is on.
When you load a workbench, the GUI shows one card per instrument. Each card has live controls appropriate for the instrument type:
- Scope — channel settings, timebase sync, measurements, screenshot
- PSU — per-channel voltage/current set and readback, output on/off
- AWG / FGen — waveform type, frequency, amplitude, offset, output on/off
- DMM — measurement mode selector, single/continuous measurement
Cards show a connection status dot (amber = pending, green = connected, red = error). The connection status of an instrument does not affect other instruments.
If an instrument is not automatically recognised (no match in eewBackbone), its card shows an Assign instrument… button. For any recognised instrument, hover its card to reveal a ✎ edit button. Both open the same assignment picker:
- Type — select the instrument class (Scope, PSU, AWG/FGen, DMM, Load, SMU)
- Vendor — filtered by type
- Family / Model — filtered by vendor; selects the exact SCPI dialect
-
Role — optional override (defaults sensibly:
psu,generator,scope, etc.)
On confirm the workbench file is updated immediately and the new SCPI family activates without needing to reconnect.
- Instrument returned an IDN string that doesn't match any known pattern
- You want to use a compatible family's commands on an unlisted variant
- The auto-detected family is wrong (e.g. a rebadged instrument)
If you find yourself manually assigning the same instrument repeatedly, the right fix is to add its IDN pattern to core/eewBackbone.json. See eewBackbone Reference for how.
Scripts use open_by_role(rm, wb, role) from core/workbench.py to open instruments:
from workbench import load_workbench, open_by_role
import pyvisa
wb = load_workbench() # loads active workbench
rm = pyvisa.ResourceManager("@py")
psu = open_by_role(rm, wb, "psu")
gen = open_by_role(rm, wb, "generator")If you have two PSUs in a workbench, give them distinct roles (e.g. psu_main, psu_bias) by editing the workbench JSON directly.