Visualization

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

See Also