What means real-time kernel concerning the real-time sync block?
3 views (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
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
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.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!