MATLAB: Do I receive a TCP/IP timeout error while receiving data using xPC Target 4.0( R2008b) and a SCRAMNET board

scramnetSimulink Real-Timetcp/iptimeout

When I to run a model on the target using XPCEXPLR, I receive the following error message:
??? Error using ==> xpcgate
TCP/IP timeout while receiving data
Further, I receive the same error when I type in the commands tg.start from the MATLAB command prompt. Even though the errors are displayed on the screen, the target machine continues to run the model. I do not recieve any errors the second time I perform a tg.start operation.

Best Answer

This is an expected behavior while using xPC Target 4.0(R2008b) with a SCRAMNET board.
When a user issues a tg.start on the MATLAB, the target run mdlstart(), reads interrupt controller status, and installs the interrupt handler. mdlstart() and reading interrupt controller status may take longer on some hardware platforms which throws the TCP/IP timeout error.
As a workaround, increase the default timeout to a higher value( for example, 15 seconds). In order to do that, please execute the following steps:
1. Click Simulation -> Configuration parameters
2. Select xPC Target options under Real-Time Workshop
3. Uncheck default communication timeout
4. Type 15 in Specify the communication timeout in seconds
5. Click Apply and Ok.