Main Content

simscape.multibody.PrismaticJoint class

Package: simscape.multibody
Superclasses: simscape.multibody.Joint

Construct prismatic joint

Description

Use an object of the simscape.multibody.PrismaticJoint class to construct a prismatic joint. The Pz property of the object contains a single simscape.multibody.PrismaticPrimitive object that has one translational degree of freedom along the z-axis of the base frame, as shown in the image.

Prismatic Primitive of the Prismatic Joint

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

pj = simscape.multibody.PrismaticJoint constructs a prismatic joint with default values.

Properties

expand all

Prismatic primitive along the z-axis of the base frame, returned as a simscape.multibody.PrismaticPrimitive object. The prismatic primitive corresponds to a translation of the follower frame with respect to the base frame along the z-axis of the base frame.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Examples

collapse all

  1. Use a simscape.multibody.PrismaticJoint object to create a prismatic joint.

    joint = simscape.multibody.PrismaticJoint;
  2. Use a simscape.multibody.AxialSpringDamper object to create an axial force law.

    asd = simscape.multibody.AxialSpringDamper;
  3. Specify the equilibrium position, spring stiffness, and damping coefficient of the force law by using simscape.Value objects.

    asd.EquilibriumPosition = simscape.Value(20,"cm");
    asd.SpringStiffness = simscape.Value(0.1,"N/cm");
    asd.DampingCoefficient = simscape.Value(5e-3,"N/(cm/s)");
  4. Assign the force law to the PrismaticJoint object.

    joint.Pz.ForceLaws = asd;
  5. Before specifying the state targets of the PrismaticJoint object, you need to add the object into a simscape.multibody.Multibody object by using the addComponent method. Create a Multibody object.

    mb = simscape.multibody.Multibody;
    addComponent(mb,"MyJoint",joint);
    
  6. To specify the targets of the object, create an empty operating point.

    op = simscape.op.OperatingPoint;
  7. Add a high-priority position target for the prismatic primitive to the operating point. Note that if two targets are incompatible, the priority level determines which of the targets to satisfy.

    op("MyJoint/Pz/q") = simscape.op.Target(simscape.Value(50,"cm"),"High");
  8. Add a low-priority velocity target for the prismatic primitive to the operating point.

    op("MyJoint/Pz/w") = simscape.op.Target(simscape.Value(10,"cm/s"),"Low");

Version History

Introduced in R2022a