Documentation

Communications Timeout

If the communication link between the development and target computers is broken or misconfigured, the link times out after about 5 seconds. Before continuing, check that you have followed the instructions outlined in System Configuration.

Diagnose Communication Settings

  1. In the MATLAB® Command Window, type slrtexplr.

  2. In the Targets pane, expand the target computer node.

  3. On the toolbar, click the Target Properties button .

  4. Select Host-to-Target communication and make the required changes to the communication properties.

  5. Select Boot configuration and click Create boot disk.

  6. Restart the target computer and try downloading the real-time application again.

  7. Sometimes, the download is complete even though you get a timeout error. To detect this condition, wait until the target display shows:

    System:initializing application finished.

  8. In the MATLAB Command Window, type slrtpingtarget.

    If slrtpingtarget finds a working connection between the development and target computers, the response is something like:

    ans =
    
    success

  9. Right-click the target computer and select Connect.

If the connection resumes, the connection is working. If the connection times out consistently for a particular model, increase the amount of time allowed before time out.

Increase Communication Timeout

By default, the development computer times out after about 5 seconds if the target computer does not respond after you establish a connection. You can increase the timeout value in one of the following ways:

  • At the model level, open the Simulink > Model Configuration Parameters dialog box and navigate to the Simulink Real-Time Options node. Clear the Use default communication timeout parameter and enter a new desired timeout value in the Specify the communication timeout in seconds parameter. For example, to increase the value to 20 s, enter 20, and then build and download the model.

  • At the real-time application level, set the CommunicationTimeOut property to the timeout value that you want. For example, to increase the value to 20 seconds:

    tg = slrt;
    tg.CommunicationTimeOut = 20

For both methods, the development computer polls the target computer about once every second, and if a response is returned, returns the success value. The development computer waits the full 20 seconds only if a download actually fails.

Was this topic helpful?