SimMechanics    

Configuring the Mechanical Environment Settings

Open a new blank model window from the SimMechanics library. First you need to set the global mechanical environment.

On the model window toolbar, open the Simulation menu and click the Mechanical environment entry.

The Mechanical Environment Settings dialog box appears.

The Mechanical Environment Settings Dialog Box Panes

Click the four tabs in succession to expose each pane.

Pane
Function

Parameters

Controls general settings for mechanical simulations

Constraints

Sets constraint tolerances and how constraints are interpreted

Linearization

Controls how SimMechanics models are linearized with Simulink

Visualization

Configures the visualization tools

Note some important features of this dialog box:

Setting the Visualization Pane

To visualize the bodies as you build the machine, go to the Visualization pane of Mechanical Environment Settings:

  1. In the Draw machine using menu, select either Virtual Reality Toolbox or MATLAB Graphics (Handle Graphics).
  1. Leave Represent bodies as in default the Equivalent ellipsoids.

  1. Select the Draw machine in initial state check box. Leave the Update machine menu as default When diagram changes to see bodies appear and change in the virtual world as you add and change them in the model.
  1. If you want to animate the simulation later when you run the model, select the Animate machine during simulation check box as well.

  1. Click OK or Apply.
  1. If you chose Handle Graphics, an empty Handle Graphics window opens. If you chose virtual reality, an empty virtual world appears in a virtual reality viewer.

    Either visualization window becomes populated with bodies as you add them to the model.

    If you open visualization after the model is built, the finished machine appears.


  A Four Bar Mechanism Setting Up the Block Diagram