MATLAB Answers

Loss of scopes in SLRT

10 views (last 30 days)
James Brown
James Brown on 21 Oct 2020
Commented: Jon Lobo on 3 May 2021
Is anybody out there frustrated by the loss of target scopes in SLRT? I have come to rely on them. I know some workarounds exist, such as using App Designer, but I find it hard to beat the quick and easy nature of the scopes. That's what rapid prototyping is all about, after all.
  2 Comments
James Brown
James Brown on 7 Apr 2021
Hi Christopher - You know, I used dSpace realtime tools two decades ago. They shipped an elegant, easy-to-use set of tools much like a blend of SLRT Explorer and app designer, but a couple of orders of magnitude better. With NO software support, I was able to build beautiful GUIs worthy of release to operators. Plus, the resulting GUI did not tie up a license, and could be distributed.

Sign in to comment.

Accepted Answer

Dimitri MANKOV
Dimitri MANKOV on 29 Oct 2020
Hi James,
You can use the normal "Scope" block from the standard Simulink library. As an alternative, you can stream signals to the Simulation Data Inspector (SDI). For more information, have a look here:
  4 Comments
Jon Lobo
Jon Lobo on 3 May 2021
Hi James,
I have some suggestions and tips for quickly setting up streaming to host.
  1. We would like to get your feedback on the usability aspects. If there is a way for us to make this easier or more intuitive for users, we would like to get your input to support your use-case.
  2. AppDesigner is a way to create user interfaces in MATLAB and you can use the Instrument object to stream signals to graphical components in the app. Having said that, I would not look at this as a replacement for target scopes, but rather think of the Instrument object as a replacement for host scopes. Is this the primary method you are trying to use to view signal data or are you using the Simulation Data Inspector (SDI)?
I would also like to provide some more detail as to why we made the switch to supporting host side graphics.
Target scopes had many limitations including the ability to set line colors, label axes, or create custom axes such as logarithmic, x-y, or spectrum analyzer; limited number of scopes and signals displayed on scope; and limited resolution. To view data in buses (virtual or non-virtual) also required users to breakout the signals of interest with a bus selector block.
With the new workflow, all those richer forms of graphics and support for all signal types are supported out of the box with the Simulation Data Inspector. To set it up, you just need to highlight a signal in your model and use the quick button to mark it for logging (or right click and select "Log Selected Signals"). SDI also supports compact displays of signals with sparklines plot, that is also supported with Simulink Real-Time. You can even use the addsignal method from the Instrument object at run-time to stream additional signals to SDI.
Additionally, target graphics are a performance hit on the performance of the real-time application and being able to execute your algorithm in real-time is the goal. Meeting the real-time constraint is what makes rapid prototyping useful.
Having said all of that, we are very interested in learning more about what you are finding difficult about this setup.
-Jon

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!