Error: -22: disk full, when using Real-time Scope block with file type.

1 view (last 30 days)
Hello,
I'm using Simulink Real-Time Explorer and create a boot disk with 'Removable Disk' mode. There is a file scope in my Simulink model, and will save log data on target PC. However, after the program runs for a while the Simulink Real-Time will report an error:
Error -22: disk full
There are two disc, C and H. When the log file save in H disk, there is a small upper limit about 400MB. When the log file save in C disk, the data is out of order and lost, such as the time will start from 10s and jump back to the 9s, and the data is often lost .
Would you like to tell me how to expand H disk? (It seems cannot be change by using disk partition tools and I didn't find any setup of the disk size on the Simulink Real-Time Explorer interface.)
Or any other solution to save up to 4G log data?
Thanks!

Answers (1)

Dimitri MANKOV
Dimitri MANKOV on 1 Mar 2022
Hi Sheng,
How big is the C:/ drive installed in your target machine? Could it be that it is already full with previous logs generated by the File Scope blocks of your model (files usually ending in .dat)? Note that you can explore the contents of your C:/ drive using the Simulink Real-Time Explorer.
Are you logging to the disk of your target machine, or to the bootable disk/USB drive you created? Have you tried using the Simulation Data Inspector (SDI) to log your data?
I might be mistaken, but I think that the H:/ drive often represents the part of the RAM of your target machine that cannot be used by the real-time OS. Assuming this is correct, I don't think there are any options to "expand" its size programmatically...
Best,
Dimitri
  4 Comments
Walter Roberson
Walter Roberson on 2 Mar 2022
I wonder if there is a way to automatically copy from H: to C: from time to time?
In some cases, it works to write the data to ERAM first and then copy the completed file to C: -- that allows complete blocks of data to be copied as one piece instead of having to deal with the slower C: drive for each bit of data being logged.
But sometimes the rate at which you accumulate data on H: will just be more than the write speed of C:
If you have not done so already, I would recommend that you get an SSD to write the data to. A bootable USB might not be fast enough. But see my experiments at https://www.mathworks.com/matlabcentral/answers/1638310-running-matlab-in-parallel-on-local-machine-or-another-suggestion#answer_884150
Dimitri MANKOV
Dimitri MANKOV on 2 Mar 2022
Another thing to try would be to play with the File Scope parameters (for example "Mode" of "Write Size") and see if you find a combination that is more efficient for your system. More information available here.

Sign in to comment.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!