Jump to content

Recursion

From LabVIEW Wiki
Revision as of 14:42, 16 June 2020 by Q (talk | contribs)

Recursion in computer science is defined as a function that includes itself as part of its definition. This means that a function calls itself as part of its execution. In LabVIEW this simply means a VI calls itself as a SubVI.

Configuration

To make a VI allowed to call itself as a SubVI it must be set to reentrant. To set a VI to reentrant:

  1. Open the VI Properties dialog
  2. Click on the Category->Execution
  3. Under Reentrancy radio buttons, select the Shared clone reentrant execution
  4. Then click OK

The VI is now set to reentrant. To use, simply drag the VI Icon to the VI's Block Diagram.

Uses

Mathematics

Search Tree

Hierarchal Data

See Also