xPC Target    

Adding an xPC Target Scope Block

xPC Target does not support the standard Simulink Scope blocks, but it does support xPC Target Scope blocks, which have unique capabilities when you use them with an xPC Target application. These xPC Target Scope blocks should not be confused with standard Simulink 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. Also, the signal information is saved with your model.

After you create a Simulink model, you can add an xPC Target Scope block. The following procedure uses the Simulink model xpc_osc1.mdl as an example to show how to connect an xPC Target Scope block to your model:

  1. In the MATLAB Command Window, type
  1. The Simulink block diagram opens for the model xpc_osc1.mdl.

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

  1. Double-click xPC Target.
  1. A list of I/O functions opens.

  1. Double-click Misc.
  1. A list of miscellaneous group blocks opens.

  1. Click-and-drag Scope (xPC) to your Simulink block diagram.
  1. 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.
  1. The model xpc_osc1.mdl should look like the figure shown below.

  1. From the File menu, click Save as. Enter a filename. For example, enter xpc_osc2 and then click OK.

Your next task is to define the xPC Target Scope block parameters. See Entering Parameters for an xPC Target Scope Block.


  Entering Parameters for Outport Blocks Entering Parameters for an xPC Target Scope Block