Why does the gear not rotate in this SimMechanics model?

1 visualización (últimos 30 días)
Matthew Eicholtz
Matthew Eicholtz el 4 de Oct. de 2014
Respondida: Steve Miller el 20 de Nov. de 2022
I am using SimMechanics (2nd gen) to create a simple model of a motor that drives a gear.
Unfortunately, when I run my model, the drive shaft rotates, but the gear does not. See not_working_example.slx in attached zip file.
I thought the issue may have been that I was missing a joint (e.g. weld) between the shaft and the gear or an angle constraint, but then I noticed something peculiar: when I switch the "gear" shape from General Extrusion to something simpler (e.g. Brick), the model works as expected (see for yourself in working_example.slx).
Why is this happening? How can I fix my model so that the gear rotates?

Respuestas (1)

Steve Miller
Steve Miller el 20 de Nov. de 2022
In both models, the gear is spinning. It just doesn't look like it it is spinning in the "not_working_model.slx" because of aliasing - each update to the animation makes it look like the gear is in the same position, but it has actually rotated. If you set the maximum step size to something smaller (0.01) you will see the gear rotate.
Note, however, that the gear is only spinning because of an initial velocity target in the Revolute Joint between Motor and Drive Shaft. If you want the motor to spin the gear, delete that Revolute Joint and connect the motor directly to the drive shaft with a connection line. That Revolute Joint inserts a degree of freedom between the Motor and Drive Shaft.
--Steve

Categorías

Más información sobre Gears en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by