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.
Open the model.
In the Simulink Editor, on the Desktop Real Time tab, click Prepare > Control Panel.
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.
Set Duration * Fixed Step Size close to or less than the
Xrange in the Scope block.
Select required mode (
Configure signal levels to allow triggering.
Yrange on Simulink Scope block axes large enough to span the signal amplitude.
Xrange large enough to provide required time resolution.
Set Arm when connect to target in the External Signal & Triggering dialog box or Arm Trigger in the External Mode Control Panel.
On the Desktop Real Time tab, click Mode > Run in Kernel.
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.