Starting in R2021a, there is a supported workflow to copy file log data from the Speedgoat target computer to a host computer without MATLAB. However, note that eventually, you will need to launch MATLAB to import the data in Simulink Data Inspector (SDI) as you cannot view the raw data anywhere else.
(1) How the file log data is stored on the target computer
On the target computer file system, log files generated by File Log blocks are stored under:
Each run is stored in a separate folder under this directory:
(2) Download file log data from target computer
Using a third-party file transfer tool of your choice (e.g. PuTTY pscp, FileZilla), log into the Speedgoat target computer. Please note that you should always use "slrt" for both username and password when logging into the FTP server on the target computer.
You can either download the entire 'applications' folder, or the 'MODELNAME' subfolder for your specific real-time application:
Note that downloading just the 'logdata' folder is not sufficient.
PuTTY PSCP example:
Below is an example of how to copy the content of the 'applications' folder from a Speedgoat target computer with IP address 192.168.7.5 at port 22 to the local directory "C:\work\my_logdata\" from the Windows Command Prompt using PuTTY pscp:
"C:\Program Files\PuTTY\pscp.exe" -v -P 22 -pw slrt -r email@example.com:applications C:\work\my_logdata\
After downloading the data, you can delete single runs or the entire 'logdata' folder from the target computer file system using FTP.
MATLAB FTP example:
You can also use the FTP functions shipped with basic MATLAB. Below is a code example:
ftpobj = sftp('192.168.7.5','slrt',"Password",'slrt');
(3) Import & visualize file log data in MATLAB
At a later point, you can open MATLAB and use the following two functions:
Importing the file logs into MATLAB will require licenses for MATLAB and Simulink Real-Time.
Here is a MATLAB code example to import the local file log data:
Starting in R2022a, the "slrealtime.fileLogImport" function no longer supports importing file logs from log data obtained in different versions of MATLAB. If you have log data from older versions of MATLAB that you would like to import, please use the following workflow:
- Load log data into old MATLAB version.
- Export data to a ".mat" file
- Load ".mat" file into new MATLAB version.