About
PortDock SCPI is an «instrument terminal» for SCPI test equipment (power supplies, multimeters, oscilloscopes, signal generators, loads …): send commands and read the answers. No VISA (NI-VISA, Keysight IO Libraries) needed.
- Connections: LAN «socket» (raw SCPI socket, usually TCP 5025) and serial (RS-232).
- Query, write and read with response times, *IDN? identification, *RST and *CLS, error queue draining (SYST:ERR? until 0), *OPC? waits.
- Command history (↑↓) and command list, completion for common SCPI commands, repeated numeric measurements (table, trend, statistics, CSV), and IEEE 488.2 block data (#…) with HEX preview and file save.
- Free (GPL-3.0); the interface is in Korean and English.
Getting started
- 1. Look up the IP in the instrument's front-panel LAN settings and check that the «socket» service (Sockets, raw SCPI, port 5025) is on. PortDock Net Scan can find the IP.
- 2. On the left, «Connection» LAN → IP in «Instrument address», «Port» 5025 (usually leave it) → «Connect» (F4).
- Addresses you connect to successfully are remembered. Pick one from «▾» next to «Instrument address» to fill it back in (✕ removes it); typing in the address box also suggests recent addresses.
- 3. On connect, *IDN? fills «Instrument» on the left with maker, model, serial number and firmware (turn off «Ask *IDN? on connect» to skip).
- 4. Type a command in the box at the top and press Enter — ending in ? it «queries» (sends and waits), otherwise it «writes» (sends only). The answer and response time appear in «Last reply», the exchanged lines in «Traffic».
- 5. Wrong commands go to the instrument's error queue. Check it now and then with «Drain error queue».
- RS-232 instruments: «Connection» Serial → port, baud, parity, stop bits and flow control as set on the instrument. Match the line ending too (usually LF, sometimes CR LF).
- A port missing from the list (one Windows set up as a modem, some virtual ports) can be opened by name: choose «Type a port…» at the bottom of the port list and type it (e.g. COM12). The list also includes ports registered in Windows SERIALCOMM.
Layout
- Left: connection and address (or port and baud), «Line ending», «Timing» (response timeout, *OPC? timeout, ask *IDN? on connect), the connect button and status, «Instrument» (*IDN? decoded), «Common actions» (*IDN?, *RST, *CLS, drain error queue, wait *OPC?) with the error queue result.
- If the connection drops while you are working in another window, the PortDock SCPI taskbar button flashes (not when you press «Disconnect» yourself). You can turn this off in Settings.
- Top centre: the command box with [Query] [Write] [Read] [+ To list]. While waiting, [Stop] (Esc). Under the box: what the command means (for common commands) and what Enter will do.
- Centre: «Last reply» — the text (or block info, HEX preview and [Save to file]), response time and failure reasons.
- Bottom: tabs «Traffic» / «Repeat measurement».
- Right: the command list (in a narrow window, open it with the «Commands» button).
- 📌 in the header: always on top — keeps this window above others (same as «Always on top» in Settings).
- The window title shows the current state (e.g. «COM3 115200 8N1 · Connected ● REC — PortDock Serial»), so you can tell windows apart on the taskbar.
- At 900 px wide or less (e.g. half-screen snap) the left panel folds away and a summary line with «⚙ Connection» (Port Inspector: «⚙ Ports», Net Scan: «⚙ Scan settings», Hardware Tester: «⚙ Checks») and the connect button appears. The language, 📌, !, AI, ? and ⚙ buttons move to the right end of that line. «⚙ …» opens the panel; ✕ or clicking outside closes it.
- AI in the header: Copy for asking AI — builds text for an AI chat with a question template («list likely causes and the order to check them»): program, version, connection settings, errors in this session and recent traffic (HEX, text and note lines; check results in Port Inspector and Hardware Tester, found devices in Net Scan). The template fits the app: device and wiring for the communication apps, PC and wireless setup for Hardware Tester, finding network devices for Net Scan, ports and drivers for Port Inspector. Review the preview and «Copy» — it only goes to the clipboard. Above 8,000 characters the oldest traffic lines are removed and the count is noted. User folders, default Windows PC names (DESKTOP-… etc.), the last 3 bytes of MAC addresses and public IPs are hidden; private IPs are kept by default because causes such as different subnets need them («Hide private IPs too» hides them).
- Whatever you paste goes to that AI service. Check device and company details before pasting.
- Text size: Ctrl+mouse wheel or Ctrl+= / Ctrl+- makes it larger or smaller, and Ctrl+0 returns to the default (13 px). It is the same value as «Font size» in Settings, so it is kept next time.
Query, write and read
- «Query»: sends and waits for one reply. The response time runs from the end of sending to the end of the reply (line ending or block end). Late bytes left over from an earlier query are discarded first, with an event line «Discarded n late bytes».
- «Write»: sends only — for setting commands (CONF:VOLT:DC 10, OUTP ON …).
- «Read»: reads one reply without sending — after sending a query with «Write», or for data the instrument sends by itself.
- Enter queries when the command ends in ?, otherwise it writes. Chained commands (*CLS;*OPC?) query if any part ends in ?.
- «Line ending» is appended when sending and marks the end of replies. LF and CR LF split at LF and drop a preceding CR; CR splits at CR. It can change while connected.
- If the timeout passes with something received, it is shown as «Received: …» — usually the line ending does not match the instrument.
Identification, error queue and *OPC?
- *IDN?: an IEEE 488.2 common command. The answer «maker,model,serial,firmware» is split into «Instrument». Anything else is shown as received.
- *RST resets the instrument to its default setup (ranges and outputs change — mind a supply with its output on). *CLS clears the status registers and error queue.
- «Drain error queue» asks SYST:ERR? until «0,"No error"» (or +0), at most 50 times, and lists the errors like «-113 Undefined header». It says so if 50 reads did not finish or the answer does not start with a number.
- Common errors: -113 Undefined header (unknown command, typo), -222 Data out of range, -410 Query INTERRUPTED (a new command before the answer was read), -420 Query UNTERMINATED (read without a pending answer).
- «Wait *OPC?»: the instrument answers 1 when pending operations finish — use it after long operations such as sweeps or initialisation. The wait is «*OPC? timeout (ms)» under «Timing» (30 s by default).
Block data (#…)
- Large answers such as screenshots and waveforms come as IEEE 488.2 «definite length blocks»: «#», digit count N, length (N digits), data. E.g. «#41000» followed by 1000 bytes.
- The length header tells where the data ends, so LF bytes (0x0A) inside binary data do not cut it. A line ending after the block is read with it.
- «#0…» (unknown length) is read up to the line ending — binary data containing that byte can be cut, so pick a definite-length format on the instrument.
- «Last reply» shows the header, length, text or binary and the first 1024 bytes in HEX. [Save to file] writes the data without the header (PNG, BMP, JPG and GIF get that extension suggested).
- One reply can be up to 64 MB. Traffic lines keep only the beginning.
Repeat measurement
- «Repeat measurement» tab: «Command» (a query answering with a number — MEAS:VOLT:DC?, READ?, FETC?), «Interval (ms)», «Count» (0 = until stopped) → «Start». Stop with Esc or «Stop».
- The interval is between measurement starts. If a reply takes longer, the next query follows right after it.
- The first value (before a comma) is read as a number; trailing unit letters as in «1.5 V» are ignored. SCPI 9.9E37 shows as overload (+OVLD) and 9.91E37 as NaN; both leave a gap in the trend.
- Timeouts are recorded as failed rows and it continues; it stops if the connection drops.
- Value table (last 500 rows), trend (last 1000), statistics (count, min, max, mean, standard deviation) and [Save CSV] (index, time, response time, value, reply text — opens in Excel).
Common SCPI commands
- The completion list holds only IEEE 488.2 common commands (*IDN?, *RST, *CLS, *OPC?, *WAI, *ESR?, *STB?, *SRE, *ESE, *TST?, *OPT?, *TRG, *SAV, *RCL) and SCPI basics (SYST:ERR?, SYST:VERS?, SYST:PRES, STAT:PRES, STAT:OPER:COND?, STAT:QUES:COND?, MEAS:VOLT:DC?, MEAS:CURR:DC?, MEAS:RES?, MEAS:FREQ?, CONF?, READ?, INIT, FETC?, ABOR). See the instrument's programming guide for its own commands.
- The short form (MEAS:VOLT:DC?) and long form (MEASURE:VOLTAGE:DC?) are the same command, in any letter case. For listed commands the meaning appears under the box.
- Keep frequent commands in the command list (right) and send them with ▶ or F2, F3, F5–F12. «Add examples» in an empty list adds *IDN?, MEAS:VOLT:DC? and SYST:ERR?. Commands ending in ? are queried, others written.
Try it with Simulator (no instrument)
Without a real instrument, PortDock Simulator can play one on the same PC.
- 1. Open PortDock Simulator: mode «TCP server (peer connects)», port 5025, framing «Terminator» 0A (LF).
- 2. With no rules yet, click the [SCPI *IDN? reply] example. The rule is ASCII «*IDN?» → «PORTDOCK,SIM,1» with CR LF, «Wildcards» off — keep it off so ? and * compare literally.
- 3. With «+ Add rule» add «MEAS:VOLT:DC?» → «+1.2{rand 0..9}E+00» (the last digit changes on each request) and «SYST:ERR?» → «+0,"No error"» (new rules inherit the format and line ending of the rule above and start with wildcards off).
- 4. «Start» Simulator. In PortDock SCPI: LAN, address 127.0.0.1, port 5025, line ending LF → «Connect». «Instrument» shows PORTDOCK · SIM · 1 (Simulator answers with CR LF; replies split at LF with the CR dropped).
- 5. «Drain error queue» → «No errors ✓». In «Repeat measurement»: MEAS:VOLT:DC?, interval 500, count 20 → «Start» → table, trend and statistics → [Save CSV].
- 6. Querying a command without a rule (e.g. VOLT?) times out with «No reply» — a real instrument would also queue -113.
- With wildcards on, ? and * in «*IDN?» match any character, so odd requests like «XIDN!» get answered too. Keep them off for SCPI rules.
Out of scope (not yet)
- VXI-11 (LAN, RPC — port 111 plus dynamic ports): not available. Use the instrument's «socket (5025)» instead; most LAN instruments offer both.
- HiSLIP (4880), USBTMC (USB) and GPIB need VISA or drivers and are not supported. A USB-only instrument with a «USB virtual COM» option can be used as serial.
- VISA features such as service requests (SRQ), device clear and remote/local switching do not exist on a socket. Use *OPC? to wait while the instrument is busy.
Traffic
- TX ▶ sent commands, RX ◀ replies, EV events (connect, disconnect, timeouts, discarded late bytes). Control characters such as line endings show as <CR>, <LF>. Timeouts and disconnects are red event lines.
- With «Response time» on, RX lines carry «12.3 ms» (for blocks «#41000 · 1000 B · 12.3 ms»).
- Find/filter, follow, line selection and copying work as in the other PortDock programs. «Save view» (Ctrl+S) writes the visible lines to a text file; «Log to file» (Ctrl+Shift+L) keeps appending new lines to a file.
- Follow: new lines are followed only while you are at the bottom. Scroll up to pause (the view stays put) — «↓ Jump to latest (n new)» appears at the bottom right. Click it, press End or scroll to the bottom to follow again. The «Auto-scroll» checkbox shows whether it is following.
- Selecting: click a line, Shift+click for a range, Ctrl+click to add or remove one. Clicking does not stop following.
- Right-click menu: Copy lines · Copy HEX · Copy ASCII · Copy HEX + ASCII · Copy as C array ({0x01, 0x03}) · Find this. Data copies (HEX, ASCII, C array) skip event lines (EV), one frame per line.
Settings (⚙)
- Language, theme, font size, log timestamp format and the number of lines kept on screen.
- «Start file log automatically» and the auto-log folder: each connection writes «portdock-scpi-date-time.log».
- «Export / Import settings» move the connection settings, command list and repeat measurement settings as a JSON file.
- «Always on top»: keeps this window above other windows (same as 📌 in the header).
- «Expand all (expert view)»: shows the groups that are normally collapsed (advanced connection, receive settings, fault injection, statistics, scan options, triggers, auto-reply …) open. Folding one while it is on lasts only for this run. Turning it off returns each group to its remembered state.
- «Send usage statistics» (off by default): when on, the program sends an anonymous summary to Aptabase (EU) once, as you close the window — how many times each feature was used (connect, send, read … — counts only), minutes open, program/Windows version, display language and installed/portable edition. Traffic, IP addresses, ports, COM names, file paths and PC/user/device names are never sent. You're asked once on first run (closing the prompt without choosing means no), and you can turn it off here at any time. If you're offline or sending fails, the data is dropped. Builds without this option never send statistics.
- Once you answer the usage-statistics question in one PortDock app (the prompt or this option), other PortDock apps on this PC that have not asked yet use that answer as their starting value instead of asking again (portable copies: those in the same folder). Each app can still change it here, and an imported settings file never turns it on. Only «asked» and your choice are stored (installed: %LOCALAPPDATA%\dev.portdock\shared-consent.json, portable: portdock-data\shared-consent.json).
- «Check for new versions (once a day)» (off by default): when on, the program asks GitHub (api.github.com) once a day for PortDock's latest release only. If a newer version exists, a notice bar with a «Release page» button appears at the bottom of the window. No data is sent and nothing is downloaded or installed. «Don't remind me about this version» silences that version. The «Check for updates» button under «About» still just opens the release page.
- «Keep the PC awake while connected or logging» (off by default): keeps the PC from going to sleep while connected (or running) or logging to a file, so a USB adapter does not vanish during an overnight log. The screen may still turn off. Released when you disconnect or close the window; power settings are not changed.
- «Reopen the last connection at startup» (off by default): at startup, connects (starts) with the settings of the last successful connection. Stops quietly if that port or device is missing. Turn it off for devices that reset when the port opens (Arduino, …). The «--auto» command-line option does the same.
- Command-line «--auto» (e.g. added to the end of a shortcut target): on startup, connects right away with the last settings that connected successfully (LAN address and port, or serial port and baud, plus line ending). If the serial port is not there, it does not connect.
Shortcuts and tips
- F4: connect / disconnect (same as the button on the left).
- Ctrl+L: clear the on-screen log (file logs are kept).
- Ctrl+S: save view.
- Ctrl+Shift+L: start / stop logging to file.
- End: jump to the latest log line and follow again.
- After clicking the log (focus in the log): ↑/↓ move the selection · Shift+↑/↓ extend it · PageUp/PageDown one screen · Home first line · End last line (and follow again). Moving pauses following.
- Ctrl+C: copy the selected log lines as «time direction data» (in the current view). Inside a text box it copies normally.
- Ctrl+F: focus the log find box. In it, Enter next, Shift+Enter previous, Esc clear.
- F1 or the ? button: this help. Close it with Esc.
- Number boxes: ↑/↓ by 1, Shift+↑/↓ by 10, PageUp/PageDown by 100, or the mouse wheel once the box is focused. The baud box steps through the listed rates.
- Shortcuts are ignored while a dialog or the right-click menu is open, or while composing Korean text.
- Enter: in the command box, query (ends in ?) or write. ↑↓: earlier commands.
- Esc: stop a pending query or the repeat measurement (outside the command box).
Troubleshooting
- «Connection refused»: wrong port (not every instrument uses 5025 — see «socket port» in the manual) or the socket service is off. Some instruments refuse new connections while another program (a VISA session) is connected.
- «No reply (timed out)»: a non-query sent as a query, a typo (check the error queue), or a slow measurement (raise «Response timeout» or use *OPC?).
- «The reply did not end»: the «Line ending» does not match the instrument (some use CR).
- -410 Query INTERRUPTED: a new command was sent before the answer was read. If you sent a query with «Write», take the answer with «Read» first.
- Garbled serial text: check baud, parity and data bits, flow control (does the instrument use DTR/DSR or RTS/CTS?) and whether a null-modem cable is needed.
- The program does not open: Microsoft Edge WebView2 is required (included in Windows 11).
Terms
- *IDN? · *RST · *CLS: SCPI common commands — ask the instrument's identity · reset to the initial state · clear error and status records.
- Terminator: The character that ends a command or reply line (usually LF or CR LF). It must match the instrument, or each reply waits until the timeout.
- Timeout: The longest time to wait for a reply. After that it counts as «no response».