I want to have a part that goes up 0.5m and then turns 90degrees
- Physics → Dynamic (no layer, colider Box)
- Joints → Prismtic Y axis
- +Motor for this joint movement
- Joints → Revolute Y axis
- +Motor for this joint movement
- Actuation Controller and Upper = 0.5m
Works fine when just one joint added separately but with both configured it’s not moving.
Just the part seems to shake as if it would like to move to 0.5m in Y orientation.
configuration as in this file:
PrismaticRevoluteJoint.ptm (4.2 KB)
One more thing to improve: Motor parameter in joint configuration doesn’t display the full name after adding with Motor→Rename so if there are more thane one it’s not possible to distinguish them
PS. I know that saving “persistent change” is described here:
but please tell me again how to modify, test, and save configuration correctly ?
Now I feel like doing it over and over again, configure→simulate→reset → configure without simulation→saving into .ptm file
Nice to have would be: configure→simulate→save when I’m sure it was working
Thanks for attaching the model.
The problem is that you have two joints on the same entity both based to the world. When you add a joint to an entity, the base property specifies which other entity the joint is attached to. If the base property is left empty, it specifies that the other end of the joint is attached to the world. So the prismatic joint is configured to only allow the entity to move upwards relative to the world, and the revolute joint is configured to only allow the entity to rotate about the y-axis relative to the world. When combined, this means that the entity cannot move since all degrees of freedom are locked.
You need to introduce an additional entity. In the attached model, I have added a YAxis_Linear entity which is allowed to move only along the y-axis relative to the world due to the prismatic joint. Then, the original entity was renamed to YAxis_Angular and is constrained to only rotate about the y-axis. However, since the base property is set to YAxis_Linear, it is allowed to rotate about the y-axis relative to the YAxis_Linear entity. If you’re using Onshape, I’d recommend creating a subassembly for the part, rather than creating the entity inside of ProtoTwin. That ensures you can use CAD Sync when you make additional changes.
PrismaticRevoluteJointFixed.ptm (4.4 KB)
Thanks for spotting the issue with named components. We will get a fix released within the next few days.
You can configure → simulate → save. That should work. However, note that the model will be reset automatically before saving. The key is that any changes made after you start running the simulation (i.e. when the time displayed at the bottom is non-zero) are not persistent. This means that you can configure the model, run the simulation and then play with the actuation controller. When you then reset the simulation, any changes (e.g. to the state of the actuation controller) are reset, and the model is configured just as it was before you started to run the simulation.
Let me know if you have any questions or concerns.
A fix for the display of named components in the inspector has been published.