TCPIP command not executed until fclose

3 次查看(过去 30 天)
I have an ICP server that I am communicating with using the TCPIP object. I am able to successfully connect and send commands. However, those commands will not execute until I terminate the connection with fclose.
t1 = tcpip('192.168.10.4',2008);
t1.Terminator = 'LF';
fopen(t1);
fwrite(t1,'Command goes here');
% Command still not executed on IPC server
fclose(t1);
%Now command is executed on IPC server
Things I have tried:
I have tried setting the Terminator to every value between 0 and 127 using the following code:
for ii=0:127, t1.Terminator = ii; fwrite(t1,'Command goes here'); end
At no point does the command execute until fclose is called.
Question: What parameters should I look at changing in the tcpip object to get the remote server to execute the command I just sent? (Or what parameters should I tweak to let the server know to execute what I just sent.)

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by