On this page

The internal simulation clock in Magic Model Analyst allows you to use a new simulation clock that can increase its simulation time based on time Events and duration in a model. The following properties in the Timing group in the Simulation Configuration Specification window enable you to specify necessary options in the internal simulation clock

  • Start Time
    An integer value applies for starting the simulation clock.
  • Step Size
    A decimal value applies for increasing the simulation time. This value, as 1.0 by default unless specified, is used together with Start Time.
  • Step Delay 
    A decimal value applies for delaying each time step in the simulation clock.
  • End Time
    An integer value applies for stopping the simulation clock.
  • Number Of Steps
    An integer value together with Start Time and End Time, to calculate Step Size (if not specified) for the simulation clock.

Note

To enable the internal simulation clock, startTime must be specified as the Trigger, along with stepSize, which is 1.0 by default unless specified. The FlashingLight.mdzip, StopWatch.mdzip, CruiseControl.mdzip, and CoffeeMachine.mdzip built-in sample projects apply the internal simulation clock.

FlashLight SimulationConfig.

Simulation time in the console log

Magic Model Analyst's clock display in the console log has undergone a change. From now on, the simulation console will display the simulation time instead of the current date and time. The simulation clock appears as "00:05:30,000" which is in the format of "HH:MM:SS,Milisecond". The simulation time will be used for all simulations. The current date and time will no longer be displayed in the simulation console log. 

From the following State Machine diagram, s1 (State 1) takes two seconds to go to s2 (State 2), and s2 takes three seconds to go to s1 again. You can see the simulation time in the following Console log.
 

The simulation Console log showing the simulation time.

Related page