SimMechanics | ![]() ![]() |
Introducing the SimMechanics Block Libraries
SimMechanics is organized into hierarchical libraries of closely related blocks. The next section, Viewing the Blocks, shows how to view these libraries and gives you a summary of what they contain:
Viewing the Blocks
There are several ways to get to the top-level SimMechanics library on Microsoft Windows and UNIX platforms.
Microsoft Windows Platforms
Microsoft Windows users can access the blocks through the Simulink Library Browser. Open the SimMechanics entry in the contents tree.
You can also access the blocks directly inside the SimMechanics library in several ways:
mechlib
at the MATLAB command line prompt.
UNIX Platforms
UNIX users can click the Simulink icon on the MATLAB menu bar, open the Blocksets & Toolboxes library and then SimMechanics. You can also enter mechlib
at the command line.
The SimMechanics Library
Once you perform one of these preceding steps, the SimMechanics library opens.
The following sections summarize the blocks in each library. For an explanation of special terms, see Summary of Technical Vocabulary and the Glossary. You can view the general SimMechanics reference in the SimMechanics Block Reference.
The Bodies library provides the Body block for representing user-defined bodies by their mass properties (masses and inertia tensors), their positions and orientations, and their attached Body coordinate systems (CSs). This library also contains the Ground block representing immobile ground points, which have their own Grounded CSs.
The Joints library provides the blocks to represent the relative motions between bodies as degrees of freedom (DoFs). The library is made up of assembled Joints listed individually and two sublibraries of specialized Joint blocks.
An assembled joint restricts the Body CSs on the two bodies to which it is connected. The assembled Joints are the primitive Prismatic, Revolute, and Spherical blocks and ready-made composite Joints. Unless it is explicitly labeled as disassembled, you can assume a generic Joint block is assembled.
Joints/Disassembled Joints Sublibrary. The Disassembled Joints sublibrary provides blocks for disassembled joints, special joints that do not restrict the Body CSs on the two connected bodies or the DoF axes of the two bodies. You can only use Disassembled Joints to close a loop in your machine. You cannot sense or actuate Disassembled Joints.
Joints/Massless Connectors Sublibrary. The Massless Connectors sublibrary provides blocks for massless connectors, composite joints whose DoFs are separated by a fixed distance. You cannot actuate or sense Massless Connectors.
The Constraints & Drivers library provides blocks to specify prior restrictions on DoFs between Bodies. These restrictions can be time-independent constraints or time-dependent driving of DoFs with Simulink signals.
The Sensors & Actuators library provides blocks for sensing and initiating the motions of joints and bodies. These blocks play a special role in connecting SimMechanics blocks to other Simulink blocks, as described in Connecting SimMechanics Blocks, Modeling Actuators, and Modeling Sensors.
The Utilities library contains miscellaneous blocks useful in building models.
Demos Library
The Demos library contains prewritten Simulink demonstration models using SimMechanics and other Simulink blocks, as well as Stateflow blocks. Double-clicking the Demos library icon calls the Help browser and displays the SimMechanics demos list.
In the Help browser, click the Demos tab in the Help Navigator pane to the left. To see the demos list, expand the Simulink entry, then click the SimMechanics subentry. Double-click a demo model name in the list to open it.
![]() | Learning Basic Procedures | Creating SimMechanics Models | ![]() |