Main Content

Troubleshoot Signals Not Plotted by Simulink Desktop Real-Time in Scope Blocks

When I simulate a Simulink® Desktop Real-Time™ model in Run in Kernel mode, I do not see signals plotted in the Scope blocks.

What This Issue Means

Missing signal plots in Scope blocks during simulation could indicate a model configuration issue or a sample rate issue.

Try This Workaround

To check whether there is a model configuration issue or a sample rate issue, try these workarounds.

Check the Model Configuration

Before you execute your application in Run in Kernel mode, you must specify data to plot in a Simulink Scope block.

  1. Open the model.

  2. In the Simulink Editor, on the Desktop Real Time tab, click Prepare > Control Panel.

  3. In the External Mode Control Panel, click Signals & Triggering and select one or more signals for capture (designated with X) in the External Signal & Triggering dialog box.

  4. Set Duration * Fixed Step Size close to or less than the X range in the Scope block.

  5. Select required mode (one-shot or normal).

  6. Configure signal levels to allow triggering.

  7. Set the Y range on Simulink Scope block axes large enough to span the signal amplitude.

  8. Set the X range large enough to provide required time resolution.

  9. Set Arm when connect to target in the External Signal & Triggering dialog box or Arm Trigger in the External Mode Control Panel.

  10. On the Desktop Real Time tab, click Mode > Run in Kernel.

  11. On the Desktop Real Time tab, click Run in Real Time.

    Simulink builds the real-time application, connects to the kernel, and starts the real-time simulation. The Scope displays the signals.

Run an Example Model or Reduce the Sample Rate

Try running one of the example models or run your model at a slower sample rate.

If you can see signals plotted for an example model or for your model at a slower sample rate, your system cannot transfer data back to MATLAB® for plotting in the CPU time available between sample intervals for your model and the original sample rate.

Select the fastest sample rate that allows your model to run and plot signals.

Related Topics