xPC Target    

Simulating the Model with Simulink

You run a simulation of your Simulink model to observe the behavior of the model in nonreal time.

After you load your Simulink model, you can run a simulation. This procedure uses the Simulink model xpc_osc2.mdl as an example and assumes you have already loaded that model. To create this model, see Creating a Simple Simulink Model.

  1. In the MATLAB Command Window, type
  1. MATLAB loads the oscillator model and displays the Simulink block diagram, as shown below.

    .

  1. In the Simulink window, double-click the block Scope1.
  1. Simulink opens a scope window.

  1. From the Simulation menu, click Normal, and then click Start.
  1. The Scope1 window displays a trace of the signal data.

  1. You can either let the simulation run to its stop time, or stop the simulation manually. To stop the simulation manually, from the Simulation menu, click Stop.

Your next task is to create an xPC Target application. See xPC Target Application.


  Simulating the Model Simulating the Model from MATLAB