uPlotDisplay Block
Real-time high-performance signal plotting with viewport pull from simulation buffer
Open uPlotDisplay in BlockWerk →# uPlot Display Block
Description
Real-time signal plotting block with configurable update frequency and rendering modes. Displays signals directly in the block diagram for interactive visualization.
Inputs
- Signal (number, multiple): Input signal(s) to plot. Can accept multiple inputs which are accumulated in a buffer.
Outputs
None - this is a sink block.
Parameters
Visual Configuration
- Title (text): Display title for the plot
- Line width (number): Thickness of the signal lines [1-4, default: 2.5]
- Show grid (boolean): Display grid lines [default: true]
- Show legend (boolean): Display signal legend [default: false]
- Show points (boolean): Draw points on each sample [default: false]
- Show statistics (boolean): Display min, max, and mean values [default: false]
Rendering Configuration
- Time window (select):
Rolling window (live tail): Shows the most recent data within the window duration.Expanding window (grow until limit): Shows data from start, growing until limit.Full span (start → stop): Shows the entire simulation record.
- Window duration (seconds): Duration of the rolling window. Only visible when Time window is set to
Rolling. [0.5 - 3600 s]
- Update mode (select):
After simulation only: Data is buffered but not rendered during simulation.Time-based: Updates rendered at specified frequency (Hz). Balances visibility with performance.Live: Updates rendered every simulation step. May impact performance.XY plot: First signal acts as X-axis, subsequent signals act as Y-axis.
- Refresh rate (Hz): Controls refresh rate for time-based rendering. Only visible in
Time-basedmode. [0.5 - 60 Hz]
Advanced Options
- Max display points: Limit the number of points drawn to prevent performance drops [default: 500000].
- Auto-scale Y-axis: Automatically adjust the Y-axis to fit all visible data. If disabled, uses
Y-axis minimumandY-axis maximum. - Trigger: Stabilize periodic waves by aligning the window to a level crossing (only available in Time-domain rolling window).
- Trigger source: Which input signal triggers (0 = first).
- Trigger level: Amplitude threshold for the trigger crossing.
- Trigger edge: Detect crossings on the rising or falling edge.
- XY: X/Y signal index: In XY mode, defines which signal indices represent the X and Y axes.
Behavior
1. Data Accumulation: Signal values are continuously accumulated in an internal buffer. 2. Rendering: Based on selected render mode:
- After simulation only: Buffer only, no visual updates during simulation
- Time-based: Visual updates occur at the specified frequency (Hz), independent of simulation step size
- Live: Visual updates every simulation step
Performance Considerations
- Update mode = After simulation only: Best performance. Use for long-running simulations.
- Update mode = Time-based (5-10 Hz): Recommended for most use cases. Good balance.
- Update mode = Live: Suitable for short simulations or high-performance machines. May slow down complex diagrams.
Buffer trimming: The viewport dynamically downsamples points if there are too many, using Max display points.
Tip: For large diagrams with multiple plots, use lower update frequencies (2-5 Hz) to maintain responsiveness.
Usage Examples
Basic Signal Visualization
Step Block → uPlot Display
(Shows step response in real-time)
Transfer Function Response
SignalGenerator → TransferFunction → uPlot Display
(Visualizes system response)
Multi-Signal Comparison
Constant₁ ─┐
├→ Sum → uPlot Display
Constant₂ ─┘
(Multiple inputs accumulated in buffer)
Technical Details
- Update Frequency: Time-based, not step-based (independent of sample time)
- Color Mapping: Consistent with Analysis Panel via connection ID
- Data Format: Time series {times[], points[]} in internal state
- Rendering: Uses uPlot library for high-performance visualization
Remarks
- Live mode: Best for short simulations; use Time-based (5–10 Hz) for longer runs to maintain UI responsiveness
- XY mode: First connected signal becomes X-axis; subsequent signals are Y-axis traces
- Max display points: Prevents memory issues — when the buffer exceeds this, older points are downsampled
- Trigger: Stabilises rolling waveforms by aligning the window to a level crossing (rising or falling edge)
- After simulation only: Zero rendering overhead during simulation; data is fully available once the run completes
See Also
- Analysis Panel - Post-simulation signal analysis
- SignalGenerator - Generate test signals
- TransferFunction - System dynamics