This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Disallow inheritance of Inf sample time


Prohibits the S-Function block that references this S-function from inheriting a sample time of Inf. The SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME option applies only to S-functions that use block-based sample times.

    Note   If you have Simulink® Coder™, and the S-function declares the number of sample times as PORT_BASED_SAMPLE_TIMES, it will not inherit a sample time of Inf unless it specifies the SS_OPTION_ALLOW_CONSTANT_PORT_SAMPLE_TIME option.

If you have Simulink Coder, note:

  • If the S-function specifies this option and inherits a sample time of Inf, the Simulink Coder product determines how to generate code for the block based on if the block is invariant.

  • A block is invariant if all of its ports' signals are invariant. A signal is invariant if it has a constant value during the entire simulation. A constant block sample time does not guarantee all the ports' signals are invariant. For more information, see Inline Invariant Signals (Simulink Coder).

  • If the block is not invariant, the Simulink Coder product generates code only in the model_initialize function. If the block is invariant, the Simulink Coder product eliminates the block's code altogether.


See sfix_fir.cpp for an example.

Introduced in R2007b

Was this topic helpful?