What means real-time kernel concerning the real-time sync block?

8 views (last 30 days)
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!

Accepted Answer

Jan Houska
Jan Houska on 5 Jun 2013
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.
  2 Comments
Malte
Malte on 5 Jun 2013
Hi Jan,
thanks for your answer. That's exactly what I want the real-time sync block to do. The lag of my model goes sometimes up to 15 missed ticks. I need to quantify this in time. So I need to know how long the period between two real-time ticks is. Where can I get this information?
Jan Houska
Jan Houska on 6 Jun 2013
Missed ticks mean missed sample hits of the block. So, multiply the number of missed ticks by the sample period of the block and you get the lag time.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!