Open an ethernet connection
Mostrar comentarios más antiguos
Hey everyone ! :)
I am currently trying to open an Ethernet connection with matlab. Because I'm quite new in Matlab programming, my program is not working. Here is what I've done :
echotcpip("on",2049);
t = tcpclient("192.168.10.94", 2049);
message_to_send = "11009¶1¶1";
write(t,message_to_send);
data = read(t,10);
clear t;
echotcpip("off");
I know the message to send is quite strange, but this is the logic of the external device. I'm 100 % sure that the IP adress and the port number are good. I tried to open the connection with Putty and it worked well, but now I'm trying with Matlab it timeout when it's supposed to read the data from the external device. Is my program wrong or I'm stupid and my error is somewhere else ?
Thanks you very much in advance !
Respuestas (1)
dsq dq
el 17 de Ag. de 2021
0 votos
Categorías
Más información sobre TCP/IP Communication en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!