MATLAB Answers


simulink real time task excution time

Asked by metidji
on 7 Aug 2019
Latest activity Commented on by Fangjun Jiang on 16 Aug 2019
why the maximum task execution time is very importante vs avrage task execut time in simulink real time? what is happened in this case to take all this time to excute the same task?.


Sign in to comment.


1 Answer

Answer by Fangjun Jiang on 7 Aug 2019

In your task, you might have some conditional statements. If the condition is met, certain codes or blocks are executed thus take longer time to finish than when the condition is not met. To ensure your task is able to execute in "real time" continuesly, you need to make sure the maximum task execution time is smaller than the step time of the task. In other words, you can only slow down (by puasing or inserting delay), but you can't speed up to make "real time".


Are you using "Simulink Desktop Real-Time" or "Simulink Real-Time"?
Simulink Desktop Real-Time supports real-time performance up to 1 kHz sample rates with Simulink, and up to 20 kHz with Simulink Coder™.
simulink real-time
Contact the Mathworks tech support

Sign in to comment.