Cannot open TCPIP object in R2010 and 2011a (but is working in 2009)

1 view (last 30 days)
Hi,
I am currently trying to interface with an external device using a TCPIP object although I seem to be unable to open the object in matlab 2010b as well as 2011a, where as it works fine in 2009a. The device's server is residing on the same pc as matlab and its port can unfotunately not be modified.
Bellow are the steps that I followed as well as the results:
R2010b
t= tcpip('127.0.0.1', 8001)
t =
tcpip
Properties:
remoteHost: '127.0.0.1'
remotePort: 8001
Type: 'tcpip'
Terminator: '\r\n'
Status: 'connected'
Methods, Superclasses
>> fopen(t)
ans =
''
>> t
t =
tcpip
Properties:
remoteHost: '127.0.0.1'
remotePort: 8001
Type: 'tcpip'
Terminator: '\r\n'
Status: 'connected'
Methods, Superclasses
****************************************** R2009a t=tcpip('127.0.0.1',8001)
TCPIP Object : TCPIP-127.0.0.1
Communication Settings
RemotePort: 8001
RemoteHost: 127.0.0.1
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
>> fopen(t)
>> t
TCPIP Object : TCPIP-127.0.0.1
Communication Settings
RemotePort: 8001
RemoteHost: 127.0.0.1
Terminator: 'LF'
Communication State
Status: open
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
Any suggestions would be helpful.
Thanks
  1 Comment
Emil
Emil on 2 Dec 2011
Hi guys,
I have just figured out the issue; the solution was related to the path of the TCPIP constructor wich is pointing in the wrong directory in 2010/2011 but not in 2009.
Thanks,

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 2 Dec 2011
I doubt it will solve the problem, but try setting the terminator to 'LF' in the original tcpip() call.

Community Treasure Hunt

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

Start Hunting!