Starting Visualization and Simulation

About Simscape and Visualization Settings

After you have considered and adjusted SimMechanics™ mechanical and mathematical settings, discussed in Configuring Methods of Solution preceding, you should review Simscape™ and visualization settings before proceeding to simulation. Open your model's Configuration Parameters dialog from its Simulation menu.

Using the Simscape Editing Mode

The Simscape node of the Configuration Parameters dialog contains the Editing area and Editing Mode pull-down menu. Select the editing mode here, either Full or Restricted. The default is Full.

  • The Full mode allows you to open, simulate, change, and save models that contain SimMechanics blocks, without restriction. It requires the SimMechanics product to be installed and a SimMechanics license.

  • The Restricted mode allows you to open, simulate, and save models that contain SimMechanics blocks, without requiring a SimMechanics license, as long as the SimMechanics product is installed. In this mode, you can also change a limited set of SimMechanics block dialog parameters.

For more information about Simscape editing modes, see the Simscape documentation.

Editing Block Parameters in Restricted Mode

When you open a SimMechanics model in Restricted editing mode, you cannot change certain block parameters in the block dialogs. The general editing rules for Restricted mode are:

  • You can edit dialog fields that contain numerical values or variables.

  • You cannot change pull-down menu settings.

  • You cannot change check box selections.

Exceptions to the Restricted Mode Editing Rules

There are exceptions to the general block parameters editing rules in Restricted mode.

Machine Environment Block.  The Machine Environment dialog is unrestricted in Restricted mode (including pull-down menus), except for:

  • Analysis mode pull-down menu

  • Input gravity as signal check box

Editing Parameter Tables in Dialogs.  Certain block dialogs use tables to organize parameter fields. You cannot edit such parameters in Restricted mode. The block dialog components affected are:

To work around these restrictions, place a workspace variable name (instead of a numerical value) in these parameter fields while editing in Full mode. Then in Restricted mode, you can change the value of the workspace variable, although you cannot change the dialog field entry itself.

Setting Up Visualization

Above the level of individual Body blocks, configuring visualization requires entering settings at the machine and model level.

Visualization Settings for an Entire Model

You enter the visualization settings for an entire model in the Visualization area of the SimMechanics subnode of the Configuration Parameters dialog. Model-wide visualization is disabled by default.

To start visualization, you must select at least one of the first two check boxes:

  • Display machines after updating diagram for static visualization

  • Show animation during simulation for dynamic animation

Every machine within your model inherits the model-wide body color and geometry settings. However, you can override these defaults on a per-machine and per-body basis.

Visualization Settings for Each Machine in a Model

You can choose whether and how to visualize a specific machine in your model through the Visualization tab of its Machine Environment dialog. A single window displays all selected machines in a model.

Machine-specific visualization is enabled by default. You can override model-wide default body geometry and color settings on each machine individually.

Visualization Settings for Each Body in a Machine

You can choose how to visualize a specific body in a specific machine through the Visualization tab of its Body dialog. You can override machine-wide default body geometry and color settings on each Body individually.

Visualization Settings in the SimMechanics Visualization Window

The SimMechanics visualization window itself contains all other visualization controls.

Starting the Simulation

Once you configure the Simulink® and SimMechanics settings to simulate a mechanical system, you can run your model.

As the simulation proceeds, you might encounter warnings, errors, and unexpected or unsatisfactory results. Consult these sections to learn how to identify errors and improve your simulation.

Was this topic helpful?