Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: serial communication problem
Replies: 6   Last Post: Jan 5, 2013 2:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Shankar

Posts: 33
Registered: 8/21/08
Re: serial communication problem
Posted: Jan 5, 2013 2:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Deepak,

Here is the behavior for the TCPIP Receive block:

1. In blocking mode: Every time step, it blocks until the specified amount of data has been received. This is specified by the data size property. It seems like in your case that does not happen. If you specified the data size as [2 2], then the simulation step is blocked until 4 values are received. If the timeout time expires before we receive all of them, we error.

2. In non blocking mode: The block simulation step returns immediately if requested amount is not present. Hence this case does not error but probably does not return data as well.

To investigate your case, ensure that you are receiving the required data in a streaming fashion. One thing you can do is to try the same in MATLAB (by creating tcpip object, opening the connection and reading the data using fread).

-Shankar

"Deepak " <hasterisk@yahoo.com> wrote in message <kc81fc$55$1@newscl01ah.mathworks.com>...
> "rahul" wrote in message <jb1v77$1sl$1@newscl01ah.mathworks.com>...
> > HI
> >
> > I am trying to use the TCP/IP block as for communication , but I am facing this error.
> > Error evaluating registered method 'Outputs' of M-S-Function 'stcpiprb' in 'TCP/TCP//IP Receive'. Error using ==> stcpiprb>Outputs at 211
> > The specified amount of data was not returned within the Timeout period.
> > Please ensure that data is being sent to the specified port or specify a greater timeout value.
> > Can anyone suggest me what to do, to remove this error.

>
> Hello,
>
> I have the same problem as rahul. I am trying to establish communication via TCP/IP and I get following error:
> "Error evaluating registered method 'Outputs' of M-S-Function 'stcpiprb' in 'TcpIpTest/TCP//IP Receive'. The specified amount of data was not returned within the Timeout period. Please ensure that data is being sent to the specified port or specify a greater timeout value."
>
> I tried both increasing the timeout (up to 20 sec) and the non-blocking mode. The error prevails while increasing timeout. The non blocking mode does not actually establish the communication but it shows no error.
>
> Please help me.
>
> Thank you.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.