Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

This example shows how to model a binary link—a compound body with two holes each for a joint connection. The model that you create comprises three Solid blocks representing the main body of the link and each of its hole sections. Two Rigid Transform blocks establish the rigid spatial relationships between the solids, translating them relative to each other so that they assemble without gaps or overlaps. The figure shows a front view of the binary link modeled in this example.

Open a new Simulink

^{®}Model window.Drag the following blocks to the model.

Library Block Quantity **Simscape**>**Utilities**Solver Configuration 1 **Simscape**>**Multibody**>**Frames and Transforms**Rigid Transform 2 **Simscape**>**Multibody**>**Body Elements**Solid 3 Connect and name the blocks as shown in the figure.

Be sure to flip the Rigid Transform block. Its B frame port must face the Main Solid block. Also include the broken line extending from the Hole B block (right click the existing connection line and drag).

In the solid block dialog boxes, specify these parameters.

Parameter Hole A Main Hole B **Geometry**>**Shape**Select `General Extrusion`

.Select `General Extrusion`

.Select `General Extrusion`

.**Geometry**>**Cross-section**Enter `HoleACS`

. Select units of`cm`

.Enter `MainCS`

. Select units of`cm`

.Enter `HoleBCS`

. Select units of`cm`

.**Geometry**>**Length**Enter `T`

. Select units of`cm`

.Enter `T`

. Select units of`cm`

.Enter `T`

. Select units of`cm`

.**Inertia**>**Density**Enter `Rho`

.Enter `Rho`

.Enter `Rho`

.**Graphic**>**Visual Properties**>**Color**Enter `LinkRGB`

.Enter `LinkRGB`

.Enter `LinkRGB`

.In the rigid transform block dialog boxes, specify these parameters.

Parameter Rigid Transform Rigid Transform1 **Translation**>**Method**Select `Standard Axis`

.Select `Standard Axis`

.**Translation**>**Axis**Select `+X`

.Select `+X`

.**Translation**>**Offset**Enter `-L/2`

. Select units of`cm`

.Enter `+L/2`

. Select units of`cm`

.

Enclose the binary link blocks in a Subsystem block, define the general extrusion coordinates, and specify the relevant parameter values:

Select all blocks excluding Solver Configuration and press

**Ctrl+G.**. Simulink encloses the selected blocks in a new subsystem block. Rename the subsystem block as shown in the figure.Select the subsystem block and press

**Ctrl+M**. Simulink adds a parameter mask to the subsystem block.In the

**Parameters & Dialog**tab of the Mask Editor, drag six edit boxes into the**Parameters**group and specify the following parameters.Prompt Name `Length`

`L`

`Width`

`W`

`Thickness`

`T`

`Peg Hole Radius`

`R`

`Mass Density`

`Rho`

`Link Color`

`LinkRGB`

In the

**Initialization**tab of the Mask Editor, define the extrusion cross sections and click**OK**:% Cross-section of Main: Alpha = (pi/2:-0.01:-pi/2)'; Beta = (3*pi/2:-0.01:pi/2)'; EndACS = [-L/2 W/2; -L/2+R*cos(Alpha)... R*sin(Alpha); -L/2 -W/2]; EndBCS = [L/2 -W/2; L/2+R*cos(Beta)... R*sin(Beta); L/2 W/2]; MainCS = [EndACS; EndBCS]; % Cross-section of HoleA: Alpha = (pi/2:0.01:3*pi/2)'; Beta = (3*pi/2:-0.01:pi/2)'; HoleACS = [W/2*cos(Alpha) W/2*sin(Alpha);... R*cos(Beta) R*sin(Beta)]; % Cross-section of HoleB: Alpha = (-pi/2:0.01:pi/2)'; Beta = (pi/2:-0.01:-pi/2)'; HoleBCS = [W/2*cos(Alpha) W/2*sin(Alpha);... R*cos(Beta) R*sin(Beta)];

In the dialog box of the Binary Link B subsystem block, specify these parameters.

Parameter Value **Length**`30`

**Width**`2`

**Thickness**`0.8`

**Peg Hole Radius**`0.4`

**Mass Density**`2700`

**Link Color [R G B]**`[0.25 0.4 0.7]`

Update the block diagram. You can do this by pressing **Ctrl+D**. Mechanics Explorer opens with a static
display of the binary link body. To obtain the view shown in the figure,
in the Mechanics Explorer toolstrip select the isometric view button,
.

To open a completed version of the binary link model, at the MATLAB^{®} command
prompt, enter `smdoc_binary_link_b`

.

Was this topic helpful?