A very small step size can slow down the speed at which the animation records. Keep the step size as small as required for the objectives of your model, but no smaller.
Also, note that the animation always plays at rate of 30 frames per second, with each frame corresponding to a simulation time-step. Since the simulation can contain a different number of time-steps per second, the simulation and animation generally play at different rates. The situation is trickier with variable-step solvers, where the time step is variable - causing the animation to slow down where the time step is very small, and accelerate where the time step is very large. The result is time distortion in the resulting AVI video.
Here is what you can do to control the number of frames you record (and hence the speed at which the animation records), and to eliminate time distortion from the resulting AVI video:
1. In the Simulink Editor, select Simulation>Model Configuration Parameters
2. Select Data Import/Export
3. In Output Options, select "Produce specified output only"
4. In Output times, enter an array defining the simulation output times, using a 1/30 second time interval - e.g. [0:1/30:10].
This will cause the animation to record one frame every 1/30 second, starting at t=0s, and ending at t=10s. This is true even if the solver time step is different from 1/30 frames per second, or variable.
If the solver time step is much smaller than 1/30 s (e.g. 0.001 s), then this procedure should accelerate the rate at which the animation records (assuming you're not simultaneously simulating the model, in which case you may be limited by the speed of simulation itself). This procedure will also ensure that the animation plays at the same rate as the original simulation, without the time-distortion caused by a variable solver step size.
Hope that helps!
"Travis" wrote in message <firstname.lastname@example.org>...
> I'm trying to make an avi from an animation in the Mechanics Explorer of gen 2 SimMechanics. I've run into a few problems:
> 1) When creating the video, it takes *forever* (approx half an hour for 5 s of simulation). It looks as though it's creating a frame every ms. Where can I adjust the frame rate?
> 2) The video ignores my zoom and pan settings and the object moves out of the frame. Any idea how to set this?