How can I monitor and log data on the host computer while my simulation is running on a Speedgoat target?

12 vues (au cours des 30 derniers jours)
I am using Simulink Real-Time to run simulations on a Speedgoat target computer. I need to constantly or periodically access the simulation data on my host computer during execution, without stopping the real-time simulation. My long-term simulation can be running for several days. What will be the best way to monitor and log signals on the host computer?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 22 Oct 2025 à 0:00
Modifié(e) : MathWorks Support Team il y a environ 22 heures
To monitor and log signal data on the host computer while a simulation is running on a Speedgoat target, consider one of the following options, depending on the software available on your host computer:
For host computers with MATLAB & Simulink Real-Time:

1. Live streaming to MATLAB

MATLAB & Simulink Real-Time offers flexible ways to instrument and display signals in GUIs such as SLRT Explorer, custom AppDesigner apps, or Simulation Data Inspector (SDI). Use the Recording API to stop recording and to export and save data from SDI (to the base workspace or a file) for post-processing, without the need to end the real-time simulation. See: How can I live-stream and visualize signals from my Speedgoat target computer running a real-time application?

2. Intermittent file logging (R2022b+)

Since R2022b, you can record signal data to files on the Speedgoat target disk and import the completed file log runs to MATLAB & SDI while the real-time simulation is running. In contrast to live streaming, file logging has better support for very high data rates and large amounts of data. See: How can I do intermittent logging with real-time File Log blocks to generate multiple log files and SDI runs?

3. MATLAB Engine API

You can write a script or design GUIs in languages like C#, C/C++, or Python using MATLAB External Language Interfaces. This method gives you access to the full MATLAB API for Simulink Real-Time, including instrument objects for signal live streaming. See: Run Real-Time Application by Using Python Script

4. Simulink Real-Time ASAM XIL API (R2021b+)

Simulink Real-Time provides a Support Package for ASAM XIL Standard to read scalar signals with testing software such as TraceTronic ECU-TEST or Synopsys TPT. It provides an API that allows control of real-time applications using a C# program. See: Control Real-Time Application by Using C# Code.
For a full overview of Speedgoat workflows for test engineers, see:
For host computers without MATLAB:

1. Standalone SLRT app created with MATLAB Compiler (R2021b+)

You can compile and distribute your custom AppDesigner GUI as a standalone executable with MATLAB Compiler. This executable can be deployed to a host PC without a MATLAB installation or license. The end user only needs to install the free MATLAB Runtime.
The deployed app gives the standalone operator access to most features from MATLAB and the MATLAB API for Simulink Real-Time, including signal monitoring at runtime, as well as recording, importing, and post-processing logged signal data, as well as the intermittent logging file feature mentioned above. For more information, see: How can I create an App Designer app to control, tune, and monitor my Simulink Real-Time application? 

2. UDP, TCP/IP, and serial communication protocols

Use standard communication protocols, such as UDP, TCP/IP, or serial, to send data from the Speedgoat target computer back to the host computer while the simulation is running. The clients can be implemented in MATLAB/Simulink or using other external applications. See our UDP and TCP demos.

3. Third-party calibration tools

Use third-party calibration tools such as Vector CANape® and ETAS® Inca to acquire signal data from a real-time simulation using the XCP protocol. See: Can I use a Speedgoat real-time target as an XCP Server device for interaction with third-party calibration tools such as CANape and Inca?
For a full overview of Speedgoat workflows for standalone operators without MATLAB, see:

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Simulink Real-Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by