Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating a Recursive Member VI

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

You can configure a dynamic dispatch member VI to be recursive, or to use itself as part of its own definition. Recursive VIs can call themselves on their own block diagram, including the block diagram of subVIs. Recursion is useful if you want to operate many times on the output of the same process. You can configure a dynamic dispatch member VI to allow recursion by setting it to be reentrant and to share clones between instances.

Complete the following steps to configure a VI for recursion.

  1. Open or create a dynamic dispatch member VI.
  2. Make the VI reentrant.
    1. Select File»VI Properties to display the VI Properties dialog box.
    2. Select Execution from the Category pull-down menu to display the Execution Properties page.
    3. Place a checkmark in the Reentrant execution checkbox and select Share clones between instances.
  1. Develop the member VI to complete a recursive operation.
Note Note  Not accounting for infinite recursion causes unnecessary memory usage and might crash LabVIEW. To avoid infinite recursion, consider calling the recursive VI in a Case structure.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit