Main Content

addConnector

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

Add connector to Multibody object

Description

addConnector(mb,connectorName,internalPath) adds a connector named connectorName to the simscape.multibody.Multibody object, mb. The new connector corresponds to a frame connector of a component object that is at the top level of the mb object. The internalPath argument is the path for the connector of the internal object. The path has two elements, the first element is the name of the component object, and the second element is the connector name.

Note that you can add multiple connectors that link to the same internal frame connecter when the frame connector serves multiple purposes in the model.

Input Arguments

expand all

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

Name of the new connector, specified as a string scalar or character vector. The connector name can be different than the name of the corresponding internal frame connector. The name must be unique among the names of all the connectors on the Multibody object. In addition, the name must be a valid MATLAB® identifier. You can use the isvarname function to check if the name is a valid identifier.

Example: "elbow"

Path of a frame connector on a component object located at the top level of the simscape.multibody.Multibody object, specified as a string scalar or character vector. The path has two elements separated by a forward slash. The first element is the name of the component object, and the second element is the name of the frame connector.

Example: "UpperArm/elbow"

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a