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: ⏸ Pause / ▶ 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 connection panel folds away and a summary line with «⚙ Connection» and the connect button appears. «⚙ Connection» opens the panel; ✕ or clicking outside closes it.

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».
  • 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».
  • ⏸ Pause (Space) freezes only the graph; receiving and recording continue. ▶ 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).

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.

Shortcuts

  • F4: start / stop receiving (same as the button on the left).
  • Space: pause / resume the graph (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).