Add Simulink Real-Time Scope Block

The example model, xpc_osc1, is a non-real-time model of a damped oscillator. Simulink® Real-Time™ supports a real-time Scope block. There are three types of Simulink Real-Time scopes: target, host, and file. This tutorial uses the target scope, which displays execution data on the target computer monitor.

  1. In the MATLAB® window, type xpc_osc1.

    MATLAB loads the oscillator model and displays the Simulink block diagram.

  2. In the Simulink window, from the View menu, click Library Browser.

    The Simulink Library Browser window opens.

  3. In the left pane, browse to and double-click node Simulink Real-Time.

    A list of I/O block categories opens.

  4. Click node Displays and Logging.

  5. Click and drag block Scope to the Simulink block diagram.

    Simulink adds a new real-time Scope block to the model with a scope identifier of 1.

  6. Connect the Mux output to the Scope block input.

    The model xpc_osc1 looks like this figure.

  7. From the File menu, click Save As. Enter a file name. For example, enter xpc_osc2 and then click OK.

Was this topic helpful?