Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Testing and Troubleshooting the Installation

Testing the Installation from a Boot Disk or Boot CD

This topic describes how to install software on a target PC, boot that PC, and test the installation and connection between the host PC and the target PC. The xPC Target software uses a test script to test the entire installation. After you install the software, set the environment settings, and create a target boot disk, you can test your installation. This procedure assumes that you have set environment settings with xPC Target Explorer. See Environment Properties for Serial Communication or Environment Properties for Network Communication.

  1. Insert your target boot disk into a target PC disk drive or CD drive. This target boot disk contains the software to run a target PC.

  2. To reboot the target PC, press the reset button on the PC.

    After loading the BIOS, the software boots the kernel and displays the following on the target PC monitor.

    If you have a keyboard attached to the target PC, you can activate that keyboard by typing C, and press the Page Up and Page Down keys to page up and down the target PC monitor.

  3. In the MATLAB Current Folder window, select a folder outside the MATLAB root folder.

      Note   During the build process, Real-Time Workshop does not allow files to be saved within the MATLAB tree root. If you select a current folder within the MATLAB tree, the xPC Target test procedure fails when trying to build a target application.

  4. In the MATLAB Command Window, type

    xpctest

    MATLAB runs the test script for the default target PC and displays messages indicating the success or failure of a test. If you use RS-232 communication, the first test is skipped.

    ### xPC Target Test Suite 4.2
    ### Host-Target interface is: RS232 on COM1 
    ### Test 1, Ping target system using system ping: ... SKIPPED
    ### Test 2, Ping target system using xpctargetping: ... OK
    ### Test 3, Software reboot the target PC: ..... OK
    ### Test 4, Build and download an xPC Target application using model xpcosc: ... OK
    ### Test 5, Check host-target command communications: ... OK
    ### Test 6, Download a pre-built xPC Target application: ... OK
    ### Test 7, Execute xPC Target application for 0.2s: ... OK
    ### Test 8, Upload logged data and compare with simulation results:. OK
    ### Test Suite successfully finished

If all of the tests succeed, you are ready to build and download a target application to the target PC. See Basic Tutorial.

If any of the tests fails, see the appropriate test section:

Test 1, Ping Target System Standard Ping

If you are using a network connection, this is a standard system ping to your target computer. If this test fails, try troubleshooting with the following procedure:

  1. Open a DOS shell and type the IP address of the target computer:

    ping xxx.xxx.xxx.xxx

    DOS should display a message similar to the following:

    Pinging xxx.xxx.xxx.xxx with 32 bytes of data:
    Replay form xxx.xxx.xxx.xxx: bytes-32 time<10 ms TTL=59
  2. Check the messages on your screen.

    Ping command fails — If the DOS shell displays the following message,

    Pinging xxx.xxx.xxx.xxx with 32 byte of data:
    Request timed out.

    the ping command failed, and the problem might be with your network cables.

    To solve this problem, check your network cables. You might have a faulty network cable, or if you are using a coaxial cable, the terminators might be missing.

    Ping command fails, but cables are okay — If the cables are okay, the problem might be that you entered an incorrect property in xPC Target Explorer.

    To solve this problem, in the MATLAB Command Window, type

    xpcexplr

    For the problem target PC, check that Target PC IP address, LAN subnet mask address, and TCP/IP gateway address have the correct values. Change the TCP/IP options as necessary, then create a new boot floppy disk. On the target PC, reboot with the new boot floppy disk.

    For a PCI bus,

    • Check that TCP/IP target bus type is set to PCI instead of ISA.

    For an ISA bus,

    • Check that TCP/IP target bus type is set to ISA instead of PCI.

    • Check that TCP/IP target ISA memory port is set to the correct I/O port base address and check that the address does not lead to a conflict with another hardware resource.

    • Check that TCP/IP target ISA IRQ number is set to the correct IRQ line and check that the line number does not lead to a conflict with another hardware resource.

    • If the target PC motherboard contains a PCI chip set, check whether the IRQ line used by the ISA bus Ethernet card is reserved within the BIOS setup.

    Ping succeeds, but test 1 with the command xpctest fails — The problem might be that you have incorrect IP and gateway addresses entered in xPC Target Explorer.

    To solve this problem, in the MATLAB Command Window, type

    xpcexplr

    For the problem target PCs, enter the correct addresses. Recreate the target boot disk.

See also xpctest: Test 1 Fails in Frequently Asked Questions in the xPC Target User's Guide. If you still cannot solve your problem, see If You Need More Help.

Test 2, Ping Target System xPC Target Ping

This test is an xPC Target ping to your target computer. If this test fails, try troubleshooting with the following procedure:

  1. In the MATLAB Command Window, type

    tg=xpctarget.xpc('argument-list')

    where argument-list is the connection information that indicates which target PC you are working with. If you do not specify any arguments, the software assumes that you are communicating with the default target PC.

  2. Check the messages in the MATLAB Command Window.

    MATLAB should respond with the following messages:

    xPC Object
       Connected            = Yes
       Application          = loader

    Target object does not connect — If you do not get the preceding messages, the problem might be that you have a bad target boot disk.

    To solve this problem, create another target boot disk with a new floppy disk. See Booting Target PCs from Boot Floppy Disk.

See also xpctest: Test 2 Fails in Frequently Asked Questions in the xPC Target User's Guide. If you still cannot solve your problem, see If You Need More Help.

Test 3, Reboot Target Using Direct Call

This test tries to boot your target computer using an xPC Target command. If this test fails, try troubleshooting with the following procedure. This procedure assumes that you have set environment settings with xPC Target Explorer. See Environment Properties for Serial Communication or Environment Properties for Network Communication.

  1. In the MATLAB Command Window, type

    xpctest('-noreboot')

    This command reruns the test without using the reboot command and displays the message

    ### Test 3, Software reboot the target PC: ... SKIPPED
  2. Observe the messages in the MATLAB Command Window during the build process.

    Reboot fails, but build okay when reboot skipped — If the command xpctest skips the reboot command but successfully builds and loads the target application, the problem could be that some target hardware does not support the xPC Target reboot command. In this case, you cannot use this command to reboot your target computer. You need to reboot using a hardware reset button.

See also xpctest: Test 3 Fails in Frequently Asked Questions in the xPC Target User's Guide. If you still cannot solve your problem, see If You Need More Help.

Test 4, Build and Download Application

This test tries to build and download the model xpcosc.mdl. If this test fails, try troubleshooting with the following procedure:

  1. In the MATLAB Command Window, check the error messages.

    These messages help you locate where there is a problem.

  2. If you get the error message

    xPC Target loader not ready

    Reboot your target computer. This error message is sometimes displayed even if the target screen shows the loader is ready.

See also xpctest: Test 4 Fails in Frequently Asked Questions in the xPC Target User's Guide. If you still cannot solve your problem, see If You Need More Help.

If You Need More Help

If you cannot solve your problem, contact The MathWorks directly for help.

Internet

To contact The Mathworks Technical Support, use this form http://www.mathworks.com/contact_TS.html

Telephone

508-647-7000

Ask for Technical Support.

  


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