I am working on a project in which I can acquire the data from my Development Board through Ethernet Interface using UDP. In order to receive the data at my PC, I have developed a C program using Winsock. However I want to receive the data directly at Matlab without the need to use the C program. I have tried using UDP receive Matlab utility however I was not successful. Can any one guide me regarding my problem?

 採用された回答

Greg
Greg 2017 年 1 月 25 日

0 投票

Purchase the Instrument Control toolbox and use the UDP() function. It works beautifully.

4 件のコメント

Habib Khan
Habib Khan 2017 年 1 月 26 日
編集済み: Habib Khan 2017 年 1 月 26 日
Thank you very much for the reply. I had the mentioned toolbox so I tried it and it works fine. However I have one more question. Does the tool bar allow streaming of data? Because for the time being I was able to do read the data only manually.
Walter Roberson
Walter Roberson 2017 年 1 月 26 日
I am not sure what you mean by the "tool bar" for this purpose?
Habib Khan
Habib Khan 2017 年 1 月 26 日
Sorry a typo. I meant Toolbox instead.
Greg
Greg 2017 年 1 月 26 日
編集済み: Greg 2017 年 1 月 26 日
I'm not 100% sure what you mean precisely by "streaming" but I assume you at least want some level of automated datagram reading.
Check the documentation for the udp() function. Specifically, the DatagramReceivedFcn and BytesAvailableFcnMode properties. You can set those up in a way to automatically do whatever you want (i.e., the code in DatagramReceivedFcn) when a condition is met (number of bytes arrive, a terminator arrives, etc., which is your BytesAvailableFcnMode).

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInstrument Control Toolbox についてさらに検索

タグ

質問済み:

2017 年 1 月 25 日

編集済み:

2017 年 1 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by