| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Prohibits the S-Function block that references this S-function from inheriting a constant sample time. The SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME option applies only to S-functions that use block-based sample times.
If the S-function specifies this option and inherits a constant sample time, i.e., a sample time of inf, the Real-Time Workshop 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. See Inlining Invariant Signals in the "Real-Time Workshop User's Guide" for more information.
If the block is not invariant, the Real-Time Workshop product generates code only in the model_initialize function. If the block is invariant, the Real-Time Workshop product eliminates the block's code altogether.
See sfblk_manswitch.c for an example.
SS_OPTION_ALLOW_CONSTANT_PORT_SAMPLE_TIME
![]() | SS_OPTION_CAN_BE_CALLED_CONDITIONALLY | SS_OPTION_DISCRETE_VALUED_OUTPUT | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |