Mechanics Explorer: Update Input values during simulation
6 views (last 30 days)
Show older comments
Hi everybody,
in my simscape multibody model of a gearbox, one parameter is varied by a "horizontal slider". Everything is working fine, except the dynamic simulation of the gearbox: the animation is not updating when i change the value with the horizontal slider. If i stop the simulation and run it again (with changed value of the slider), the animation is correct - but again, only for the starting value of the slider. When I check the varied value with a scope during simulation, everything is working as it should - except the dynamic animation in the mechanics explorer.
What do I have to do to get a real time animation of my gearbox?
Thank you very much for your help.
0 Comments
Answers (1)
Meet
on 6 Apr 2023
Hi,
This happens because of the difference in clock speed of simulation and the Mechanical Explorer. The simulation clock is running at about 100 times faster than the wall clock, whereas, the Mechanics Explorer is playing the animation at 1x wall clock speed by default.
You can refer to the answer posted in Simscape Multibody - model does not react to slider gain changes without stopping and starting the simulation again - MATLAB Answers - MATLAB Central (mathworks.com). The user was facing a similar issue and was able to solve it using the solution mentioned in the answer.
0 Comments
See Also
Categories
Find more on Assembly in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!