Labview Matlab TCP data exchange

Hi all!
I manage to exchange data between Labview and Matlab with the TCP/IP App. But with a similar method using labview and matlab tcpclient function, I can not read data from labview or write data to labview any more.
In general, we use
echotcpip("on",port)
t = tcpclient('localhost',port,'Timeout',10); % start a TCP client
start a TCP client, but how can I read data from Labview using
read(server, count) % read data from a server, in this case, Labview
function since my server is Labview in this case?
Thank you in advance!

2 件のコメント

Walter Roberson
Walter Roberson 2022 年 2 月 22 日
read(t, count)
?
Kun Wang
Kun Wang 2022 年 2 月 22 日
Hi Walter,
Thanks for your sugguestion! I have solved the problem following your advice!
I used read(t, count) at the beginning, but it did not work.
I guess the problem is the code echotcpip("on",port). After I delete echotcpip("on",port), then the read(t, count) works as I want.
Many thanks!
best

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

回答 (0 件)

カテゴリ

タグ

質問済み:

2022 年 2 月 22 日

コメント済み:

2022 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by