| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |

| On this page… |
|---|
Sample Time Diagnostics Overview Source block specifies -1 sample time Multitask conditionally executed subsystem Enforce sample times specified by Signal Specification blocks |
Specify what diagnostic actions Simulink software should take, if any, when it detects a compilation error related to model sample times.
Set the parameters displayed.
The options are typically to do nothing or to display a warning or an error message.
A warning does not terminate a simulation, but an error does.
Select the diagnostic action to take if a source block (such as a Sine Wave block) specifies a sample time of -1.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
The Random Source block does not obey this parameter. If its Sample time parameter is set to -1, the Random Source block inherits its sample time from its output port and never produces warnings or errors.
Some Communications Blockset™ blocks internally inherit sample times, which can be a useful and valid modeling technique. Set this parameter to none for these types of models.
| Parameter: InheritedTsInSrcMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if a discrete block (such as the Unit Delay block), inherits a continuous sample time from the block connected to its input.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
| Parameter: DiscreteInheritContinuousMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if an invalid rate transition occurred between two blocks operating in multitasking mode.
Default: error
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This parameter allows you to adjust error checking for sample rate transitions between blocks that operate at different sample rates.
Use this option for models of real-time multitasking systems to ensure detection of illegal rate transitions between tasks that can result in a task's output being unavailable when needed by another task. You can then use Rate Transition blocks to eliminate such illegal rate transitions from the model.
| Parameter: MultiTaskRateTransMsg |
| Type: string |
| Value: 'warning' | 'error' |
| Default: 'error' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Rate Transition block
Select the diagnostic action to take if a rate transition occurred between two blocks operating in single-tasking mode.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This parameter allows you to adjust error checking for sample rate transitions between blocks that operate at different sample rates.
Use this parameter when you are modeling a single-tasking system. In such systems, task synchronization is not an issue.
| Parameter: SingleTaskRateTransMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | none or error |
Rate Transition block
Select the diagnostic action to take if Simulink software detects a subsystem that may cause data corruption or non-deterministic behavior.
Default: error
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
These types of subsystems can be caused by either of the following conditions:
Your model uses multitasking solver mode and it contains an enabled subsystem that operates at multiple rates.
Your model contains a conditionally executed subsystem that can reset its states and that contains an asynchronous subsystem.
These types of subsystems can cause corrupted data or nondeterministic behavior in a real-time system that uses code generated from the model.
For models that use multitasking solver mode and contain an enabled subsystem that operates at multiple rates, consider using single-tasking solver mode or using a single-rate enabled subsystem instead.
For models that contain a conditionally executed subsystem that can reset its states and that contains an asynchronous subsystem, consider moving the asynchronous subsystem outside the conditionally executed subsystem.
| Parameter: MultiTaskCondExecSysMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'error' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if Simulink software detects two tasks with equal priority that can preempt each other in the target system.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This condition can occur when one asynchronous task of the target represented by this model has the same priority as one of the target's asynchronous tasks.
This option must be set to Error if the target allows tasks having the same priority to preempt each other.
| Parameter: TasksWithSamePriorityMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | none or error |
Select the diagnostic action to take if the sample time of the source port of a signal specified by a Signal Specification block differs from the signal's destination port.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
The Signal Specification block allows you to specify the attributes of the signal connected to its input and output ports. If the specified attributes conflict with the attributes specified by the blocks connected to its ports, Simulink software displays an error when it compiles the model, for example, at the beginning of a simulation. If no conflict exists, Simulink software eliminates the Signal Specification block from the compiled model.
You can use the Signal Specification block to ensure that the actual attributes of a signal meet desired attributes, or to ensure correct propagation of signal attributes throughout a model.
| Parameter: SigSpecEnsureSampleTimeMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Signal Specification block
![]() | Diagnostics Pane: Solver | Diagnostics Pane: Data Validity | ![]() |

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 |