Table Of Contents

VI Reentrancy

Last Modified: November 1, 2016

LabVIEW provides three VI reentrancy options that determine how your subVI executes when it is called at more than one point in the dataflow at the same time.

By default, LabVIEW executes each call to the subVI one after another. This may cause your application to execute slowly or have unexpected behavior. To allow multiple calls to a subVI to execute simultaneously, set a reentrant execution state for the subVI.

Refer to the following table to determine which VI reentrancy option is best for your subVI.

What your subVI needs Option(s) to use
Ability to maintain state
  • Stateful maintains state for each instance of the subVI.
  • None maintains a single state across all instances of the subVI.
Minimize wait time when multiple VIs call your subVI at the same time
  • Stateful eliminates wait time completely.
  • Stateless results in wait time if there are more calls to the subVI than there are clones. However, the wait time is always within a certain range.
Determinism, or the same wait time for each call to the subVI
  • Stateful guarantees the same exact wait time for each call to the subVI. This minimizes jitter in applications involving time-sensitive data.
Minimize memory usage
  • None uses the least memory.
  • Stateless uses less memory than Stateful if your subVI needs the other features of reentrancy.
Minimize call overhead
  • Stateful is the most efficient for calling a subVI many times, such as within a loop.

Recently Viewed Topics