PortDock

PortDock Plot Guide

Live graphs of numbers from serial, TCP and UDP

About

PortDock Plot draws numbers arriving over serial, TCP or UDP as a live graph — for checking and recording the output of boards such as Arduino and ESP32, sensor modules, and devices or PLCs that stream values.

  • Sources: serial (port, baud, 8N1), TCP client (connect to the device's port), UDP receive (multicast too).
  • Parsing: text lines (comma, space, tab or semicolon, detected automatically), «name:value» pairs (as in the Arduino Serial Plotter), a header line as channel names, and binary frames (start bytes, u8–f64, endianness, checksum).
  • Graph: up to 32 channels (color, show/hide, name, left/right axis), last N points or N seconds, auto or fixed Y, pause (keeps receiving), cursor readout, Δt and Δvalue between two markers, zoom and pan.
  • Statistics table (last, min, max, mean), raw input (failed lines in red with the reason), CSV recording while receiving, CSV and PNG export of the view.
  • Free (GPL-3.0), in English and Korean.

Getting started

  • 1. Make the device print numbers on a line. Arduino: Serial.print(t); Serial.print(','); Serial.println(h); → «23.1,40». With names: Serial.print("temp:"); … → «temp:23.1,hum:40».
  • 2. On the left, «Source» serial → port and baud (the sketch's Serial.begin). TCP: device address and port. UDP: the port on this PC.
  • 3. Leave «Format» on «Text lines» with separator «Auto» — that covers most devices.
  • 4. «Start» (F4). The graph and the «Channels» table appear when values arrive. Nothing? Check the «Raw input» tab to see what really arrives.
  • 5. To keep everything use «● Record CSV»; to keep only the view, «View CSV» or «PNG».

Layout

  • Left: source (serial, TCP, UDP) and its settings, «Format» (data shape, separator, header or binary frame), Start/Stop and status, counters (rows, failed, rows/s, bytes).
  • Toolbar above the graph: ⏸ Freeze view / ▶ Live, View (last points or seconds and the width), Y auto/fixed (plus «Y right» when a channel uses the right axis), ● Record CSV, View CSV, PNG, Clear.
  • Centre: the graph (legend on top) and the measurement line below it (A, B, Δt, Δvalue).
  • Bottom: tabs «Channels» (show, color, name, axis, last, min, max, mean) / «Raw input». Drag the bar between them to resize (double-click resets).
  • 📌 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.

Sources

  • Serial: port, baud, data bits, parity, stop bits (usually 8N1). «Assert DTR» under «Advanced» (on by default) lets native-USB boards (Leonardo, ESP32-S2/S3, RP2040 …) start sending; boards such as the Uno reset once when the port opens. «Reconnect after unplug/replug» is on by default.
  • TCP client: this PC connects to the device's address and port and receives. Reconnects every 2 s after a drop. (If the device connects to the PC instead, use PortDock TCP as a server.)
  • UDP receive: datagrams sent to the «Listen address» (0.0.0.0 = every interface) and port on this PC. A datagram without a line ending still counts as one line. For multicast senders, enter the group in «Multicast group».
  • A port that is not in the list (one registered as a modem, some virtual ports) can be opened by typing its name (e.g. COM12) with «Type a port…» at the bottom of the port list. The list also includes ports registered in Windows SERIALCOMM.
  • The «▾» next to the TCP and UDP address box lists the last 8 address:port pairs that started receiving successfully. Pick one to fill both boxes; ✕ removes that entry.
  • If the connection drops or starts waiting to reconnect while you work in another window, Plot's taskbar button flashes. Pressing «Stop receiving» yourself does not flash; turn it off in Settings (⚙).
  • The source can be filled from the command line: «portdock-plot.exe --serial COM3 --baud 115200» · «--tcp 10.0.0.5:5000» · «--udp 5005» (one source only). It only fills the boxes — press «Start» to begin receiving. Invalid arguments are ignored and reported in one notice.
  • Add «--auto» to start receiving right away — with the settings from the command line, or else the last source that started successfully. If the serial port is not present, it does not start.
  • While receiving, source settings are locked; «Format» can change (the parser restarts — partial lines and names are dropped).

Text lines

  • Lines may end in LF, CR LF or CR. Empty lines are skipped. 4096 bytes without a line ending are cut and reported as a failed line.
  • Separator «Auto»: tab if the line has one, else semicolon, comma, space. With semicolon, tab or space, «1,5» reads as 1.5 (decimal comma). A trailing separator («1,2,») is not an empty field.
  • Numbers: 23 · -1.5 · +1.0E+00 · 0x1F (hex). An empty field (the middle of «1,,3») is a blank (the line breaks). A non-numeric field becomes a blank and the line shows in «Raw input» in red with the reason («Not a number: 2: «abc»»).
  • «name:value»: temp:23.1,hum:40 · temp:23.1 hum:40 · a=1 b=2 · «temp: 23.1» all work. Each name gets a channel (in order of first appearance) and keeps it even if the order changes. Unnamed numbers mixed in get their position («2») as the name.
  • Header: a line with no numbers and two or more fields (time,volt,amp) becomes the channel names; sent again, the names change. With «Off» such lines are failed lines. One-word lines such as «Ready» are failed lines, not names.
  • Up to 32 channels — extra fields are dropped with a reason.

Binary frames

  • Frame = [start bytes…][value × channels][checksum], fixed length, shown on the left as «Frame n bytes = start + values + checksum».
  • Start bytes (HEX, e.g. «AA 55», up to 8) are used to find frames. Bytes skipped while searching show in «Raw input» as «Skipped n bytes looking for the start bytes». Empty: frames are cut by length in arrival order — after a one-byte slip only a checksum can resync.
  • Value type: u8, i8, u16, i16, u32, i32, f32, f64. Byte order: little-endian (default on Arduino, ESP32 and PCs) or big-endian.
  • Checksum: SUM8, XOR (BCC), CRC8, CRC16 Modbus / CCITT / XMODEM, LRC, SUM16, CRC32 — computed from after the start bytes up to the checksum by default («Include start bytes in checksum» changes that). Bad frames are dropped and the search resumes one byte later.
  • Arduino example: byte f[7] = {0xAA, 0x55}; int16_t a = analogRead(A0), b = analogRead(A1); memcpy(f+2,&a,2); memcpy(f+4,&b,2); f[6] = f[2]+f[3]+f[4]+f[5]; Serial.write(f,7); → start «AA 55», 2 channels, i16, little-endian, checksum SUM8.
  • Variable-length frames with a length field are not supported yet.

Viewing the graph

  • View «Last points»: the last N points by arrival order (default 1000). «Last seconds»: the last N seconds of the PC's receive time — not the device's clock; USB and network batching can make spacing uneven (send a timestamp or counter channel from the device when exact spacing matters).
  • The buffer holds the last 100,000 rows (about 100 s at 1 kHz). Use «● Record CSV» for longer runs.
  • Y «Auto» fits the visible values; «Fixed» uses min and max. Set a channel's «Axis» to right to get a right axis with its own «Y right».
  • ⏸ Freeze view (Space) freezes only the graph; receiving and recording continue (to stop receiving, use «Stop receiving» on the left). ▶ Live (End, or double-click the graph) returns. During a long pause the viewed range may roll out of the buffer.
  • Wheel: horizontal zoom around the mouse. Shift+wheel: vertical. Drag: pan (Shift+drag pans vertically too). Zooming or panning pauses automatically.
  • Cursor: hover the graph for the nearest point's index, time and channel values.
  • Measuring: click the graph for marker A, again for B. The line below shows Δt, Δn (points), 1/Δt (Hz) and Δvalue per channel. A third click starts a new A. Right-click, Esc or «Clear markers» removes them.
  • With more points than pixels, each pixel column draws its first, min, max and last value, so spikes never vanish. Sparse data also gets dots.

Channels and raw input

  • «Channels» tab: show/hide, color (the 8 defaults stay distinct for color-vision deficiency; channels 9+ reuse them dashed), name (empty uses the device's name or CH1…), axis (left/right), the latest value and the min, max and mean of the visible range.
  • «Raw input» tab: the last 300 lines. Failed lines in red with the reason, events such as connect/disconnect in gray. Binary frames as HEX.
  • Counters on the left: rows, failed, rows per second, bytes. If the screen could not keep up and rows were dropped, that is shown separately (the CSV recording still has them all).

Watch and alarms

  • Use 🔔 in the «Watch» column of the channel table to set conditions on a channel. Watching runs only while receiving and judges every row received. «Communication lost» means no data row arrived for that many seconds. «Stuck» catches a sensor or firmware that keeps sending the same value.
  • Conditions: low limit (alarm below), high limit (alarm above), no change (stuck) for N seconds, communication lost for N seconds. Empty boxes are skipped. With a «return margin» (hysteresis) a low alarm clears only at «low + margin» or above and a high alarm at «high − margin» or below, so a value wobbling at the limit does not make the alarm flicker.
  • When one trips the row turns red and the «Watch & alarms» list above records the condition, value, raise and clear times and duration. «Ack» stops the repeating sound («Acknowledge all», «Clear ended»). If the window is behind others the taskbar button flashes. Turn the sound off with «Sound» in the list. Nothing is sent to the Windows notification center.
  • «Log CSV…» appends raise, clear (with seconds), ack and stop lines as time,event,name,condition,value,duration_s every second (same way as the value log; opens directly in Excel).
  • Conditions are kept in the app settings on this PC. Judging happens on screen only; nothing is written to the device.
  • PortDock is not a safety device — it is a monitoring aid. Equipment protection and interlocks belong in the PLC and safety circuits.

Recording and saving

  • «● Record CSV» (Ctrl+Shift+L) writes every value while receiving — time (local, ms), elapsed_s (seconds since recording started) and the channels. The first line holds the channel names at that moment. Starts with a BOM so Excel shows non-ASCII names. Kept even when the graph is paused or the buffer rolls over; flushed to disk every second.
  • «View CSV» (Ctrl+S): only the visible range — time, elapsed_s, index (arrival order), channels.
  • «PNG»: the graph image (legend, ticks and markers). «Clear» (Ctrl+L) empties the buffer, graph, raw lines and markers.

Try it with Simulator (no device)

Without a device, the «Device-initiated message» feature of PortDock Simulator can stream values on the same PC.

  • 1. Open PortDock Simulator, mode «UDP» — «Listen port» 5006, «Send to» 127.0.0.1 : 5005 — and «Start».
  • 2. Expand «Device-initiated message»: ASCII, content «temp:2{rand 0..4 dec}.{rand 0..9 dec},hum:{rand 40..45 dec},n:{counter dec}», «Line ending» CR LF.
  • 3. Turn on «Repeat (ms)» 100 — every 0.1 s a line such as «temp:23.4,hum:41,n:0» goes out ({rand} and {counter} are filled on every send).
  • 4. In PortDock Plot: source «UDP receive», listen address 0.0.0.0, port 5005 → «Start». Three channels temp, hum and n appear; n has a different scale, so set its «Axis» to right.
  • 5. Click the graph twice and check that Δn equals n's Δvalue between markers A and B; turn «● Record CSV» on and off and open the file in Excel.
  • For serial, open one side of a virtual COM pair (com0com etc.) in Simulator and the other in Plot. For TCP: Simulator «TCP server» on port 5000, Plot «TCP client» 127.0.0.1:5000.
  • To see failed lines, change the content to something like «temp:{rand 0..9 dec}x» — «Raw input» shows red lines with the reason.

Out of scope (not yet)

  • TCP server mode (the device connects to the PC), MQTT, BLE, Modbus polling — for Modbus value trends use «Trend» in PortDock Modbus Master.
  • Variable-length binary frames with a length field, per-channel scale/offset, XY (Lissajous) plots, FFT, reopening a saved CSV.
  • Sending commands to the device — use PortDock Serial, TCP or UDP alongside (two programs cannot open the same port at once).

Settings (⚙)

  • Language, theme and font size. Export/Import settings moves the source, format, view, channel names and colors 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.

Shortcuts

  • F4: start / stop receiving (same as the button on the left).
  • Space: freeze / unfreeze the view (outside text boxes and buttons — receiving and CSV recording continue).
  • End: back to the live view (drops zoom and pan). Double-clicking the graph does the same.
  • Esc: clear markers A and B (outside text boxes).
  • Ctrl+S: save view CSV (visible range only). Ctrl+Shift+L: start / stop CSV recording. Ctrl+L: clear (buffer, graph, raw lines and markers; a recording file is kept).
  • 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 is open or while composing Korean text.

Troubleshooting

  • Empty graph: check «Raw input». If nothing arrives, check baud, port and DTR (native-USB boards); for TCP/UDP the address, port and firewall. Garbled text means the baud is wrong.
  • Red «No numbers» lines: the device prints text such as «Ready» — harmless. If value lines are red, the separator or format differs (pick the separator explicitly).
  • Values land in the wrong channel: when the number or order of fields changes per line, they are split by position — send «name:value» so the channel follows the name.
  • Odd binary values: check endianness, value type and channel count, and look at the frame boundaries in the HEX of «Raw input».
  • «Port is busy»: close the Arduino IDE Serial Monitor/Plotter or other terminals.
  • The program does not open: Microsoft Edge WebView2 is required (included in Windows 11).

Terms

  • Baud (bps) · 8N1: Bits per second; both sides must match. 8N1 = 8 data bits, no parity, 1 stop bit.
  • CR · LF · CR LF: Line-end characters. CR = 0x0D (\r), LF = 0x0A (\n). Each device uses CR, LF or CR LF to end a line.
  • RX · TX · B/s: RX (◀) = received, TX (▶) = sent. B/s is bytes per second.