Main Content

Simulink.sdi.getDeleteRunsOnLowSpace

Get configured behavior when size of logged data approaches configured limits

    Description

    example

    deleteRuns= 金宝appsimulink.sdi.getDeleterunsonLowspacereturns the configured behavior for when the size of logged data approaches a configured size limit or free disk space requirement. WhendeleteRunsistrue, logged data from prior simulations is deleted first to free space for continued logging in the current simulation. If deleting prior simulation data does not free enough disk space to continue logging through the end of the current simulation, recording data is disabled. WhendeleteRunsis错误的, recording data from the current simulation is disabled and no logged data from prior simulations is deleted.

    Examples

    collapse all

    You can limit the size of logged data by specifying a maximum size for the data or a minimum amount of disk space to leave empty. This example uses several functions to get the current configuration of logging size limits.

    Use theSimulink.sdi.getRequiredFreeSpacefunction to get the configured minimum free disk space requirement. The returned value uses units of GB.

    minDiskSpace = Simulink.sdi.getRequiredFreeSpace;

    Use the金宝appsimulink.sdi.getmaxdiskusagefunction to get the configured maximum size for data logged to disk. The returned value uses units of GB.

    maxSize = Simulink.sdi.getMaxDiskUsage;

    Use theSimulink.sdi.getDeleteRunsOnLowSpacefunction to get the configured behavior when approaching the logging limits. WhendeleteRunsis true, data from prior simulations is deleted first to free disk space for continued logging in the current simulation. If deleting runs does not free up enough space, recording logged data is disabled for the current simulation. WhendeleteRunsis错误的, recording logged data is disabled for the current simulation and data from prior simulations is retained.

    deleteRuns = Simulink.sdi.getDeleteRunsOnLowSpace;

    Output Arguments

    collapse all

    Behavior when logged data size approaches configured limits, returned as1(true) or0(错误的).

    • true- 首先删除从先前的模拟中记录的数据。如果删除先前的仿真数据不能自由足够的空间,请禁用记录数据。

    • 错误的— Disable recording data for current simulation. Do not delete prior simulation data.

    When recording is disabled due to configured disk space requirements or logged data size limits, you need to enable recording again to log data in subsequent simulations. You can configure the record mode in the Simulation Data Inspector preferences or by using theSimulink.sdi.setRecordDatafunction.

    Version History

    Introduced in R2021a