# Simulate prismatic joint in a simple 4 bar mechanism

10 views (last 30 days)
Raju Purohit on 4 Nov 2012
Dear all,
I am trying to simulate a mechanism which includes a crank (rotating link and having smaller length) attached to a rocker (swinging link and having longer length) and they are inter connected by prismatic link. So when the crank rotates, a slider (basically a prismatic joint) attached to its end slides over the rocker. The axis of action of the prismatic joint is along the rocker.
If you have trouble imagining the mechanism, you can think of crank with its end at [0 0 0] (ground 1) and [1 1 0] (prismatic joint). The rocker has its ends at [4 0 0] (ground 2) and [1 1 0] (prismatic joint). I have kept the slider link as a point body at [1 1 0] which is connected with crank by revolute and with rocker by prismatic joints. Crank rotates and the slider slides over the rocker.
Now, my problem is when I give the axis of action of the prismatic joint along, in the above example, [-3 1 0] in reference with the follower (rocker), I get this error: " A constraint has been violated. Check constraint solver type and tolerances in the Machine Environment block and Simulink solver and tolerances in Configuration Parameters. Check for kinematic singularities".
It appears that revolute at the ground 2 is being pulled off from its position. I was expecting that the slider will move along the rocker but apparently the slider is acting more like a revolute. But I noticed that the prismatic joint works properly when the axis of action is either [1 0 0] or [0 1 0].
Can anyone please help me out with this? I hope my question is clear, and if not, then please let me know. I am sorry for such a lengthy question. Thanks in advance.

Raju Purohit on 6 Nov 2012
Figured it out!! Thanks anyways.

### Categories

Find more on Assembly in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by