# progpib A modern Python 3 API for the [Prologix](https://prologix.biz/) GPIB-ETHERNET controller. GPIB-USB is supported behind the same interface but is **untested** -- no GPIB-USB hardware was available while building this package (see `progpib/transport/serial.py`). ## Install (development) This package depends on [`bits`](https://git.groesz.org/Groesz.org/bits) (distribution name `binary-bits`), currently used as a local editable checkout rather than a pinned PyPI release -- install it first: ```sh python -m venv .venv .venv/bin/pip install -e ../bits .venv/bin/pip install -e .[dev] ``` ## Usage ```python from progpib import discover, GpibController # Find controllers on the LAN (broadcasts on every local interface): for device in discover(): print(device.mac_str, device.ip_address, device.name) # Talk to one: with GpibController.ethernet("192.168.1.50") as gpib: print(gpib.ver()) gpib.addr = 5 # address the instrument at GPIB primary address 5 gpib.eos = 3 # no GPIB terminator appended gpib.eoi = 1 response = gpib.query("*IDN?") print(response.decode()) ``` ## CLI ```sh progpib discover # find controllers on the LAN progpib info # controller version/mode/config progpib config --mac AA:BB:CC:DD:EE:FF --dhcp progpib config --mac AA:BB:CC:DD:EE:FF --static 192.168.1.50 255.255.255.0 192.168.1.1 progpib terminal --addr 5 # interactive pass-through terminal ``` ## Reference material `vendortools/`, `pty-gpib-emulator/`, `sampledata.txt` and `PrologixGpibEthernetManual.pdf` are kept as historical/reference material (original vendor tooling, a separate PTY-based emulator side project, and a captured protocol session) -- nothing in `progpib/` imports from them.