Execute UDP read faster

5 ビュー (過去 30 日間)
Rakesh
Rakesh 2023 年 3 月 16 日
回答済み: Govind KM 2024 年 10 月 10 日
Hi all,
I have developed app using MATLAB 2022b version to capture the data using UDPprotocol and updating the fields accordingly.
I am communicating about 1184 bytes at a rate of 50Hz between two machines (the other configured as UDP sender only using MATLAB script ).
I am using the below command to read in my application code
data_received = read(udpportobj,296,"uint32");
The above command itself is taking around 35msec to 45 msec even though disabling the GUI updation.
Can someone please help me how to speed up the UDP read execution.
Regards,
Rakesh.

回答 (1 件)

Govind KM
Govind KM 2024 年 10 月 10 日
Hi Rakesh,
One way to speed up the UDP read process is to read and process the data in chunks. Additional details on this and other UDP limitations can be found in the MATLAB Answers post below:
Another alternative is to write the networking part of the code in Java, utilizing MATLAB's ability to call Java code. An example for UDP implementation in Java can be found in File Exchange:
Hope this is helpful!

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by