Main Content

connectVia

Class: simscape.multibody.Multibody
Package: simscape.multibody

Link two connectors in Multibody object via intermediate object

Description

connectVia(mb,viaComponent,connectorB,connectorF) links two connectors, connectorB and connectorF, of the component objects in a simscape.multibody.Multibody object, mb, via the intermediate object, viaComponent.

The connectVia method makes connections only between component objects at the top level of a Multibody object. The viaComponent object must have exactly two frame connectors, B and F, that refer to the base and follower connectors. The base connector links to the connectorB connector, and the follower connector links to the connectorF connector. The image shows an example.

Illustration for connectvia function

Here, the connectVia method uses a simscape.multibody.RevoluteJoint object, Elbow, to connect the elbow connectors on the UpperArm and LowerArm objects.

connectVia(Robot, "Elbow", "UpperArm/elbow", "LowerArm/elbow");

Input Arguments

expand all

Multibody system, specified as a simscape.multibody.Multibody object.

Path of the intermediate object, specified as a string scalar or character vector. The path has one element. The intermediate object must be a simscape.multibody.RigidTransform object or an object of a subclass of the simscape.multibody.Joint abstract class.

Example: "Elbow"

Path of the connector that connects to the base connector of the intermediate object, specified as a string scalar or character vector. The path must have exactly two elements. The first element is the object at the top level of the Multibody object, and the second element is the connector name.

Example: "UpperArm/elbow"

Path of the connector that connects to the follower connector of the intermediate object, specified as a string scalar or character vector. The path must have exactly two elements. The first element is the object at the top level of the Multibody object, and the second element is the connector name.

Example: "LowerArm/elbow"

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a