Documentation Center

  • Trial Software
  • Product Updates

Model Simple Link

Model Overview

Mechanical links are common building blocks in linkages, mechanisms, and machines. The simple pendulum is an example with one link. In this tutorial, you model a simple link with two end frames that you can later connect to joints. Rigid Transform blocks provide the end frames, while a Solid block provides geometry, inertia, and color. For simplicity, the model assumes the link has a brick shape.

    Note:   Except where noted, all parameters use the default physical units.

Build Model

  1. At the MATLAB® command line, enter smnew. The SimMechanics™ block library and a new model open up.

  2. In the model, copy the Rigid Transform block and paste a copy in the model.

  3. Delete these blocks: Simulink-PS Converter, PS-Simulink Converter, and Scope.

  4. Connect the blocks as shown in the figure.

      Note:   The base (B) frame ports of both Rigid Transform blocks must face the Solid block.

  5. In the dialog box for the Solid block, specify these parameters.

    ParameterValue
    Geometry > Dimensions[L W H] (in units of cm)
    Inertia > Densityrho
    Graphic > Visual Properties > Colorrgb

  6. In the dialog boxes for the Rigid Transform blocks, specify these parameters.

    ParameterRigid Transform1Rigid Transform
    Translation > MethodStandard AxisStandard Axis
    Translation > Axis-X+X
    Translation > OffsetL/2 (in units of cm)L/2 (in units of cm)

Generate Subsystem

  1. Select the Solid block and the two Rigid Transform blocks.

  2. Press Ctrl+G to enclose the blocks in a subsystem.

  3. Click the Subsystem block and press Ctrl+M to create a subsystem mask.

  4. In the Parameters & Dialog tab of the Mask Editor, drag five edit boxes into the Parameters folder. You can find this folder in the Dialog box pane. In the edit fields, specify these parameters and click OK.

    PromptName
    Length (cm)L
    Width (cm)W
    Thickness (cm)H
    Density (kg/m^3)rho
    Color [R G B]rgb

  5. Open the Subsystem block dialog box and specify these parameters.

    ParameterValue
    Length (cm)20
    Width (cm)1
    Thickness (cm)1
    Density (cm)2700
    Color [R G B][0.25 0.40 0.70]

Visualize Model

In the model window, press Ctrl+D. Mechanics Explorer opens with a 3-D display of the simple link. In the Mechanics Explorer toolstrip, click the isometric view button to see the 3-D view. To view the frames present in the model, in the Mechanics Explorer menu bar, select View > Show Frames.

Save Model

Save the link subsystem with the name Link in a custom block library. Then, see Model Pendulum for a basic tutorial on multibody assembly using the Link block you just created.

Was this topic helpful?