How can I monitor and log data on the host computer while my simulation is running on a Speedgoat target?
12 views (last 30 days)
Show older comments
MathWorks Support Team
on 18 Aug 2022
Edited: MathWorks Support Team
about 16 hours ago
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?
Accepted Answer
MathWorks Support Team
about 21 hours ago
Edited: MathWorks Support Team
1 minute ago
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:
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?
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?
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
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:
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?
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.
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:
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with Simulink Real-Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!