Main Content


Sets decimation value on File Log blocks based on block path and input decimation value

Since R2022a



setFileLogDecimation(app_object,block_path,decimationValue) sets the decimation value for the specified File Log block. This function modifies the decimation value of the File Log block in the application object. The subsequent loads of the real-time application MLDATX file run on the target with the modified decimation value of the File Log block.


collapse all

Use the setFileLogDecimation function to set the decimation setting for a File Log block that you specify by using a block paths from a real-time application object.

  1. Get the block paths for File Log blocks in the real-time application.

    myApp = slrealtime.Application('slrt_ex_osc');
    myFileLogBlocks = getAllFileLogBlocks(my_App)
    myFileLogBlocks =
      2×1 cell array
        {["slrt_ex_osc/File Log"]}
        {["slrt_ex_osc/File Log"]}
  2. Get the decimation value for a selected File Log block.

    myDecimation = getFileLogDecimation(myApp,"slrt_ex_osc/File Log")
    myDecimation =
  3. Set the updated decimation value for a selected File Log block.

    setFileLogDecimation(myApp,"slrt_ex_osc/File Log",2)

Input Arguments

collapse all

Provides access to methods that manipulate the real-time application files.

The block_path values can be:

  • Empty character vector ('') or empty string scalar ("") for base or model workspace variables

  • Character vector or string scalar for block path to parameters in the top model

  • Cell array of character vectors or string scalars for model block arguments and model instance parameters

Example: '', 'Gain1', {'top/model','sub/model'}

The decimationValue provides the updated decimation value for the File Log block.

Example: 2

Data Types: int32

Version History

Introduced in R2022a