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

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 1월 24일
편집: MathWorks Support Team 2025년 1월 31일

0 개 추천

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. 
Tp find more information on  File Scope usage, please run the following command in the command window of MATLAB R2020a to access the release-specific documentation:
>> web(fullfile(docroot, 'xpc/ug/file-scope-usage.html'))
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:\')
Please follow the below link to search for the required information regarding the current release:

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by