MATLAB: How to set the range of a prismatic joint in SimMechanics 3.1.1 (R2009b)

edgehardhardstoplimitSimscape Multibodystopwall

I have a prismatic joint for which I would like to set hard stops. I cannot find a way to do this within the block dialog.

Best Answer

The following steps will allow you to set the limits of motion of a prismatic joint:
1. Add a joint sensor and joint actuator to the prismatic joint.
2. Use the position information from the joint sensor to calculate an appropriate force.
3. Use the joint actuator to apply this force on the joint.
There are a variety of different was that the force can be calculated. The attached model uses a switching mechanism, so that a constant force is applied when the joint is out of the specified range. Other methods include forces in proportion to the distance outside the specified range, and modified spring and damper contacts.