필터 지우기
필터 지우기

How can I receive data via TCP/IP in GUI interface?

조회 수: 10 (최근 30일)
JangHo Cho
JangHo Cho 2015년 10월 1일
댓글: Harsh Sonani 2021년 6월 1일
Hi, I'm working with MATLAB to communicate with other PC which also using MATLAB.
TCP/IP communication is successful. GUI Creation and All the callback function is going well.
But I have a problem.
The GUI is 'event' oriented but the data is continuously sent.
If I don't use GUI, It is ok because I can use while loop.
But, I cannot handle the TCP/IP with GUI callback function.
How can I do both(using GUI and receiving data via TCP/IP) at the same time?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 10월 2일
Set a BytesAvailableFcn callback.
  댓글 수: 5
Walter Roberson
Walter Roberson 2017년 3월 16일
Yes, you can fwrite() or fprintf() to a tcp connection.
Note: there is also the OutputEmptyFcn callback, to allow you determine when to send to the other side without risking overflowing buffers.
Harsh Sonani
Harsh Sonani 2021년 6월 1일
why we use handles.tcpi?
direct we can't use tcpi only?

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by