xPC Target    

Increasing the Time Out Value

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

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

To increase the time-out value, use the following procedure:

  1. In your MATLAB working directory, create a file called xpcdltimeout.dat.
  2. In this file, put a single integer. For example, enter
  1. In this case, the host PC waits for about 20 seconds before declaring that a time out has occurred. Note, it will not take 20 seconds for every download. The host PC polls the target PC about once every second, and if a response is returned, declares success. Only in the case where a download really fails will it take the full 20 seconds.

If the file xpcdltimeout.dat exist, it is read once before every download. To change the time out value, change the number in this file. Setting the time out to 5 is the same as the default. Note also that simply removing the file does not change the time out to the default value. xPC Target uses the last value you entered until you restart MATLAB.


  Troubleshooting the Build Process xPC Target Code Generation Options