Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Installation on the Host PC

Overview

You install the xPC Target software entirely on the host PC. Installing software on the target PC is not necessary. The xPC Target software is distributed on a DVD or as a file you download from the Web.

After you install the product, you will need to set up the xPC Target environment for either serial or network communication. See Serial Communication or Network Communication.

License Requirements

Before you install the xPC Target or the xPC Target Embedded Option products, you must have a valid File Installation Key and License File. The File Installation Key identifies the products you purchased from The MathWorks and are permitted to install and use. The License File activates the installation.

If you have not received either of these, go to the License Center at the MathWorks Web site.

The xPC Target family of software includes options that you can purchase and add later to the xPC Target environment.

xPC Target Embedded Option product — With the xPC Target Embedded Option product, you can boot the target PC from a device other than a floppy disk or CD/DVD and deploy stand-alone target applications separate from the host PC.

Files on the Host PC Computer

When using the xPC Target software, you might find it helpful to know where files are located:

The xPC Target software uses the directories and files located in matlabroot\toolbox\rtw\targets\xpc\

Setting Your Initial Working Folder

You should set your MATLAB working folder outside the MATLAB root folder. The default MATLAB root folder is c:\matlab.

If your MATLAB working folder is below or inside the MATLAB root, files created by Simulink and Real-Time Workshop are mixed with the MATLAB directories. This mixing of files could cause file management problems.

From the Desktop Icon

Your initial working folder is specified in the shortcut file you use to start MATLAB. To change this initial folder, use the following procedure:

  1. Right-click the MATLAB desktop icon or, from the program menu, right-click the MATLAB shortcut.

  2. Click Properties. In the Start in text box, enter the folder path you want MATLAB to use initially. Make sure you choose a folder outside the MATLAB root folder.

  3. Click OK, and then start MATLAB. To check your working folder, in the MATLAB Command Window, type

    pwd

From Within MATLAB

To temporarily set your MATLAB working folder, use the following procedure:

  1. In the MATLAB Command Window, type

    cd c:\<MATLAB working folder>
  2. To check your working folder, type

    pwd or cd

To permanently set your working folder, see From the Desktop Icon.

Running MATLAB Remotely

If you are running MATLAB remotely (accessing MATLAB over the network), register Active X controls before you start xPC Target Explorer.

  1. In the MATLAB Command Window, type

    xpc_register_ocx

    This function registers the Active X controllers that xPC Target Explorer requires.

  2. Close xPC Target Explorer.

  3. Close MATLAB.

  4. Restart MATLAB.

  5. Restart xPC Target Explorer.

You are now ready to start xPC Target Explorer.

Configuring the xPC Target Host PC for Your C Compiler

To configure the host PC for your compiler, use xPC Target Explorer.

  1. If xPC Target Explorer is not already open, in the MATLAB Command Window, type

    xpcexplr

    The xPC Target Explorer window appears.

    xPC Target Explorer always has a default target PC node in its configuration. The default target PC node is always boldfaced. In a multitarget environment, this visual aid helps you easily identify the default target PC.

  2. In the xPC Target Explorer window, select the Compiler(s) Configuration node.

    In the right pane, the compiler parameters appear.

  3. At the Select C Compiler drop-down list, select the compiler you have installed on the host PC. The examples in this chapter use VisualC.

  4. Enter the path (or browse) to the compiler for Compiler Path. For example,

    C:\Application\Microsoft Visual Studio

  5. Click Apply to apply the changes.

  


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