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

7. Configuring Simulation Functions Programmatically (Control Design and Simulation Module)

LabVIEW 2012 Control Design and Simulation Module Help

Edition Date: June 2012

Part Number: 371894G-01

»View Product Info

The previous section provided information about configuring Simulation functions using the configuration dialog box. Instead of using the configuration dialog box, you can improve the interactivity of a simulation by creating front panel controls that configure a Simulation function programmatically. Complete the following steps to configure the Stiffness function programmatically.

  1. If you are not already viewing the Context Help window, press <Ctrl-H> to display this window.
  2. Display the block diagram and move the cursor over the Stiffness function. Notice this function has only one input terminal.
  3. Display the configuration dialog box for the Stiffness function.
  4. Select Terminal from the Parameter source pull-down menu. This action disables the gain numeric control.
  5. Click the OK button to save changes and return to the block diagram.
  6. Move the cursor over the Stiffness function. Notice the Context Help window displays the Gain function with the new gain input terminal.
  7. Create a control for this input, and label the control Stiffness.
  8. View the front panel. Notice the new control Stiffness. Enter a value of 100 for this control and run the simulation. Notice the behavior is exactly the same as when you used the configuration dialog box to configure the Stiffness function.
6. Configuring the Stiffness of the Spring
Tutorial: Getting Started with Simulation
8. Modularizing Simulation Diagram Code


 Was this document helpful?  submit
  Helpful Not Helpful