🖥️ PyVISA Code Generator

Pick your instrument's connection settings below and get a ready-to-run Python code template using PyVISA — resource string, read/write termination, and a short write/query example, all in one copy-pastable block.

This targets GPIBee's default VXI‑11 mode over USB or Ethernet — the general first "go to" choice for talking to your instruments, and what the rest of this page assumes.

Before you run this:Install PyVISA first — pip install pyvisa. If you don't have a vendor VISA driver installed (NI-VISA, Keysight IO Libraries, etc.), also install the pure-Python backend with pip install pyvisa-py and open the resource manager as visa.ResourceManager('@py') instead of visa.ResourceManager(). For everything beyond this starting point, see our PyVISA & R&S VISA tutorial.
Connection settings
Optional shortcut: picking an instrument fills in the two termination settings below. You can always set them by hand instead, and you can change them afterwards. The list was compiled from instrument manuals and datasheets and is mostly not tested on real hardware, so treat it as a starting point rather than a fact.
The IP address or hostname of your GPIBEE / LAN-to-GPIB adapter.
Primary address (1–30), and secondary address if your instrument uses extended addressing.
How your commands to the instrument are terminated.
How the instrument marks the end of a message it sends to you.
Not sure? Start with EOI for both. Most GPIB instruments assert EOI on the last byte of a reply, and a read that ends on EOI works whatever characters the instrument puts before it. Add a character terminator only if a read hangs, which means no EOI arrived. A reply that comes back truncated points the other way: a terminator is set that appears inside the data, so remove it rather than add one.
Generated Python code
More examples
Useful Python code snippets
A growing set of ready-to-use PyVISA snippets for common tasks with GPIBee. Click a title to expand it.