MATLAB Answers

0

visualization during animation error

Asked by mohamed YOUSEF on 1 Apr 2019
Latest activity Answered by mohamed YOUSEF on 2 Apr 2019
please anyone, in simscape multibody why there is no option to visualize during animation in 2nd generation as in 1st generation .

  0 Comments

Sign in to comment.

2 Answers

Answer by Steve Miller on 2 Apr 2019
 Accepted Answer

You can animate the simulation results in Simscape Multibody Second Generation. Normally it is enabled by default when you create a new model. Try opening a shipping example (such as sm_four_bar) and the animation should appear when you press the Run button.
The animation in second generation is much more powerful than in first generation. Here are some things you can do in second generation that you cannot in first generation:
  1. Replay and scroll through animation without re-running the simulation
  2. View multiple viewpoints simultaneously
  3. Interactively hide elements (so you can see elements that are behind or inside other elements)
  4. Define cameras that track objects or move to specific locations and orientations in time.
There are many more advantages to the second generation technology.
--Steve

  2 Comments

Thanks @Steve, but i don't want to input a specific signal to run the simulation .. i need to use slider gain block to control of a specific value even with gui. but i can't do this.
look at my trail using 1st generation
now i don't know how to apply it using 2nd generation. i'd be appreciated if you told my how to apply it.
Thanks.
What you did in first generation should work just fine in second generation. You need to
  1. configure the joint to accept motion in put (set Motion to Provided by Input, Torque to Automatically Computed),
  2. connect your Simulink signal to a Simulink-PS converter,
  3. within the Simulink-PS converter, on the Input Handling tab, for filtering derivatives select "Filter input, derivatives calculated"
  4. Select second order filter.
Example sm_windshield_wiper is already configured for a motion input. You could try it there easily - just replace the ramp input "Motion" with your constant and gain block.
You may need to slow down the simulation so that the animation matches your mouse input. Starting in R2018a, you can set the pace of execution directly in Simulink.
For earlier releases, try this:
--Steve

Sign in to comment.


Answer by mohamed YOUSEF on 2 Apr 2019

Done, Thanks a lot Steve.

  0 Comments

Sign in to comment.