Simulink timer subsystem example

バージョン 1.0.0.0 (34.7 KB) 作成者: Marc Compere
A single-pulse input initiates elapsed time comparison to a desired timer duration.
ダウンロード: 536
更新 2018/6/13

ライセンスの表示

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 (2024). Simulink timer subsystem example (https://www.mathworks.com/matlabcentral/fileexchange/67712-simulink-timer-subsystem-example), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2016b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0