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

84 visualizzazioni (ultimi 30 giorni)
I have a Simulink model that I would like to run on supported hardware (e.g. Speedgoat real-time computer). The goal is to log and/or stream signals using External Mode (that is, by pressing the "Monitor & Tune" or "Run on Target" button in my model), using File Log blocks, or instrument objects.
I am able to log scalar signals. But as soon as I try to log or stream virtual bus signals, no data is showing in Simulink Data Inspector (SDI), Display blocks, Scope blocks or Dashboard blocks. I see the following warnings:
Warning: Streaming to SDI is not available for bus signal named 'mySignal' at output port 1 of block 'foo/Bus Creator'.
Warning: Streaming to SDI is not available for signal at output port X of block 'foo/Bus Selector'.
Warning: Cannot instrument 'foo/Demux:1': Unable to stream signal 'foo/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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 22 Gen 2024
Modificato: MathWorks Support Team il 13 Nov 2023

What This Issue Means

These warnings are commonly caused when signals are being optimized out in the generated code one of the reasons above or another reason, so 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: https://www.mathworks.com/help/simulink/ug/working-with-test-points.html
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: https://www.mathworks.com/help/simulink/slref/signalconversion.html

Related Topics

See the following documentation page for further tips and troubleshooting when streaming or logging doesn't work: https://www.mathworks.com/help/slrealtime/ug/troubleshoot-signals-for-streaming-or-file-log-logging.html
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: https://www.mathworks.com/support/contact_us.html

Più risposte (0)


Community Treasure Hunt

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

Start Hunting!

Translated by