Adding delay between serial packets while programming through simulink.

12 ビュー (過去 30 日間)
HAMAYOUN AHMAD
HAMAYOUN AHMAD 2018 年 10 月 23 日
回答済み: Arun Kumar 2019 年 9 月 27 日
Hi everyone, I am trying to send some data over the serial link using Arduino UNO. I am using Serial transmit block given in support package for Arduino. When I deploy the model over hardware it continuously starts transmitting the data which cause the problem for my software application. I need to add some delay between transmitting packets. Is there any method to add the delay?

回答 (1 件)

Arun Kumar
Arun Kumar 2019 年 9 月 27 日
Hi,
You can add delay by changing Sample time of the source block. In your case, the source block is "Constant" block. If you change the sample time to 1 second, the serial tranmit block will start trasmitting data every second.
Refer this page for more details:
HTH.

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by