xPC Target    

Signal Tracing with xPC Target GUI (Target Manager)

Opening a Scope window on the target PC allows you to select and view signals using a graphical user interface.

After you create, download, and start running a target application, you can view signals. This procedure uses the Simulink model xpcosc.mdl as an example, and assumes you are running the target application for that model.

  1. In the MATLAB window, type

    The Target Manager window opens. This window is the root-window of the Scope graphical user interface.

    At this point, the window is empty because a specific scope has not been defined.

  1. From the File menu, click New Scope.

    On the host PC, and on the Target Manager window, a new scope button appears.

    And on the target PC, a new scope window opens.

  1. In the Target Manager window, right-click the scope button, and then click Properties.

    The Target Scope 1 window opens.

  1. Click the Add/Remove button.

    The Add/Remove Signals dialog box opens. This dialog box allows you to specify which signals to trace.

    The Signal list box, displays all of the available signals from the target application. The names of the signals correspond to the block names within the Simulink model xpcosc.mdl. The block name indicates the output signal from that block.

    Click a block name to highlight it, and then click the Add Signal button to move the signal to the Signals to trace box on the right of the window. The Signals to trace box contains the signals to be traced by this scope.

  1. From the Signal list box, click Integrator 1, and then click the Add Signal button. Similarly, add the Signal Generator signal.

    On the host PC, changes to the Add/Remove Signals dialog box are shown below. The signals to trace can be removed by clicking the block name in the Signals to trace box, and then clicking the Remove Signal button.

    The target PC displays the following messages.

    The line above the graph gives information about the target scope object. The string SC1 means that this graph corresponds to the scope object with an identifier equal to 1. The colored number 0 and number 4 are the signals added to this target scope. When you start signal tracing, the color of the traces corresponds to the color of the signal numbers.

  1. Starting a scope on the target PC is slightly different than starting a scope on the host PC. In the Target Manager window, right-click the Scope 1 button, and then click Start.

    You also need to start running a target application before the signals are visible in the scope window. Type either

    The plot window on the target PC displays the signal traces and updates at a rate equal to the time to collect one data package, as shown below.


 Signal Tracing with xPC Target GUI Signal Tracing with MATLAB Commands