Increase the Time for Downloads

By default, if the development computer does not get a response from the target computer after downloading a real-time application and waiting about 5 seconds, the development computer software times out. On the other hand, the target computer responds only after downloading and initializing the real-time application.

Usually 5 seconds is enough time to download a real-time application, but in some cases it may not be long enough. The time to download a real-time application mostly depends on your I/O module. For example, a thermocouple takes longer to initialize. In this case, even though the target computer is fine, a false timeout is reported.

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, enter 20 to increase the value to 20 s.

  • At the real-time application level, set the CommunicationTimeOut property to the desired timeout value. For example, to increase the value to 20 s:

    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. Only if a download really fails does the development computer wait the full twenty seconds.

Was this topic helpful?