I'm trying to actuate a prismatic joint to follow a specific motion. I basically want the joint motion to be sinusoidal in the vertical direction. In the prismatic joint dialogue box, I've selected "Provided by Input" under the Actuation >> Motion drop-down menu. Then I have a sine source going through a 3-input Mux (for position, velocity, and acceleration) through a Simulink-PS converter to the Prismatic Joint input. This arrangement isn't working, and I've tried several other arrangements that have failed. I'm sure there is a way to do it, but I haven't had any luck. Any advice would be greatly appreciated.
Again, I'm using the second generation of sim mechanics.
Sicne you don't provide the error, it is difficult to diagnose... The "Joint Actuation" doc page explains what you need to actuate a joint in motion:
Also, here are two things for you to check:
For each 1-DoF joint primitive that you motion-actuate, you should set a 1-DoF primitive to have its actuation force or torque automatically computed. If the number of degrees of freedom being motion-actuated exceeds the number being force- or torque-actuated, SimMechanics throws an error message that starts like this:
In the dynamically coupled component containing Prismatic Joint Prismatic_Joint1, there are fewer joint primitive degrees of freedom with automatically computed force or torque (0) than with motion from inputs (1).
The difference between the two numbers tells you how many degrees of freedom to change. In the message above, that number is one. In the (admittedly unlikely) event that your model has only one joint block, you might change Actuation > Force parameter in the one Prismatic Primitive to "Automatically Computed".