xPC Target    

Running a Simulation Using the MATLAB Command Line Interface

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

After you load your Simulink model into the MATLAB workspace, you can run a simulation. This procedure uses the Simulink model xpcosc.mdl as an example and assumes you have already loaded that model.

  1. In the MATLAB window, type

    Simulink runs a simulation in normal mode.

  1. You can either let the simulation run to its stop time, or stop the simulation manually. To stop the simulation manually, press Ctrl-T.
  2. After Simulink finishes the simulation, type

    You enter the MATLAB variables tout and yout in the Simulation Parameters dialog box. The signals are logged into memory through Outport blocks. See Entering the Simulation Parameters.

    MATLAB opens a plot window and displays the output response. The signal from the signal generator is added to the outport block and shown in the figure below.

Your next task is to create a target application. See Creating the Target Application.


 Running a Simulation Using the Simulink Graphical Interface Creating the Target Application