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

3 ビュー (過去 30 日間)
Malte
Malte 2013 年 6 月 5 日
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!

採用された回答

Jan Houska
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 件のコメント
Malte
Malte 2013 年 6 月 5 日
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 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 件)

カテゴリ

Help Center および File ExchangeModel Preparation for Real-Time Simulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by