What means real-time kernel concerning the real-time sync block?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Jan Houska
2013-6-5
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 个评论
Jan Houska
2013-6-6
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!