In this tutorial, you will learn how to create a pendulum model using Model Definition Language (MDL), run a dynamic
simulation of the model, plot the rotation of the pendulum and view the animation.
In this tutorial, you will learn to create a dataset to specify the start time, mid time, end time, and the force
magnitude, include dataset definition in the analysis definition, and vary the magnitude and time of the impulse torque.
In this tutorial you will learn how to create systems using the MotionView graphic user interface, export a system definition to a file, and instantiate a saved definition in a model.
This manual provides a detailed list and usage information regarding command statements, model statements, functions and
the Subroutine Interface available in MotionSolve.
In the Systems/Assembly panel, click the Import/Export
tab.
Click the (file browser) and select the
sys_pendu.mdl system you just created.
Click Import.
In the dialog, under Select a definition, click
sys_def_pendulum. Specify the Label as
Third Pendulum System and the Variable as
system3.
Click OK.
Resolve Attachments and Update Points
In this step, you will use the MotionView graphical user
interface to resolve attachments and update points in your model.
In the Project Browser, select the newly added
system.
In the Attachments tab for the system, the
*Attachments() line is added to the system
definition.
Attach the third pendulum link to the second link in the pendulum system.
From the Attachments tab, double-click the collector for Attachment body.
In the dialog, expand the folders Second Pendulum System > Bodies and select Pendulum Body. Then click
OK.
Double-click the collector Pivot Point.
In the dialog, expand the folders Second Pendulum System > Points and select the Pendulum CM point. Then
click OK.
You should see the third pendulum system in the modeling window.
Save the model as triplependulum.mdl for future
use.
Run MotionSolve and view the results.
Important: Definitions need to be independent, therefore a
*DefineXXX block should not contain another
*DefineXXX block within them. The left side of Figure 5 shows a
*Define block inside another
*Define block. Such definitions are referred to as
nested definitions and may result in MotionView
giving errors while reading such definitions. The right side of Figure 5 shows the
correct way of placing definitions.
In Exercise 1: Create and Use System Definitions, you authored a system
definition by modifying an existing model MDL, in other words replacing
*BeginMDL() and *EndMDL() with
*DefineSystem() and *EndDefine().
While you can employ this method in many cases, take care that any existing
definition block within the *BeginMDL block does not end
up being nested. You must move such definition blocks out so the blocks are
independent with regard to each other.