| xPC Target™ | ![]() |
Use the following MATLAB® commands from the host PC to validate the host/target setup:
xpctargetping
xpctest
The xpctargetping command performs a basic communication check between the host and target PC. This command returns success only if the xPC Target™ kernel is loaded and is running and the communication between host and target PC is working properly. Use this command for a quick check of the communication between the host PC and target PC.
The xpctest command performs a series of tests on your xPC Target system. These tests range from performing a basic communication check to building and running target applications. At the end of each test, the command returns an OK or failure message. If the test is inappropriate for your setup, the command returns a SKIPPED message. Use this command for a thorough check of your xPC Target installation.
Communication errors might also occur in the following instances:
The target PC is running an old xPC Target boot disk that is not in sync with the xPC Target release installed on the host PC. Create a new boot disk for each new release.
If the communication between the host PC and target PC is TCP/IP, set the host PC network interface card (NIC) card and hub to half-duplex mode. Do not set the mode to full-duplex mode.
If you have an active firewall in your system, you might experience communication errors. For example, The MathWorks is aware of build errors that might occur if you try to build and download a model with a thermocouple board (causing a slower initialization time) in a system that contains a firewall. To work around this issue, you can add the MATLAB interface to the firewall exception list.
If there are BIOS problems. Be sure to read The xPC Target™ Software and the Target PC BIOS.
If you are using xPC Target hardware in a model, downloading the model might cause a loss of communication between the target PC and host PC if either of the following is true:
The referenced xPC Target board has an initialization time that is too slow.
The referenced xPC Target driver has a problem.
Some xPC Target boards have an initialization time that is too slow. This might cause software to run out of time before a model downloads, causing the host PC to disconnect from the target PC.
By default, if the host PC does not get a response from the target PC after downloading a target application and waiting 5 seconds, the host PC software times out. The target PC responds only after downloading and initializing the target application.
Usually 5 seconds is enough time to initialize a target application, but in some cases it might not be sufficient. The time to download a target application mostly depends on your I/O hardware. For example, thermocouple hardware (such as the PCI-DAS-TC board) takes longer to initialize. With slower hardware, you might also get errors when building and downloading an associated model. Even though the target PC is fine, a false time-out is reported and you might get an error like the following:
"cannot connect to ping socket"
This is not a fatal error. You can reestablish communication with the following procedure:
Alternatively, you can increase the time-out value, using the following procedure:
In your MATLAB working directory, create a file called xpcdltimeout.dat.
In this file, put an integer value. For example, enter
20
In this case, the host PC waits for about 20 seconds before declaring that a time-out has occurred. Note that it does 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 does it take the full 20 seconds.
If the file xpcdltimeout.dat exists, 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. The xPC Target software uses the last value you entered until you restart the MATLAB interface.
If there really is an error in a driver that causes the xPC Target system to crash, a time-out occurs and xpctargetping fails with an error message. In such an event, you need to reboot the target and reestablish communication between the host PC and target PC.
To get yourself back up and running,
At the MATLAB command line, issue xpctargetping to reestablish communications.
If the driver with which you are having problems is one provided by The MathWorks, try to pinpoint the problem area (for example, determine whether certain settings in the driver block cause problems).
Alternatively, you can exit and restart the MATLAB interface.
If you experience network problems when using this product, refer to The MathWorks Support xPC Target Web site (http://www.mathworks.com/support/product/XP). This Web site has the most up-to-date information about this topic.
![]() | Booting Issues | Installation, Configuration, and Build Troubleshooting | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |