필터 지우기
필터 지우기

tcpip to tcpclient adaptation

조회 수: 3 (최근 30일)
Egor Losev
Egor Losev 2023년 1월 9일
이동: Walter Roberson 2023년 1월 9일
Hello,
I'm transitioning my instrument communication from tcpip to tcpclient. Most stuff I had no problems with, just changed how the object is created, but one device I'm having trouble with. I have a ZYBO Z7 eval board.
Previously, I was connecting to it using the following:
ZYBO = tcpip('192.168.178.100', 33)
fopen(ZYBO)
then I would query, for example:
query(ZYBO, 'DMA_STATUS', '%s\r\n')
and it would return:
ans =
'Ready'
Now I'm connecting to it by using
ZYBO = tcpclient("192.168.178.100", 33, "Timeout", 5);
then sending either the same query or
writeread(ZYBO, 'DMA_STATUS')
and I'm always getting an answer in the form of the same command, i.e.:
ans =
'DMA_STATUS'
I'm not hugely familier with tcpip communication protocols, I don't even know why I had to add %s\r\n in the previous version, but at least it worked. What am I missing now?

채택된 답변

Walter Roberson
Walter Roberson 2023년 1월 9일
이동: Walter Roberson 2023년 1월 9일
you need to configureTerminator to CRLF
  댓글 수: 1
Egor Losev
Egor Losev 2023년 1월 9일
이동: Walter Roberson 2023년 1월 9일
Awesome, works. Thank you so much!

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

추가 답변 (0개)

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by