Event-based Programming

5 ビュー (過去 30 日間)
Filippo Milano
Filippo Milano 2021 年 2 月 9 日
回答済み: Nitin Kapgate 2021 年 2 月 12 日
Hi, I need to write a program in such a way that it performs certain operations when an event happens. In particular, the event concerns the reading of a precise number of bytes from a serial port. I have to write the program using the concept of event-based programming; so if my event does not happen (so there is no precise number of bytes to read on the serial port) my program performs other operations. Is there any example I can start from to do this? I state that I am not familiar with this type of approach.
Thanks in advance

採用された回答

Nitin Kapgate
Nitin Kapgate 2021 年 2 月 12 日
You can use callbacks in MATLAB to use event based execution.
As you are working with the Serial Port, I would suggest you to start with Using Callbacks for Serial Port Communication.

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by