Periodic sample time constraint

Description

Select constraints on the sample times defined by this model. If the model does not satisfy the specified constraints during simulation, Simulink® software displays an error message.

Category: Solver

Settings

Default: Unconstrained

Unconstrained

Specifies no constraints. Selecting this option causes Simulink software to display a field for entering the solver step size.

Use the Fixed-step size (fundamental sample time) option to specify solver step size.

Ensure sample time independent

Specifies that Model blocks inherit sample time from the context in which they are used. You cannot use a referenced model that has intrinsic sample times in a triggered subsystem or iterator subsystem. If you plan on referencing this model in a triggered or iterator subsystem, you should select Ensure sample time independent so that Simulink can detect sample time problems while unit testing this model.

Simulink software checks to ensure that this model can inherit its sample times from a model that references it without altering its behavior. Models that specify a step size (i.e., a base sample time) cannot satisfy this constraint. For this reason, selecting this option causes Simulink software to hide the group's step size field (see Fixed-step size (fundamental sample time)).

Specified

Specifies that Simulink software check to ensure that this model operates at a specified set of prioritized periodic sample times. Use the Sample time properties option to specify and assign priorities to model sample times.

Execute Multitasking Models (Simulink Coder) explains how to use this option for multitasking models.

Tips

During simulation, Simulink software checks to ensure that the model satisfies the constraints. If the model does not satisfy the specified constraint, then Simulink software displays an error message.

Dependencies

This parameter is enabled only if the solver Type is set to Fixed-step.

Selecting Unconstrained enables the following parameters:

  • Fixed-step size (fundamental sample time)

  • Treat each discrete rate as a separate task

  • Higher priority value indicates higher task priority

  • Automatically handle rate transitions for data transfers

Selecting Specified enables the following parameters:

  • Sample time properties

  • Treat each discrete rate as a separate task

  • Higher priority value indicates higher task priority

  • Automatically handle rate transitions for data transfers

Command-Line Information

Parameter: SampleTimeConstraint
Value: 'unconstrained' | 'STIndependent' | 'Specified'
Default: 'unconstrained'

Recommended Settings

ApplicationSetting
DebuggingUpdate optimize using the specified minimum and maximum values to Off
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics