-
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.

The scope card has a Measurements section where you can add any number of measurement slots and poll them continuously.
Use the channel selector and measurement type dropdown at the bottom of the Measurements section, then click + Add. Each slot shows the channel badge, measurement label, and live value. Slots can be removed individually with the × button.
Available measurement types: V p-p, Vmax, Vmin, V avg, V rms, Frequency, Period, Rise time, Fall time, Duty cycle.
Click ▷ Execute to start continuous polling. The button turns into ■ Stop. Use the interval dropdown (200 ms – 5 s) to control how often the scope is queried.
The Max slots dropdown (default 4) tells the app how many measurements your scope can display simultaneously. Most scopes support 4–5 on-screen measurement items at once.
How it works:
- On the first poll, or whenever the measurement list changes, the app sends a setup batch: it clears the scope's display items and registers each measurement. This is what causes the scope's measurement overlay to update.
- On every subsequent poll it sends query-only commands — no re-registration, just the reads. This is significantly faster and avoids unnecessary SCPI chatter.
- If the number of active measurement slots exceeds Max slots, the scope cannot hold all of them on screen at once, so a full setup is sent on every poll.
Set Max slots to match your scope's actual limit to get the fastest continuous refresh with the fewest commands sent.
Once instruments are connected, a state bar appears above the instrument grid with three actions.
Type a name in the field and click Save state. The current settings of all connected PSUs and AWGs are snapshotted and saved to workbench_states/<name>.json:
- PSU — voltage setpoint and current limit per channel
- AWG — waveform function, frequency, amplitude, and offset per channel
Output enable states are always saved as off — a deliberate safety choice so that loading a state never unexpectedly energises outputs. Turn outputs on manually after confirming the loaded settings look correct.
Click Load state to open a picker that lists all saved states with their instrument summary and timestamp. Select a state and click Load — the settings are applied to the matching connected instruments immediately, without reconnecting. Instruments not present in the saved state are left untouched.
Each entry in the list has a ✕ button to permanently delete that state.
Click Reset all (with confirmation) to drive all connected instruments to safe defaults:
- PSU — all channels set to 0 V / 100 mA limit, outputs off
- AWG — all outputs off, instrument reset
This is the GUI equivalent of python core/setWorkbench.py --reset-bench.
Saved states live in workbench_states/ at the project root as plain JSON. The format is compatible with setWorkbench.py config files and can be edited manually or shared between setups:
{
"name": "preamp_bias",
"saved_at": "2026-06-08T14:30:00",
"summary": "PSU EDU36311A, AWG EDU33211A",
"instruments": {
"USB0::0x2A8D::0x3602::MY12345::INSTR": {
"type": "psu",
"model": "EDU36311A",
"outputs": [
{ "channel": 1, "voltage": 12.0, "current_limit": 0.5, "enabled": false },
{ "channel": 2, "voltage": -5.0, "current_limit": 0.2, "enabled": false }
]
}
}
}The log panel on the right side of every tab shows timestamped messages from the backend — connections, warnings, errors, and SCPI activity.
Drag the left edge of the log panel to resize it. The width is saved to browser localStorage and restored on next launch.
Click the SCPI toggle button in the log panel header to enable verbose mode. When active, every SCPI command sent to any instrument is shown in the log with its full command string and response:
→ [scope] :MEAS:FREQ? (@1) ← 1.000010E+03
→ [psu] VOLT 5.0000,(@1)
→ [dmm] MEAS:VOLT:DC? ← +4.99987E+00
Each entry is labelled with the instrument role (scope, psu, awg, dmm, auto for automation tests). PSU background polling (V/I readback) is intentionally excluded to avoid flooding the log.
Verbose mode is off by default and only active while the toggle is on — it has no effect on instrument communication speed.
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 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.