Numeric Display
SinksThe 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 at each simulation step:
where is the configured decimal precision.
When showMinMax = true, the block dynamically records the running temporal extrema over the simulation time horizon :
Extreme values ( or ) automatically switch to normalized engineering scientific notation:
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 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 ( and ) across the entire simulation run.
Remarks & Best Practices
- Automatic Scientific Notation: Numbers with magnitudes exceeding or falling below 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 - trajectory display.
- Constant: Generates fixed numeric scalar values for testing displays.
- Gain: Scales physical units before routing to the display.