Exercise 2: Add Systems from the Systems/Assembly Panel

In this tutorial you will learn how to instantiate a system from the MotionView graphical interface using the Systems/Assembly panel.

For this exercise, you will:
Figure 1. The triple pendulum


Figure 2. Properties table for the triple pendulum


Add the System Definition from MotionView

In this step you will learn how to add system definitions to a model from MotionView.

Adding system definitions to a model is similar to adding other entities, except you will load the definition from a file.
  1. Start a new MotionView session and open the pendulum model from Exercise 1: Create and Use System Definitions in the MBD modeling window.
  2. In the Project Browser, click on Model.
  3. In the Systems/Assembly panel, click the Import/Export tab.
  4. Click the (file browser) and select the sys_pendu.mdl system you just created.
  5. Click Import.
    Figure 3.


  6. In the dialog, under Select a definition, click sys_def_pendulum. Specify the Label as Third Pendulum System and the Variable as system3.
  7. 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.

  1. 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.
  2. Attach the third pendulum link to the second link in the pendulum system.
    Figure 4.


  3. From the Attachments tab, double-click the collector for Attachment body.
  4. In the dialog, expand the folders Second Pendulum System > Bodies and select Pendulum Body. Then click OK.
  5. Double-click the collector Pivot Point.
  6. 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.
  7. Save the model as triplependulum.mdl for future use.
  8. 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.
    Figure 5.
    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.