SevenSegment Block
Retro-style 7-segment display
Open SevenSegment in BlockWerk →# SevenSegment Block
Description
The SevenSegment block renders its input as a retro red-on-black LED display using classic seven-segment digit graphics. Each character position is drawn as a set of seven rectangular segments that illuminate or dim to form numerals 0–9, a minus sign, or spaces, faithfully reproducing the look of hardware panel meters and embedded displays.
It is intended for diagrams that represent embedded controllers, industrial PLCs, or test-bench setups where a hardware-instrument aesthetic is preferred over a plain numeric readout. It is particularly effective for integer counts, event counters, or low-precision process values.
Parameters
digits
Total number of character positions shown on the display, including the sign character and any decimal-point digits. Values wider than digits positions are right-justified and truncated to the rightmost digits characters. Default: 3.
decimalPlaces
Number of digits shown after the decimal point. The value is formatted with toFixed(decimalPlaces) before being mapped to segments. Set to 0 for integer-only display. Default: 0.
Examples
Display an event counter
Counter → SevenSegment
Set digits to 4 and decimalPlaces to 0 for a four-digit integer event counter that reads 0000 to 9999.
Show a temperature with one decimal place
Sensor → SevenSegment
Set digits to 5 and decimalPlaces to 1 to display values such as _23.6 (space-padded on the left).
Remarks
- Pure sink: The SevenSegment block has no output port. It is a terminal visualisation block and cannot be used mid-chain.
- Character set: Only digits
0–9, the minus sign-, and space are supported. Non-numeric or NaN inputs are not explicitly handled and may display as blank segments. - Decimal point: The
decimalPlacesparameter controls fractional formatting via JavaScripttoFixed; the physical decimal-point dot between segment characters is not rendered as a separate segment in the current implementation. - Fixed font size: Segment size is fixed at 24 × 36 px per digit; resize the block on the canvas to accommodate wider displays.
See Also
- Display: Numeric text readout with configurable notation (decimal/scientific/engineering), history bar chart, and statistics — use when precision or post-run analysis matters more than aesthetics.
- Gauge: Analog needle dial — use when a continuous range reading is more informative than discrete digit characters.