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

Creating a Recursive VI

LabVIEW 2009 Help

Edition Date: June 2009

Part Number: 371361F-01

»View Product Info

You can configure a VI to be recursive, meaning the VI can call itself from its own block diagram or from the block diagram of subVIs. Recursive VIs are useful if you want to operate multiple times on the output of the same process.

Complete the following steps to make a VI recursive.

  1. Open the VI you want to make recursive.
  2. Make the VI reentrant and configure the VI to share clones of itself between instances of calls.
    1. Select File»VI Properties from the block diagram window of the VI and select Execution from the Category pull-down menu.
    2. Place a checkmark in the Reentrant execution checkbox and select Share clones between instances.
  3. Call the recursive VI from its own block diagram or from the block diagram of a subVI.
Note Note  LabVIEW allows up to 15,000 recursive calls on 32-bit platforms and up to 35,000 recursive calls on 64-bit platforms. To avoid too many recursive calls, consider calling the recursive VI in a Case structure.

 

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