My Simulink Real-Time application is running at a rate of 1e-5 seconds. A subsystem in it is run based on a trigger signal. However, when the trigger arrives, the time it takes to run the subsystem is probably more than 1e-5 seconds, and so I get a TET error, and an overrun.
However, this subsystem is called once in a long time, and I want to get a "multitasking" option of it – that is, to get it to run in the background, and update when it's finished. When I change the sample time of the subsystem to a slower rate of 1e-4, I get the following error:
ERROR: The enabled subsystem 'example/Subsystem1' executes in multiple tasks.This can cause corrupted data or non-deterministic behavior in areal-time system. Consider using a single-rate enabled subsysteminstead, or set the "Tasking mode for periodic sample times" optionin the Solver page of the Configuration Parameters Dialog to "SingleTasking".Alternatively, you can disable this diagnostic by setting 'Multitaskconditionally executed subsystem' diagnostic to 'none' in the SampleTime Diagnostics pane of the Configuration Parameters dialog box.
Best Answer