Simulink Real-Time Data Logging with File Scope
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 11 Juin 2018
Modifié(e) : MathWorks Support Team
le 30 Sep 2020
I am using a File Scope in my Simulink Real-Time model to log data. However, after simulation no data has been logged. Additionally, when trying to access the file system of my target from MATLAB, I get the following error:
>> tg = slrt;
>> fsys = SimulinkRealTime.fileSystem(tg);
>> dir(fsys)
Error: -8: invalid file system
Réponse acceptée
MathWorks Support Team
le 30 Sep 2020
Modifié(e) : MathWorks Support Team
le 30 Sep 2020
In the File Scope, specify the full path of the data logging file, e.g. 'D:\data.dat'. If only the file name is entered, the file scope automatically tries to write to the 'C:\' drive. If the target has no 'C:\' drive, the data will not be written anywhere. More information on File Scope usage can be found here:
Additionally, if you omit the drive letter from the "dir" command it assumes that the folder path is relative to the default drive. Therefore, please specify the correct drive letter for your computer if it has no "C:\" drive, for example:
>> dir(fsys, 'D:\')
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!