xPC Target    

Building and Downloading the Target Application

You use the xPC Target build process to generate C code, compile, link, and download your target application to the target PC.

After you enter your changes in the Simulation Parameters dialog box, you can build your target application. This procedure uses the Simulink model xpcosc.mdl as an example, and assumes you have loaded that model.

  1. In the Simulink window, and from the Tools menu, point to Real-Time Workshop. From the Real-Time Workshop submenu, click Build Model.

    After the compiling, linking, and downloading process, a target object is created with properties and associated methods. The default name of the target object is tg. For more information about the target object, see "Target Object Reference" on page 7-1.

    On the host computer, MATLAB displays the following lines after a successful build process.

    The target PC displays the following information.

  1. In the MATLAB window, type

    MATLAB displays a list of properties for the target object tg.

If you do not have a successful build, see Troubleshooting the Build Process.

Your next task is to run the target application in real-time on the target PC. See Controlling the Target Application.


 Entering the Simulation Parameters Troubleshooting the Build Process