SimMechanics    

Setting Up the Block Diagram

In this set of steps, you create Bodies, position them, connect them with Joints, then configure the Body and Joint properties. The Body dialog boxes give you many ways to represent the same machine in the same physical state. This section explains one way.

Alternative, equivalent ways of configuring Bodies are discussed in Body Coordinate Systems.

MAT-File Data Entry

The geometric and mass properties you need to specify for the Grounds and Bodies in this model are listed in the tables of the following two sections, Configuring the Ground and Joint Blocks and Configuring the Body Blocks.

Instead of typing the numerical values of these properties into the dialog boxes, you can load the variable set you need into the workspace by entering

at the MATLAB command line. The variable name for each property is given in the tables. Just enter the appropriate variable names in the appropriate fields as you come to them in the dialog boxes.

Online Help users can click here to load the fourbar_data.mat file into the workspace.

Block Diagram Setup

Begin assembling the model with these steps:

  1. In the block library, open the Bodies library. Drag and drop two Ground blocks and three Body blocks into the new model window. Close the Bodies library.
  2. From the Joints library, drag and drop four Revolute blocks into the model window.
  3. Rotate and connect the blocks in the pattern shown in the following figure or with an equivalent block diagram topology.

Figure 2-5: Connected Ground, Body, and Joint Blocks for Four Bar Model

Block diagram topology.   The topology of the block diagram is the connectivity of its elements. The elements are the Bodies and Grounds, connected by the Joints. Unlike the model of Building a Simple Pendulum, the four bar mechanism is a closed-loop machine. The two Ground blocks represent points on the same absolute, immobile body, and they close the loop of blocks. The simple pendulum has only one ground and does not close its block connections.

To maintain consistent Body motion direction, make sure the Body coordinate system (CS) port pairs on each Body follow the sequence CS1-CS2, CS1-CS2, etc., for each bar, moving from Ground_1 to Ground_2, from right to left, as shown. To make the Joints consistent with the Body motion, the base-follower pairs B-F, B-F, etc., should follow the same right-to-left sequence.


  Configuring the Mechanical Environment Settings Configuring the Ground and Joint Blocks