Skip to content

Connecting instruments

A device entry's resource says how Benchloom reaches the instrument. The instrument pages give the exact resource for each one.

Resource For
serial://COM5?baud=9600 RS-232, RS-485 and USB serial ports (serial:///dev/ttyUSB0 on Linux)
tcp://192.168.1.20:5025 a raw network socket: LAN instruments and serial servers
prologix://COM4/5 GPIB through a Prologix or AR488 adapter, here at GPIB address 5
usbtmc://03EB:2065 USB instruments (USBTMC) and the xyphro UsbGpib adapter
visa://GPIB0::5::INSTR anything a VISA library reaches
usb://049F:505A instruments with their own USB protocol (the Hantek scope)
sim:// the device type's simulator

GPIB through a Prologix or AR488 adapter

With prologix://, Benchloom waits for the adapter to answer ++ver (an Arduino Nano restarts when the port opens) and sets its read timeout (++read_tmo_ms) from the connection's timeout: the adapter keeps whatever the last program set, and a too short one makes slow measurements time out. A Prologix allows up to 3 s, an AR488 up to 32 s. Drivers of slow instruments split longer waits into several reads.

GPIB through the xyphro UsbGpib adapter

UsbGpib turns one GPIB instrument into a USB instrument (USBTMC). Benchloom can talk to it without a vendor VISA.

  • Connection: "USB instrument or UsbGpib adapter" in the Add device dialog, or resource = "usbtmc://03EB:2065". That is the first adapter found; add /<serial> to pick one. usbgpib:// is the same, shorter. The adapter only appears on USB while a powered instrument is connected to it.
  • Once per PC (Windows):
  • Run pip install "benchloom[usb]" (pyusb, python-usbtmc and the libusb library).
  • With the instrument switched on, use Zadig to install the WinUSB driver for the adapter (USB ID 03EB 2065). Zadig is a free download and needs no installation.
  • Once per PC (Linux): install Benchloom's udev rules (benchloom udev-rules, see Getting started). No other driver is needed.
  • Alternative: with a VISA installed (the adapter's author recommends R&S VISA), use visa://USB0::0x03EB::0x2065::<serial>::INSTR instead.
  • Instruments without *IDN? (the HP 3478A, 3458A and 6632A to 6634A): the adapter asks every instrument *IDN? at power-up. Turn that off once with benchloom usbgpib "!autoid off". benchloom usbgpib with no command lists the adapters.
  • One instrument per adapter. The adapter can address several GPIB instruments, but Benchloom does not switch between them yet.
  • Not tried on hardware. The transport is tested against a stand-in for the USBTMC library only.