MATLAB: What means real-time kernel concerning the real-time sync block

real-time kernelreal-time syncsimulinkSimulink Desktop Real-Time

In the real-time sync block I can define the parameter maximum missed ticks. In help it is described as: "Enter the number of timer ticks that your model can lag behind the real-time kernel". What exactly means real-time kernel? Is it the Kernel timeslice period that appears for the rtwho-command?
Thanks!

Best Answer

The parameter Maximum missed ticks has a meaning in Normal Mode only. In Normal Mode, Simulink runs the uncompiled model and synchronizes itself to the real-time kernel which provides accurate clock information.
If Simulink is ahead of kernel, it waits - this is no problem. If Simulink lags behind the kernel, the real time "tick" is missed. If Simulink executes faster in the next samples, it can recover from that missed tick. If it does not, the missed ticks accumulate and eventually an error is reported. The Maximum missed ticks parameter specifies the maximum number of missed ticks before the error is reported.
In External Mode, the code is compiled and run synchronously by the real-time kernel - triggered by the real-time clock. The Real-Time Synchronization block is not necessary in External Mode, and if included in the model, it performs no action.