Skip to content

Troubleshooting

Ralf Steinert edited this page Oct 29, 2026 · 1 revision

No answer at all

PyVISA times out on the first query() over a SOCKET resource. A raw socket has no message end except the newline. Set both terminations:

rm.open_resource("TCPIP0::127.0.0.1::5025::SOCKET",
                 read_termination="\n", write_termination="\n")

nc or your own client gets nothing back. Every message must end with \n. printf '*IDN?' | nc localhost 5025 sends no newline and gets no answer; echo '*IDN?' | nc -q1 localhost 5025 works (-N instead of -q1 on macOS).

A command without ? "does not answer". Correct — only queries answer. scpi-sim query prints answers only for messages with a ?. Over VXI-11 and HiSLIP a read() after a command without a query runs into the timeout, as on a real instrument.

A query answers nothing, and SYST:ERR? shows -113,"Undefined header". The instrument does not know the command. Typical causes:

  • an abbreviation that is neither the short nor the long form (MEASU; only MEAS or MEASURE),
  • the SCPI path rule in compound commands: after ; a command continues at the level of the previous one, so MEAS:VOLT?;MEAS:CURR? fails and MEAS:VOLT?;:MEAS:CURR? works,
  • a command of another model's dialect — check which profile is running (*IDN?) and what it covers (the profile's module docstring lists what is left out).

Read the error queue after anything unexpected: scpi-sim query "SYST:ERR?".

Starting the server

cannot listen on 127.0.0.1:5025: address already in use. Another scpi-sim (or a real instrument proxy) runs on that port. Use --port 5030, or --port 0 for any free port (the output tells which).

Others cannot reach the simulator. It listens on 127.0.0.1 by default. --host 0.0.0.0 makes it reachable from other machines — and with it the control port of a bench, which has no authentication. Do that only on a network you trust.

cannot listen on 127.0.0.1:111 with a hint about the port mapper. See VXI-11 and HiSLIP: use --no-portmapper and the host,PORT resource string, or the Docker image.

Readings

The multimeter reads 0 V. On a bench, the meter measures the net its input is wired to. Is the relay closed (ROUT:CLOS (@101)), is the supply output on, and is the wiring in the bench file what you think? A generic supply needs OUTP ON; an HMP needs OUTP:SEL ON and OUTP:GEN ON.

Readings differ slightly every time. Multimeters add noise like real ones. Compare with a tolerance, or set noise: 0 in the bench file (--noise 0 for serve dmm). seed: makes the noise reproducible.

+9.90000000E+37. Overload: the reading does not fit the range. Use AUTO or a larger range.

The supply voltage is lower than set. The load draws more than the current limit allows, so the output is in current limit (OUTP:MODE? → CC on the generic supply). Raise the current limit or check the load.

A relay command fails with -221,"Settings conflict". Closing it would connect two supply outputs. scpi-sim refuses it, as you would want on a real bench.

VXI-11 and HiSLIP

-410,"Query INTERRUPTED" in the error queue. A message was sent while an answer was still waiting to be read. Usually a write("...?") whose answer is never read — fix the script; a real instrument does the same.

PyVISA says the operation is not supported when locking over HiSLIP. PyVISA-py does not implement HiSLIP locks. Use VXI-11 for locking from PyVISA-py.

TCPIP0::host,5098::inst0::INSTR fails with NI-VISA. That form is a PyVISA-py extension. NI-VISA needs the port mapper on port 111.

Browser demo

The demo shows a picture instead of the instruments. The simulator could not start in this browser (no WebAssembly, blocked downloads, very old browser). The Retry button tries again; everything else on the page works.

Still stuck?

Open an issue with the command line, the bench file and what SYST:ERR? says.

Clone this wiki locally