Troubleshoot Communication Timeout with Target Computers

Some issue is causing communications between the development computer and target computer to time out.

What This Issue Means

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

Try This Workaround

To identify timeout issues, use these steps:

  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 then 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 =

  9. To set the connection between host and target, in the Command Window, type:

  10. Right-click the target computer, and then 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 a 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 these 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 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.

Related Topics

External Websites