Getting started¶
Install¶
Download Benchloom-…-windows-x64.zip from the
latest release,
unzip it anywhere and start Benchloom.exe. No installation, no Python and
no administrator rights are needed.
Windows may warn about an unknown publisher, because the program is not signed: choose More info, then Run anyway.
The folder also holds benchloom-cli.exe, the command line.
Download Benchloom-…-linux-x86_64.tar.gz from the
latest release,
unpack it anywhere in your home folder and start it:
tar xzf Benchloom-*-linux-x86_64.tar.gz
Benchloom/Benchloom
No installation and no root rights are needed. Benchloom/benchloom-cli
desktop-entry adds Benchloom to the app menu, with its icon (run it again
after moving the folder; --remove takes it out again).
benchloom-cli is the command line.
It needs a 64-bit Linux with glibc 2.35 or newer (Ubuntu 22.04, Debian 12,
Fedora 36 or newer). If it does not start on X11 and names the Qt platform
plugin "xcb", install libxcb-cursor0 (Debian, Ubuntu) or
xcb-util-cursor (Fedora, Arch).
With Python 3.11 or newer, on Windows or Linux:
pip install "benchloom[gui,usb]"
benchloom gui
On Linux, benchloom desktop-entry adds the app to the app menu.
The extras add parts you may not need:
| Extra | Adds |
|---|---|
gui |
the desktop app (without it, tests run from the command line only) |
usb |
USB instruments such as the Hantek scope, and USB-GPIB adapters |
visa |
instruments through VISA, including vendor GPIB adapters |
Needed to change Benchloom itself:
git clone https://github.com/criscrafter/benchloom
cd benchloom
python -m venv .venv
.venv\Scripts\pip install -e ".[gui,usb,dev]" # Linux/Mac: .venv/bin/pip
.venv\Scripts\benchloom gui
.venv\Scripts\pytest runs the tests; they use the simulators, so they
need no hardware. CONTRIBUTING.md
has the rest.
Linux: serial and USB access¶
Linux lets a user open instruments only with permission, which is set up once per PC:
-
Serial ports (
/dev/ttyUSB0,/dev/ttyACM0, …, including Prologix and AR488 adapters): add your user to the port's group, usuallydialout(uucpon Arch), then log out and in again:sudo usermod -aG dialout $USEROn Ubuntu, the
brlttypackage (for Braille displays) can take over CH340 adapters, so that the port vanishes right after plugging in. Remove it if you do not use a Braille display. -
USB instruments (the Hantek scope, USBTMC instruments, the xyphro UsbGpib adapter): install Benchloom's udev rules, then plug the instrument in again. No other driver is needed.
benchloom udev-rules | sudo tee /etc/udev/rules.d/70-benchloom.rules sudo udevadm control --reload-rules && sudo udevadm triggerWith the download, use
Benchloom/benchloom-cli udev-rules. The rules give access to whoever is logged in at the PC; for a test PC used over SSH, add--group plugdev(or another group you are in).
Updates¶
When Benchloom starts, it asks GitHub whether a newer version
is out. If so, a bar under the toolbar says which one, and What's new and
download opens its release page. For the Windows or Linux download, get the
new zip or .tar.gz there; installed with pip, update with pip install --upgrade benchloom. Skip
this version stops the bar for that version; Later hides it until the next
start.
The check sends nothing about you or your projects: it is an ordinary request for the latest release, which GitHub sees with your IP address. Switch it off under Settings → General; About → Check for updates checks at any time.
Your first test¶
- Choose New project, give it a name, and pick Lua script or Visual. A Lua project is a text script; a visual one is built from nodes. The choice is fixed per project.
- Leave Start from on Example. The project starts with a simulated power supply and a voltage sweep, so it runs without hardware.
- Press Run (F5). The sweep sets 1 V to 10 V, logs voltage and current,
and checks the current at 10 V. The Plot draws the rows as they arrive,
the Data tab lists them, and the status bar shows the verdict:
PASS · Finished · 10 row(s) logged · 1 of 1 checks passed. - Press Report to open the run's report in your browser.
The example script:
-- Sweep the supply from 1 V to 10 V and record voltage and current.
print("Connected to " .. psu:idn())
psu:set_current_limit(2)
psu:set_output(true)
for volts = 1, 10 do
psu:set_voltage(volts)
sleep(0.1)
log { set_V = volts, V = psu:measure_voltage(), I = psu:measure_current() }
end
-- A pass/fail check: the run passes only if every check does (see report.html).
check("Current at 10 V", psu:measure_current(), 0.9, 1.1, "A")
psu:set_output(false)
print("Sweep finished")
psu is the device the project lists; Lua scripts describes
everything else a script can use.
Real instruments¶
In the Devices panel, Add… opens the list of device types the plugins
provide, grouped by manufacturer: Official ones come with Benchloom,
Third party ones are plugins you installed. Type in the search box to find
a type by name, id, manufacturer or description (such as HP 3478), or pick a
kind such as Multimeter or Power supply to see only those. The panel on the
right describes the type picked: its connections, settings and description.
Pick one, give it a name (the name the test uses, such as psu) and
a resource: where the instrument is connected, such as serial://COM3 or
prologix://COM4/5. Test connection asks the instrument who it is.
Find… next to it looks for connected instruments. It first only lists the ports and recognizes USB devices by their ids, sending nothing. Tick the ports with instruments on them and press Ask ticked ports to find out what is there; every line sent is shown. Pick a device type under something found and press Add device…: the Add device dialog opens with the type and resource filled in. What asking a port can do to an instrument is in Safety.
To switch a device from the simulator to the real instrument, open it with Edit and press Find… in the device dialog. It looks for that device type only: USB devices are recognized at once, and Search ticked ports asks the serial ports with nothing but that type's own query, which the dialog lists. The ports start ticked; untick any with something on it that must not be disturbed. Ports other devices of the project use are left alone, except a GPIB adapter: other instruments can share its bus, so it is still searched, skipping the addresses the project's instruments have. If more than one is found, all are listed: pick one and press Use this one, then Test connection. The button is off for device types whose plugin does not say how to recognize them. Projects lists every kind of resource, and Instruments the settings each instrument needs.
Double-click a command under a device to add it to the test: a line in a script, a node in a visual test.
Tip
Keep the simulator (sim://) while you write a test, and switch to the
real resource when it works. Most drivers come with a simulator that
behaves like the instrument, including its errors.
Start from a template¶
Start from offers ready-made projects, besides Example and Empty project (no devices and an empty test):
- Bode plot: gain and phase of a circuit against frequency, with a Feeltech FY6900 generator and a Hantek DSO5102P scope. Wire generator CH1 to the circuit's input and to scope CH1, and the circuit's output to scope CH2. Set the sweep on the front panel; the plot shows gain and phase on a log frequency axis, and the script measures the -3 dB points. The input and output waveform of each point are saved as images, and the -3 dB point can be checked against limits. It starts on simulators with a simulated RC low-pass; set the two resources for real hardware.
What a run leaves behind¶
Each run gets a folder under the project's runs/, named by date and time:
| File | Holds |
|---|---|
data.csv |
the rows the test logged, with time_s (seconds since the start) |
console.log |
everything the test printed, and errors |
run.json |
status, verdict, check counts, Benchloom version, devices and how each one's shutdown went |
checks.csv |
each pass/fail check: name, value, limits, unit, result |
waveforms/ |
saved waveforms as CSV, SVG and PNG |
report.html |
one page with the verdict, checks, a chart, the waveforms, the devices, the data and the console |
main.lua, or main.graph.json and graph.lua |
the test exactly as it ran; a visual test also as the Lua it became |
Show run folder in the toolbar opens the folder of the last run.
Past runs¶
The Runs tab, next to the console, lists the project's runs, newest first, with their verdict, row and check counts and duration. Double-click one for its report. Show loads its data into the plot and the Data tab, and its console. Compare draws its curves dashed next to the current ones, also while the next run is being measured, so a change to the circuit or the test shows right away; Clear comparison removes them. Delete moves a run to the recycle bin.
Next¶
- Projects: the project file, resources and plot settings.
- Lua scripts or Visual tests.
- Front panel: controls you use while a test runs.