Simulink timer subsystem example

A single-pulse input initiates elapsed time comparison to a desired timer duration.

現在この提出コンテンツをフォロー中です。

This is the Readme.txt file for the Simulink timer subsystem example.
The timer is a Simulink implementation of a (simulation) timer that can be armed
by sending it a 1-pulse ping signal to 'ping input'.

A single-pulse input initiates an elapsed time calculation that is subsequently
compared to a desired timer duration. The boolean result of this comparison
provides the timer state output.

A 1-pulse ping can be generated with the change detect block that looks for
any difference in it's input signal.

The timer is armed when a 1-pulse ping is detected which begins an elapsed
time calculation. Elapsed time is compared to the desired timer duration
and the timer state is held high while t_elapsed <= t_timer_duration.

Inside the timer subsystem is a 'triggered capture-and-hold' block that captures
the current simulation time when a high is detected on the ping input signal.

This timer subsystem has been tested on Matlab R2016b and R2018a and a close
variant of this subsystem has been used as far back as 2004.

The soft real time subsystem shown in the screenshot is not included in this
single-file release but is freely avaialable under the MathWorks File Exchange
entry titled "Soft Real Time Block for Pacing Simulink Simulations" at:
https://www.mathworks.com/matlabcentral/fileexchange/67520-soft-real-time-block-for-pacing-simulink-simulations

There is no requirement for the soft real time subsystem for this timer to work
but running in soft real time helps illustrate how the timer subsystem works with
the manual switch blocks.
Alternatively the native Simulink 'Pace' block also helps run the system at a
manageable pace for clear demonstration using the manual switch block.

----------------------------------------------------------------------------------

Marc Compere, comperem@gmail.com
created : 12 Jun 2018
modified: 12 Jun 2018

引用

Marc Compere (2026). Simulink timer subsystem example (https://jp.mathworks.com/matlabcentral/fileexchange/67712-simulink-timer-subsystem-example), MATLAB Central File Exchange. に取得済み.

カテゴリ

Help Center および MATLAB AnswersSimulink についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0