LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control instances of a subVI

Solved!
Go to solution
Highlighted
Solution
Accepted by topic author danthecoffeecan

@danthecoffeecan wrote:

you would have a for loop (controlled by user input) that calls a function for each instance of the for loop. In this example, if you input "3," the loop will call the function three times with the frequency as an argument which correlates to the base frequency and iterations of the loop.

 

I just don't know how I could "call" the reentrant subVI at different amounts set by the user.


LabVIEW has For loops too. You just put your function inside the loop, and voila, it's called multiple times. It doesn't even have to be reentrant. For this use-case, only one thing can output to your sound card at a time, so you will have to pre-generate the sound you want, then play it.

 

tones.png

 

If you have LV Full you can also use the Multitone VI's to generate multiple-tone frequencies all in one VI:

 

 

0 Kudos
Message 11 of 13
(90 Views)
Highlighted

Or all in one loop, of course:

 

altenbach_0-1591133256571.png

 

(even easier would be to place the addition into a i!=0 case. There are many alternatives)

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 12 of 13
(75 Views)
Highlighted

Ah I see, thank you! This helps.

0 Kudos
Message 13 of 13
(43 Views)