Main Content

Check safety-related diagnostic settings for sample time

Check ID: mathworks.hism.hisl_0044

Check model configuration for diagnostic settings that apply to sample time and that can impact safety.

Description

This check verifies that model diagnostic configuration parameters pertaining to sample times are set optimally for generating code for a safety-related application.

Available with Simulink® Check™.

Results and Recommended Actions

ConditionRecommended Action
The diagnostic for detecting when a source block, such as a Sine Wave block, inherits a sample time (specified as -1) is set to none or warning. The use of inherited sample times for a source block can result in unpredictable execution rates for the source block and blocks connected to it. For safety-related applications, source blocks should have explicit sample times to prevent incorrect execution sequencing. Set the configuration parameter Source block specifies -1 sample time to error.
The diagnostic for detecting invalid data transfer between two blocks operating in multitasking mode is set to none or warning. Such data transfer should not be used for embedded real-time code. Set the configuration parameter Multitask data transition to error.
The diagnostic for detecting subsystems that can cause data corruption or nondeterministic behavior is set to none or warning. This diagnostic detects whether conditionally executed multirate subsystems (enabled, triggered, or function-call subsystems) operate in multitasking mode. Such subsystems can corrupt data and behave unpredictably in real-time environments that allow preemption. Set the configuration parameter Multitask conditionally executed subsystem to error.
The diagnostic for checking sample time consistency between a Signal Specification block and the connected destination block is set to none or warning. An over-specified sample time can result in an unpredictable execution rate. Set the configuration parameter Enforce sample times specified by Signal Specification blocks to error.
The diagnostic detects that the parameter Tasks with equal priority is not set to error.Set the configuration parameter Tasks with equal priority to error.
The diagnostic for detecting whether a model contains an S-function that has not been specified explicitly to inherit sample time is set to none or warning. These settings can result in unpredictable behavior. A model developer needs to know when such an S-function exists in a model so it can be modified to produce predictable behavior. Set the configuration parameter Unspecified inheritability of sample time to error.

Action Results

Clicking Modify Settings configures model diagnostic settings that apply to sample time and that can impact safety.

Capabilities and Limitations

  • Does not run on library models.

  • Does not allow exclusions of blocks or charts.

 Compatibility Considerations

Introduced in R2020a

R2023b — Removed the check for the configuration parameter Single task data transfer from the check analysis.

See Also