VXI-11 (LXI) LAN control with Python — no sockets required
VXI-11 is the LXI-standard transport — a tiny Python library controls instruments on Windows, Linux and Raspberry Pi, including models with no raw socket.
VXI-11 is the RPC protocol behind LXI instrument control. It needs no VISA installation and runs anywhere Python runs, including a Raspberry Pi. It is the answer for Siglent models whose LAN port has no open socket — SDS2000X, SDS1000X, SDS1000CML+/DL+, SDG800 and SPD3303C — and it is a perfectly good choice on everything else too.
VXI-11 is an alternative transport, not a last resort, and it is not the only LAN route for the power supplies. The SPD3303X and SPD3303X-E support both VXI-11 and the raw socket on port 5025. An earlier version of this note listed them as socket-less; that was wrong. See the transport table below.
Install
pip install python-vxi11
Connect and control
import vxi11
inst = vxi11.Instrument('192.168.1.110')
print(inst.ask('*IDN?'))
inst.write('TDIV 1MS') # example: SDS timebase 1 ms/div
print(inst.ask('SARA?')) # sample rate querySiglent Technologies,SDS2304X,SDS2XJBD1R0001,1.2.2.2 R19 SARA 1.00GSa/s
ask() = write + read in one call; use write() / read() separately for binary transfers such as waveform dumps.
Why choose VXI-11 over raw sockets?
- It is the only LAN route on models with no 5025 socket — SDS2000X, SDS1000X, SDS1000CML+/DL+, SDG800, SPD3303C
- Discovery and instrument-side error handling are built into the protocol
- Message framing is handled for you — no read/write termination to configure, unlike a raw socket
- Identical code on Windows, macOS, Linux and Raspberry Pi
The same instrument, both ways
On a model that supports both — the SPD3303X here — these are equivalent. Choose on convenience, not necessity:
| Transport | Address / VISA resource | Port | SPD3303X / X-E |
|---|---|---|---|
| Raw SCPI socket | 192.168.1.205:5025 | TCP 5025 | Supported |
| PyVISA raw socket | TCPIP0::192.168.1.205::5025::SOCKET | TCP 5025 | Supported |
| VXI-11 / VISA | TCPIP0::192.168.1.205::INSTR | RPC (port 111) | Supported |
| USBTMC | USB0::0xF4EC::...::INSTR | — | Supported |
| Telnet service | telnet 192.168.1.205 5024 | TCP 5024 | Not supported |
Which services a given model offers is published by Siglent in Instrument Socket and Telnet Port Information. Check it before assuming — the pattern is not uniform across the range, and the power supplies in particular offer the socket but not Telnet.
For new automation on current instruments, raw sockets (port 5025) are simpler and a little faster; VXI-11 saves you the termination settings and is the only option on the models that lack the socket. Both are fully supported — use whichever suits the fleet you have.
Instruments used in this note
Related application notes
Our engineers use these instruments daily — ask us anything.