Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Installation, Configuration, and Build Troubleshooting

Troubleshooting xpctest Results

The following are some issues you might encounter while running xpctest to check the xPC Target installation and configuration. xpctest runs eight subtests.

This topic assumes that you have read Testing and Troubleshooting the Installation in the xPC Target Getting Started Guide.

xpctest: Test 1 Fails

First, perform the procedure described in the Test 1, Ping Target System Standard Ping section in the xPC Target Getting Started Guide.

If you are using a TCP/IP connection and need more help with Test 1, check the following:

xpctest: Test 2 Fails

First, follow the procedure described in Test 2, Ping Target System xPC Target Ping section in the xPC Target Getting Started Guide.

If you need more help with Test 2, check the following:

xpctest: Test 3 Fails

First, follow the procedure in Test 3, Reboot Target Using Direct Call in the xPC Target Getting Started Guide.

If you need more help with Test 3, check the following:

xpctest: Test 4 Fails

First, follow the procedure in the Test 4, Build and Download Application in the xPC Target Getting Started Guide.

If you need more help with Test 4, check the following:

To correct these errors,

  1. Ensure that your compiler is properly installed. For example, all Microsoft Visual compiler components must be in the Microsoft® Visual Studio® folder after installation.

  2. At the MATLAB prompt, type

    xpcexplr
  3. In the Select C compiler field, select the appropriate compiler type (VisualC or Watcom).

  4. In the Compiler Path field, enter the root path to the compiler. For example,

    d:\applications\microsoft visual studio

    Do not add a terminating back slash (\) at the end of the path.

If you still have problems, and you see the following MATLAB Command Window error:

ReadFile failed while reading from COM-port
  1. Check the state of your target PC. If it is unresponsive, you might need to reboot the target PC.

  2. In the xPC Target Explorer, try to connect to the target PC again. Be sure to also check the serial connection between the host PC and target PC.

xpctest: Test 5 Fails

This error occurs only when the environment variable settings are out of date.

To correct this, perform the following. See xPC Target Boot Options in the xPC Target Getting Started Guide for instructions on how to work with boot options.

  1. At the MATLAB prompt, start xPC Target Explorer. For example,

    xpcexplr
  2. Inspect the environment variables for the problem target PC.

  3. If you have xPC Target Embedded Option installed, ensure that, in the Configuration section, you have selected the Standalone tab.

  4. Make necessary changes.

  5. Select the tab for your boot mode. For example, CD Boot.

  6. Create the boot disk or boot image.

  7. Reboot the target PC.

  8. Rerun xpctest.

If this procedure does not resolve the issue, perform the following:

  1. At the MATLAB command line, type updatexpcenv. For example,

    updatexpcenv
  2. Recreate the boot disk or image using xpcbootdisk.

  3. Reboot the target PC.

  4. Rerun xpctest.

xpctest: Test 6 Fails

This test runs the basic target object constructor, xpc. This error rarely occurs unless an earlier test has failed.

To correct this, perform the following,

  1. At the MATLAB command line, refer to and read the xpc reference page. For example,

    help xpc
  2. Follow any guidance that might be helpful.

  3. Reboot the target PC.

  4. Rerun and check the results of earlier tests and make the necessary corrections.

xpctest: Test 7 Fails

This test executes a target application (xpcosc) on the target PC. This test will fail if you change the xpcosc model start time to something other than 0, such as 0.001. This change causes the test, and the MATLAB interface itself, to halt. To correct this, set the xpcosc model start time back to 0.

xpctest: Test 8 Fails

This test executes a target application (xpcosc) on the target PC. This test might fail if you change the xpcosc model (for example, if you remove the Outport block).

To correct this, perform one of the following:

Other issues might also cause this test to fail. If you still need more help, check the following:

If you are installing another version of the xPC Target software on top of an existing version, check the version number of the current installation. At the MATLAB command line, type xpclib. The version number appears at the bottom of the xPC Target block library pop-up window. If the version number is not the one to which you want to upgrade, reinstall the software.

Troubleshooting Build Issues

The following are some questions you might have when building target applications.

Why Is an Error Received While Downloading to the Target PC, but the Host PC Indicates a Successful Download?

If you boot up a target PC with a boot disk or image from a previous release, then build and download a target application from a host PC running a later release of the xPC Target software, the host PC might indicate a successful download. However, the target PC might display an error message like the following:

rt_init timing engine not found

This is because the xPC Target software on the boot disk or in the boot image did not match the version of xPC Target software running on the host PC. As a general rule, you must always create a new boot disk or image with a new xPC Target release or upgrade.

To resolve this, create a new boot disk or image, using the host PC xPC Target software, and reboot the target PC with the new boot disk or image.

How Can I Build a Model That Contains a CAN Board?

The procedure to build a model with CAN blocks differs as follows:

In xPC Target software version 2.6.1 and later, the software selects the appropriate CAN library for you.

More Help.   If the preceding procedures do not resolve the issue, and if you can build a target application with the CAN board in your model but cannot download that application to the target,

Why Do I Get Target Ping Failures or the MATLAB Interface Freezes During the Build Process?

A target ping failure might occur when you build a target application that has a long initialization process (for example, models that use thermocouple boards). You might need to increase the time-out value. See Increasing the Time-Out Value of the xPC Target Getting Started Guide.

If you have target ping failures and the MATLAB interface freezes, this is likely the combined result of an active firewall and a long initialization process. To correct this problem, see Is There Communication Between Your PCs?.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS