Running the Simulation

This section guides you through a scenario of running and monitoring a cosimulation session.

  1. Open and add the inverter signals to a wave window by entering the following ModelSim command:

    VSIM nn> add wave /inverter/*
    

    The following wave window appears.

  2. Change your input focus to your Simulink model window.

  3. Start a Simulink simulation. The value in the Display block changes to 255. Also note the changes that occur in the ModelSim wave window. You might need to zoom in to get a better view of the signal data.

  4. In the Simulink Model, change Constant value to 255, save the model, and start another simulation. The value in the Display block changes to 0 and the ModelSim wave window is updated as follows.

  5. In the Simulink Model, change Constant value to 2 and Simulation time to 20 and start another simulation. This time, the value in the Display block changes to 253 and the ModelSim wave window appears as follows.

    Note the change in the sample time in the wave window.


Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS