🔢

Numeric Display

Sinks
Run the live example Free · no sign-up · runs in your browser

The NumericDisplay block provides a real-time digital LCD-style numeric readout for monitoring simulation signals on the canvas. It reads incoming scalar floating-point values and displays them with configurable decimal precision, automatic scientific notation formatting for extreme numbers, and optional minimum/maximum envelope tracking. As a sink block, it does not produce downstream output signals, serving strictly as a non-intrusive probe for real-time visualization and debugging.

Mathematical Model

The block operates as an observation sink, sampling the incoming continuous or discrete signal u(t)u(t) at each simulation step:

ydisplay(t)=format⁡(u(t),P)y_{\text{display}}(t) = \operatorname{format}(u(t), P)

where PP is the configured decimal precision.

When showMinMax = true, the block dynamically records the running temporal extrema over the simulation time horizon [0,t][0, t]:

umin⁡(t)=min⁡τ∈[0,t]u(τ)umax⁡(t)=max⁡τ∈[0,t]u(τ)\begin{aligned} u_{\min}(t) &= \min_{\tau \in [0, t]} u(\tau) \\ u_{\max}(t) &= \max_{\tau \in [0, t]} u(\tau) \end{aligned}

Extreme values (∣u(t)∣≥106|u(t)| \ge 10^6 or 0<∣u(t)∣<10−30 < |u(t)| < 10^{-3}) automatically switch to normalized engineering scientific notation:

u(t)=m×10e,1≤∣m∣<10,e∈Zu(t) = m \times 10^e, \quad 1 \le |m| < 10, \quad e \in \mathbb{Z}

Inputs & Outputs

Direction ID Label Type Status
→ In in Input number Required

Parameters

Parameters Label Type Default Description
precision Precision number 2
showMinMax Show Min/Max boolean false

Usage Examples

Example 1: Calibrated Temperature Sensor Readout

Displaying an industrial oven temperature reading with tenth-of-a-degree precision. Routing the output of a thermocouple amplifier into a NumericDisplay configured with precision = 1 and showMinMax = false shows live operating temperatures such as 245.8 ∘C^\circ\text{C} on the canvas.

Example 2: Dynamic Strain Peak-to-Peak Envelope Tracking

Monitoring stress fluctuations on an offshore structural member during wave excitation. Connecting the stress signal to a NumericDisplay with precision = 2 and showMinMax = true allows structural engineers to observe both instantaneous stress and total peak tensile and compressive extremes (umin⁡u_{\min} and umax⁡u_{\max}) across the entire simulation run.

Remarks & Best Practices

  • Automatic Scientific Notation: Numbers with magnitudes exceeding 10610^6 or falling below 10−310^{-3} automatically transition into compact scientific format (e.g. 1.25e-4), preventing text truncation.
  • Zero Simulation Overhead: Implemented as a zero-copy UI sink probe that reads directly from the engine buffer without injecting algebraic loops or computational latency into the simulation solver.
  • Envelope Reset on Run: Running minimum and maximum values reset automatically whenever a simulation run is restarted, ensuring clean measurements for each experimental run.
  • High-Contrast Dark Theme UI: Designed with high-contrast, scalable digital typography that remains legible at various canvas zoom levels in both light and dark themes.

Related Components

  • uPlotDisplay: High-performance multi-channel graphical time-domain oscilloscope.
  • XYPlot: Phase-plane and parametric XX-YY trajectory display.
  • Constant: Generates fixed numeric scalar values for testing displays.
  • Gain: Scales physical units before routing to the display.