필터 지우기
필터 지우기

TCP-IP Compiling Problems

조회 수: 3 (최근 30일)
Eduardo Díaz Díaz
Eduardo Díaz Díaz 2021년 2월 1일
댓글: Eduardo Díaz Díaz 2021년 2월 2일
Hi everyone,
I am facing a problem that I don't even know if it is fixable.
I have created a function to communicate with a PLC and I am using tcp commands, such as this one:
t=tcpip(IP_str, Port_number, 'NetworkRole','server');,
where IP_str and Port_number are variables that define the IP and the port number of the PLC.
The problem comes up when I try to compile this function, becase the MATLAB Coder does not recognize tcp ip.
Do you know if there's anyway to compile a program with TCP IP commands?
Kind regards,
Eduardo
  댓글 수: 2
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2021년 2월 2일
It looks like that the function "tcpip" will be removed in one of the future release.
Please try to use the below function :
Eduardo Díaz Díaz
Eduardo Díaz Díaz 2021년 2월 2일
Hi Darshan!
Thanks for you answer! As Waster mentioned below, the computer with MATLAB must be the server and therefore I cannot use the tcpclient instruction.

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 2일
tcpclient() is for networkrole 'client', not 'server', and cannot be used to replace the 'server' role.
There is a File Exchange contribution for TCP that uses third-party code.
  댓글 수: 1
Eduardo Díaz Díaz
Eduardo Díaz Díaz 2021년 2월 2일
I have just seen this problem... As tcpip command does not support code generation I do not see any other way to do it...

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by