TCP/IP send and receive block (Instrument control tool) not working between two computer.
9 次查看(过去 30 天)
显示 更早的评论
Can anybody help how to do TCP/IP communication between two computer with simulink. TCP/IP send and receive block is working fine in one computer, but I cannot make it in two computer. Error says "the specified amount of data was not returned within the timeout period. Please ensure the data is being sent to the specified port or specify a greater timeout value" Note that, firewall is deactivated and TCP/IP connection established.
0 个评论
回答(1 个)
devinda Molligoda
2015-7-2
Hi, I too have the same problem. The echo example works fine provided by Matlab. But when I go to 2 pcs its giving the same error. This is the code I tried.(Matlab version 2014b) If someone has a solution please share. Thanks.
%TCP Client running in PC#1----------------------------------------------------
tt = tcpip('155.69.213.95'); % Connect the TCPIP object to the host.
fopen(tt)
for i = 1:1000
fwrite(tt,65:74)
pause(0.2);
end
fclose(tt)
%TCP Server running in PC#2---------------------------------------------------
t = tcpip('155.69.213.135');
fopen(t)
i = 0;
for i = 1:1000
A = fread(t, 10);
pause(0.2); A end
fclose(t)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!