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

5 views (last 30 days)
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?

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...
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.


Find more on 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!