How to change block sample time using a trigger

2 ビュー (過去 30 日間)
Thomas
Thomas 2023 年 8 月 30 日
コメント済み: Thomas 2023 年 8 月 30 日
Could someone point me in the direction of which block I need to to use?
I have my Simulink model running at a fixed TimeStep of 0.001s. I have successfully created a TCP link using the TCP Client and TCP Send blocks. I do not want to pass the data to the TCP Send block every 0.001s, I only want to the pass the data to the TCP Send block when there is a trigger signal. The attached image shows what I would like to do:
I have tried the enabled/triggered subsystems but the output sample rate is the same as the input sample rate, i.e. 0.001s. For information, I am using Real-Time Simulation.
Is there any Simulink block that will change the output sample rate based on a trigger?

採用された回答

Dimitri MANKOV
Dimitri MANKOV 2023 年 8 月 30 日
Hi Thomas,
I would simply move the TCP Send block inside of the triggered / enabled subsystem, this should do the trick :)
Best,
Dimitri
  1 件のコメント
Thomas
Thomas 2023 年 8 月 30 日
Thanks, that worked perfectly :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by