Gauge
SinksThe Gauge block provides an analog semicircular dial instrument with an animated rotating needle on the canvas. It maps the instantaneous value of an incoming continuous or discrete signal to an angular needle deflection across a user-defined physical range . The dial features a filled circular arc that expands proportionally with the signal magnitude and sweeps from (minimum) to (maximum), giving engineers an immediate visual sense of operating margin and proximity to safety limits.
Mathematical Model
The input signal is first clamped to the physical instrument operating span , where and :
The normalized scale fraction is:
The physical needle angle sweeps across a semicircular arc:
A digital LCD-style numeric readout in the center of the dial displays the formatted value along with the configured engineering units:
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
Input | number | Required |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
minValue |
Min Value | number | 0 |
|
maxValue |
Max Value | number | 100 |
|
units |
Units | string | |
Usage Examples
Example 1: Chemical Reactor Vessel Temperature Monitoring
Monitoring core vessel temperature in an exothermic batch reactor. Setting minValue = 20.0, maxValue = 180.0, and units = "°C". As thermal reaction heating progresses, the operator can see the needle sweep smoothly from ambient into the optimal operating band, providing instant visual feedback on proximity to the thermal runaway threshold.
Example 2: Normalized PID Control Error Envelope Inspection
Monitoring instantaneous tracking error in a closed-loop positioning servo. Feeding absolute error through an Abs block into a Gauge configured with minValue = 0.0, maxValue = 5.0, and units = "mm". During step transients, the needle deflects towards the upper limit and then returns smoothly to zero as steady-state error is eliminated.
Remarks & Best Practices
- Terminal Sink Node: The Gauge block has no output ports and does not pass signals downstream; it functions strictly as an interactive visual monitoring probe.
- Limit Clamping: Signal excursions outside are clamped to the dial end-stops; the needle does not spin past , protecting against graphic rendering artifacts.
- Central Digital Readout: In addition to the analog needle position, the dial displays a central digital readout formatted to one decimal place for quick quantitative checks.
- High-Performance Canvas Rendering: Rendered using accelerated HTML5 canvas and SVG routines, imposing near-zero computational overhead on real-time simulation loops.
Related Components
- NumericDisplay: Pure digital LCD numeric readout with configurable decimal precision.
- uPlotDisplay: Multi-channel graphical oscilloscope for time-series waveforms.
- SevenSegment: Digital hardware LED-style display.
- Saturation: Clamps signals to defined limits.