Why am I unable to log or stream signals when my application is running on hardware in External Mode or a Simulink Real-Time (SLRT) simulation?

26 visualizaciones (últimos 30 días)
I have a Simulink model that I would like to run on supported hardware (e.g. Speedgoat real-time computer). The goal is to live-stream and monitor the signals in MATLAB, so I use the External Mode by pressing the "Monitor & Tune" or "Run on Target" button in my model. I instrument signals in my model by using signal logging badges, or SLRT instruments as shown in this MATLAB answer.
However, not all the expected signals are showing in the Simulation Data Inspector (SDI), in my App Designer component, or in Display, Scope, or Dashboard blocks in my model. I see warnings such as the following:
Warning: Streaming to Simulation Data Inspector (SDI) is not available for bus signal named 'mySignal' at output port 1 of block 'myModel/Bus Creator'. Warning: Streaming to Simulation Data Inspector (SDI) is not available for signal at output port X of block 'myModel/Bus Selector'. Warning: Streaming to SDI is not available for bus signal named 'mySignal' at output port 1 of block 'myModel/Bus Creator'. Warning: Streaming to SDI is not available for signal at output port X of block 'myModel/Bus Selector'. Warning: Cannot instrument 'myModel/Demux:1': Cannot stream signal 'myModel/Demux:1'. Warning: Unable to instrument 'myModel/Demux:1': Unable to stream signal 'myModel/Demux:1'. Possible reasons include: (1) Signal is not available in application. (2) Signal does not use globally accessible memory in application. (3) Signal connects to a MessageSend block. (4) Signal has inherited sample time. (5) Signal is discontiguous.
The same warning can appear when using SLRT File Logging.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 23 de Abr. de 2025
Editada: MathWorks Support Team el 23 de Abr. de 2025

What This Issue Means

These warnings are commonly caused when signals are being optimized out in the generated code for one of the reasons above or another reason, so the signals are not observable and we are not able to instrument them.

Try These Workarounds

1. First, try to configure the signal you are interested in as a Test Point. Test Points will exempt the signal from model optimizations. Any signal in your model can be marked as a Test Point.
To learn more about Test Points, refer to the following documentation page: Configure Signals as Test Points 
2. If you still see the same warning message while running on hardware with the signal configured as a Test Point, try inserting a Signal Copy block (ie., a Signal Conversion block in "Signal Copy" mode) after the signals that you would like to stream, and log/monitor the Signal Copy block output instead.
To learn more about the Signal Copy block, refer to the following documentation page: Signal Conversion 

Related Topics

See the following documentation page for further tips and troubleshooting when streaming or logging doesn't work with Simulink Real-Time: Troubleshoot Signals for Streaming or File Logging
Another explanation for receiving the above warnings could be that the connection to the hardware was lost, or that the hardware target crashed during the execution of the application. Contact MathWorks Technical Support for further assistance.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by