On the MDX-400 bench, graph F carried every number that mattered: speed, torque, bus current, temperatures, state of charge and three status flags. A graph is the wrong view for “is it running, is it hot, has it tripped?”, so the bench got one screen with the battery, the inverter and the motor side by side. Nobody placed its 33 widgets by hand: the whole canvas is a text file, imported in one step.
What the firmware prints
The canvas reads graph F, Bench telemetry. The firmware sets it up once with 14 lines, then prints one line per sample with all 13 values:
~{F:I:Bench telemetry:4000:S:T:R:Sample::0}
~{F:S:1:F32:R:Speed:rpm:0:4FC3F7}
~{F:S:2:F32:R:Setpoint:rpm:0:FFB74D}
~{F:S:3:F32:R:Torque:Nm:0:BA68C8}
~{F:S:4:F32:R:DC bus current:A:0:FFD54F}
~{F:S:5:F32:R:Pack voltage:V:0:81C784}
~{F:S:6:F32:R:Electrical power:W:0:4DD0E1}
~{F:S:7:F32:R:MOSFET:°C:0:F06292}
~{F:S:8:F32:R:Motor winding:°C:0:FF8A65}
~{F:S:9:F32:R:State of charge:%:0:64B5F6}
~{F:S:10:F32:R:Pack temp:°C:0:A1887F}
~{F:S:11:F32:R:RUN::0:69F0AE}
~{F:S:12:F32:R:DERATE::0:FFA726}
~{F:S:13:F32:R:FAULT::0:FF5252}
~{F:1:2200.5:2200:5.93:12.06:51.93:626:48.2:45.4:51.00:29.4:1:0:0}
…
~{F:1:2970.6:3000:0.00:40.97:50.60:2073:76.0:52.3:50.88:29.5:0:0:1}
…
~{F:1:2999.7:3000:10.96:30.16:51.07:1540:78.1:54.7:50.81:29.5:1:1:0}
| Line | Fields | Meaning |
|---|---|---|
~{F:I:…} | Bench telemetry 4000 S T R Sample (empty) 0 | Graph F: name, 4 000 points per signal, Streamer mode, time X axis, raw X display, X label, no X unit, no SI scaling |
~{F:S:7:…} | 7 F32 R MOSFET °C 0 F06292 | Signal 7: 32-bit float sent as a real number, name, unit, no SI scaling, colour |
~{F:1:…} | 13 values | One sample with automatic X; the values go to signals 1 to 13 in ID order |
The flags (signals 11 to 13) carry 0 or 1. The second data line is the overcurrent trip: 40.97 A, RUN 0,
FAULT 1. The third is the derate: MOSFET 78.1 °C, DERATE 1.
Set it up in SerialFlow
Write the dashboard as text
The canvas is the file canvas_motor_bench.txt: a header, optional canvas hints, then one block per widget. Here is
its start and two of its 33 blocks:
=== SERIALFLOW CANVAS WIDGETS ===
Description: MDX-400 motor test bench - battery, inverter and motor synoptic bound to graph F (Bench telemetry)
--- CANVAS HINTS ---
Width: 1920
Height: 1080
BackgroundColorHex: 1A1D21
…
--- WIDGET: OnOffToggle ---
Label: FAULT
X: 1420
Y: 30
Width: 100
Height: 40
PrimaryColorHex: FF5252
BackgroundColorHex: 262C33
Binding: primary=F:13
Threshold: 1=FF1744
…
--- WIDGET: ArcGauge ---
Label: Speed
X: 1050
Y: 135
Width: 250
Height: 285
RangeMin: 0
RangeMax: 3500
UnitDisplay: rpm
DecimalPlaces: 0
PrimaryColorHex: 4FC3F7
BackgroundColorHex: 262C33
Binding: primary=F:1
…
=== END WIDGETS ===
| Line | Meaning |
|---|---|
--- WIDGET: ArcGauge --- | Starts a widget. The type key is one of the 35 types, for example ArcGauge, Sparkline, AlarmBanner |
Label | The widget’s title, and the only property you must give |
X, Y, Width, Height | Position and size in pixels |
RangeMin, RangeMax, UnitDisplay, DecimalPlaces | Scale of a gauge or bar, unit text, decimals |
PrimaryColorHex, BackgroundColorHex | Colours as six hex digits, without # |
Binding: primary=F:1 | The signal: role primary, graph F, signal ID 1 from the ~{F:S:1:…} line |
Threshold: 1=FF1744 | From the value 1 upwards, use this colour |
The binding is the only link to the firmware: a graph letter and a signal ID. 22 of the 33 widgets carry one; the
rest are titles, panels, frames, connectors and a run clock. Widgets can share a signal: F:7, the MOSFET, drives a
banner, a linear gauge, a value card and a sparkline.
Import the text
- ☰ → Tools → New Canvas Dashboard. An empty 1920 × 1080 canvas opens as a new tab.
- Click Edit on the canvas toolbar. The Widget Toolbox and the widget list appear.
- Choose Import/Export ▾ → Paste AI Text…. If the clipboard holds text that starts with
=== SERIALFLOW CANVAS WIDGETS ===, the dialog is already filled in. - Paste the text and press Import. SerialFlow confirms
Imported 33 widget(s). - Click Edit again to go back to run mode. The widgets update as soon as graph F data arrives.

Let an AI assistant write it. The format is made for this: plain Key: value lines. Choose Import/Export ▾ →
AI Format Reference and press Copy to Clipboard. You get a Markdown description of the format: all 35 type
keys with their default sizes, every property with its default, the binding and threshold rules, and an example.
Give it to your assistant with your firmware’s ~{…:S:…} lines, which hold each signal’s ID, name and unit, and
describe the screen: an arc gauge for speed, value cards for pack voltage and state of charge, an alarm banner on
the MOSFET, amber from 72 and red from 78. Paste the answer into Paste AI Text… and press Import. To
rework a canvas, Import/Export ▾ → Copy as AI Text copies the selected widgets (or all) in the same format.
Thresholds that match the derate
The MOSFET alarm banner in the header carries two thresholds:
--- WIDGET: AlarmBanner ---
Label: MOSFET
…
Binding: primary=F:7
Threshold: 72=FFA726
Threshold: 78=FF5252
A threshold applies from its value upwards. SerialFlow checks them in list order and the last one reached wins, so
list them from the lowest value to the highest: grey below 72 °C, amber from 72 °C, red from 78 °C. The limits are the bench’s own: the drive derates at 78 °C and releases below 72 °C, which the DERATE
indicator shows from signal 12. The status indicators use one threshold at 1: FAULT is red when signal 13 is 1,
grey when it is 0.
To change a limit, double-click the widget in edit mode. Widget Settings has four tabs: General, Appearance, Signals (role, graph, signal) and Thresholds, where Add Threshold adds a rule and × removes one. A rule is a threshold and a colour. It can also compare the minimum, maximum or average over the last N seconds instead of the value, trigger below the threshold instead of above, wait N seconds before it triggers, clear only a hysteresis below the threshold, and play a WAV or MP3 sound, once or repeated. On OK the widget shows the change at once.
The text file takes the same options after the colour. A red level that sounds an alarm when the MOSFET has averaged 78 °C or more for 10 s, and repeats it every 30 s until someone clicks Acknowledge on the canvas toolbar:
Threshold: 78=FF5252; statistic=Average; window=10; hold=10; sound=C:\Sounds\alarm.wav; repeat=30
Mute on the same toolbar silences every alarm sound; the status bar names each new alarm, with an Acknowledge button of its own.

The result

The speed steps up to 3 000 rpm and the hill pushes the current to about 30 A. The MOSFET passes 72 °C: the banner turns amber. A 41 A spike trips the drive: FAULT red, RUN grey, current near 0 A. The drive restarts, the MOSFET passes 78 °C, DERATE comes on and the banner turns red.

No time to design: the grid
The grid Signal Dashboard needs no layout. Open ☰ → Tools → Panel Configuration…, press + Dashboard, add a row per tile with + Add Widget (graph, signal, tile type, label, unit, colour, range) and press Create Now. Tiles fill 1 to 6 columns, in 8 types: numeric display, progress bar, radial gauge, text label, colour indicator, sparkline, on/off indicator and statistics. A tile can span several columns or rows, and + Threshold on its row adds the same kind of threshold rules as on the canvas, sounds included.

In your own firmware
The canvas needs nothing from your board but graph lines. Here is graph F with five of the 13 signals: speed, current, MOSFET, DERATE and FAULT.
#include <stdio.h>
/* Once after reset: graph F and the signals the canvas binds to */
void bench_graph_init(void)
{
printf("~{F:I:Bench telemetry:4000:S:T:R:Sample::0}\n");
printf("~{F:S:1:F32:R:Speed:rpm:0:4FC3F7}\n");
printf("~{F:S:4:F32:R:DC bus current:A:0:FFD54F}\n");
printf("~{F:S:7:F32:R:MOSFET:°C:0:F06292}\n");
printf("~{F:S:12:F32:R:DERATE::0:FFA726}\n");
printf("~{F:S:13:F32:R:FAULT::0:FF5252}\n");
}
/* Every control-loop tick: one line, values in signal-ID order */
void bench_graph_sample(float rpm, float amps, float t_mosfet,
int derate, int fault)
{
printf("~{F:1:%.1f:%.2f:%.1f:%d:%d}\n",
rpm, amps, t_mosfet, derate, fault);
}
IDs need not be consecutive: values go to the signals in ascending ID order. Keep the canvas file’s IDs and its
Binding: lines fit unchanged.
Good to know
- Import adds, it does not replace. Imported widgets join what is on the canvas. One Undo takes the whole import back; the canvas keeps 100 undo steps.
- Canvas hints. Imported into an empty canvas, the hints set its size, background colour and grid; the same Undo takes them back. A canvas that already has widgets keeps its own settings.
- Decimal dots. Numbers take a dot (
0.5), whatever your Windows locale. - Edit while it runs. Edit on the canvas toolbar switches edit and run mode; the widgets update in both.
- Canvas keys. Click into the canvas first: then F5 switches edit and run mode, Ctrl+S saves the canvas and Ctrl+Z undoes, also while it is docked in the main window. With the focus elsewhere, F5 and Ctrl+S keep their app meaning: connect the port, save the profile.
- It comes back. Save writes the canvas to
Documents\SerialFlow\canvas\. A canvas that was open when you closed SerialFlow opens again, docked where it was, and ☰ → Tools → Open Canvas Dashboard… opens any saved one. SerialFlow asks before it closes with unsaved canvas changes. - Take it along. Import/Export ▾ → Export Canvas (.sfcanvas)… writes the canvas and its pictures into one file; Import Canvas (.sfcanvas)… opens it as a new canvas on another PC.
- Its own screen. Pop Out on the canvas toolbar moves the canvas into a window of its own, for a second monitor; Full Screen also maximises it there.
- Several graphs. Each binding names its own graph letter, so one canvas can mix graphs.
Try it yourself
- Start SerialFlow. You don’t need to connect a port.
- ☰ → Tools → New Canvas Dashboard, then click Edit on the canvas toolbar.
- Open
Documents\SerialFlow\Demo\canvas_motor_bench.txtin Notepad, select all and copy. - Import/Export ▾ → Paste AI Text…: the text is already in the box. Press Import, then click Edit to leave edit mode.
- ☰ → Test → Delayed Playback →
Demo→showcase_canvas_live.txt. The bench runs for about 18 s, trip and derate included. - The layout is 1 700 pixels wide: zoom with Ctrl + mouse wheel if it does not fit.