LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

does vi allow itself to be called?

does vi allow itself to be called? Just like recursive function?
0 Kudos
Message 1 of 3
(2,818 Views)
VI's cannot be called recursively. I would suggest changing the logic of your software so that you can call the same sub VI several times. This is done by either:

1. Saving the same VI several times, each time with a slightly different name. Then call each VI from the block diagram of your main VI.

2. Or, you can save the sub VI as a template. Then, on the block diagram of your main VI, use VI Server to call the template sub VI as many times as you want.

These two options may not directly solve your dilema but might be the closest solution.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 3
(2,818 Views)
Yes a VI can call itself. Make the VI reentrant and use a call by reference node. Only the recursive call chain directly to itself is allowed e.g. "A calls A calls A" works but "A calls B calls A" doesn't.

See this thread


LabVIEW, C'est LabVIEW

Message 3 of 3
(2,818 Views)