Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

8. Modularizing Simulation Diagram Code (Control Design and Simulation Module)

LabVIEW 2012 Control Design and Simulation Module Help

Edition Date: June 2012

Part Number: 371894G-01

»View Product Info

You can create simulation subsystems to divide simulation diagrams into components that are modular, reusable, and independently verifiable. Complete the following steps to create a simulation subsystem from this simulation diagram.

  1. View the simulation diagram.
  2. Select the Calculate Acceleration, Calculate Velocity, and Calculate Position functions by pressing the <Shift> key and clicking each function.
  3. Select Edit»Create Simulation Subsystem. LabVIEW replaces these three functions with a single function that represents the simulation subsystem, which is circled in the following image.

    The inputs and outputs of the simulation subsystem include the inputs and outputs of all the functions you selected. Also, notice the amount of blank space on the simulation diagram. Because you combined three functions into a subsystem, you can resize the Control & Simulation Loop and reposition the functions to make the simulation diagram easier to view.
  4. Press <Ctrl-S> to save the simulation diagram. LabVIEW prompts you to save the simulation subsystem you just created. Click the Yes button and save this simulation subsystem as You now have a simulation subsystem that obtains the position of a mass by using Newton's Second Law of Motion.
Note  You can resize the simulation subsystem to better display its simulation diagram. You also can double-click the simulation subsystem to display the configuration dialog box of that simulation subsystem.
7. Configuring Simulation Functions Programmatically
Tutorial: Getting Started with Simulation
9. Editing the Simulation Subsystem


 Was this document helpful?  submit
  Helpful Not Helpful