xPC Target    

Adding xPC Target Scope Blocks

Adding xPC Target scope blocks to your Simulink model saves you the time to define and select signals after you download the target application to the target PC, and the information is saved with your model.

You can drag an xPC Target scope block into any Simulink model, and the input to the scope can be connected to any block output. If you want to trace more than one signal, add a multiplexer block to your model, and connect the scope block to the multiplexer output.

The following procedure uses the Simulink model xpcosc.mdl as an example to show how to connect an xPC Target scope block to your model.

  1. In the MATLAB window type

    The Simulink block diagram opens for the model xpcosc.mdl.

  1. In the Simulink window, and from the View menu, click Show Library Browser.

    The Simulink Library Browser window opens.

  1. Double-click xPC Target.

    A list of I/O functions opens.

  1. Double-click Misc.

    A list of miscellaneous group blocks opens.

  1. Click-and-drag Scope (xPC) to your Simulink block diagram.

    Simulink adds a new scope block to your model with a scope identifier of 1.

  1. Connect the xPC Target scope block with the Simulink scope block.

    The model xpcosc should look like the figure shown below.

Your next task is to define the xPC Target scope block parameters. See Defining xPC Target Scope Block Parameters.


 xPC Target Scope Blocks Defining xPC Target Scope Block Parameters