Main Content

simscape.instrumentation.disableLogging

Disable logging for block

Since R2024a

    Description

    example

    simscape.instrumentation.disableLogging(blockName) disables logging selected variables for the block, blockName. If the block variables are selected for logging, Simscape preserves the logged variable selection. Simscape does not log the variables to logsout, the default Simulink.SimulationData.Dataset object workspace variable.

    Examples

    collapse all

    This example shows how to disable logging for the Ideal Torque Source block labeled Load Torque in the Permanent Magnet DC Motor example model.

    To open the model, enter:

    openExample('simscape/PermanentMagnetDCMotorExample')

    To enable selective logging for the block, enter:

    simscape.instrumentation.enableLogging('PermanentMagnetDCMotor/Load Torque')
    The function selects all of the block variables because the block is still using the default variable table. Confirm that the logging badge appears on the Ideal Torque Source block. When you run the model, Simscape logs the selected block variables to the logsout workspace variable.

    To disable logging for the Ideal Torque Source block, enter:

    simscape.instrumentation.disableLogging('PermanentMagnetDCMotor/Load Torque')
    The block is now disabled for logging. Confirm that the logging badge no longer appears on the Ideal Torque Source block. When you run the simulation, Simscape ignores the selected variables in the Load Torque block.

    Input Arguments

    collapse all

    Simscape block name, specified as a string scalar, character vector, or a handle.

    Data Types: double | char | string

    Version History

    Introduced in R2024a