Explore and Run the Demo

You will notice that a number of fields in the System Properties in Property Editor window (bottom left) are now editable, i.e., the text is no longer grey and italic. On the model level you can change a number of settings like common model properties, descriptions, linked objects, target parameters as well as set the default values for parameters.

Select the model instance Ramp#1 in the Model Editor window with a single mouseclick. Notice the Instance Properties tab becomes active in Property Editor window showing the settable parameters value and step of the model instance Ramp#1. A double click on the model instance opens the primitive at its original location. The title bar of the primitive Model Editor window shows where the primitive is physically saved.

Notice that it is not possible to edit any property in the Primitive Properties tab of the built-in primitive. Click on the input port to see the port properties. The type of data consumed by the primitive is determined by the port type. You cannot change the characteristics of the built-in primitive, but only the way the primitive behaves when the simulation is run.

Close the primitive Model Editor window and click the background of the testPacket system in the Model Editor window. Click on the Switch to Simulation Mode button on the toolbar.

To run the simulation using the default settings click the Go button. The system is compiled and executed and an XMgraph titled “Packetized signal output” displays showing the original signal compared to the packetized signal. The total RunLength is set to 50 with a Step Increment of 1. Click on each model instance and look at the parameters that influence the output of this system.

The model instance Packetize#1 waits until it has 5 events (maxLength) before firing. Notice that the model instance VarServer#1 with serviceTime set to 1.0, can process 50 samples in packages of 5 defined by the Packetize#1 model instance parameter maxLength.

We now want to change some parameters and run the simulation again.

  1. Click on the background of the system. Adjust the property RunLength to 100 in the Simulation Properties tab of the Property Editor (bottom left).
  2. Click on the model instance Packetize#1 and set the parameter maxLength to 10 in the Instance Properties tab of the Property Editor.
  3. Click the Go button on the upper toolbar. You'll get a dialog saying:
    System model is modified and has to be recompiled. Changed values in simulation properties are reinitialized by system model parameters.
    So because you changed a property of an instance the system has to be reloaded and thus resetting the RunLength to 50.
  4. Accept the dialog with OK and the demo will start to execute.
  5. Adjust the property RunLength to 100 in the Simulation Properties tab again.
  6. Click the Go button on the upper toolbar. The demo will start to execute.

Notice the difference in server time as a proportion of the total simulation time of the original unpacketized output.

There are a few simulation control buttons on the toolbar that are not used because the simulation is very quick. These icons are useful for longer simulation runs.

  1. To interrupt the demo click the Pause button. Restart by clicking Continue. In interactive mode the option to proceed one Step at a time is available. This is a useful feature, in conjunction with Graphical Animation, when debugging systems or primitives.
  2. To stop a simulation running click the Early End button. This calls the wrapup method of all primitive models and all post processor results are displayed if enough information has been generated and is available to generate the graphs or files (sinks) that are present in the system. The Abort button ends the simulation and resets all default settings in the Run dialog.