LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call SubVI

Hello
 
I have a SubVi,in the program all the variables are fixed. I need to call this subVi in other program.
 
Any suggestions pls
0 Kudos
Message 1 of 28
(2,870 Views)
I suggest you create at least 1 input to the subvi. That way you can wire the subvi and control the time of the call. Then you can just wire the subvi into the program.
0 Kudos
Message 2 of 28
(2,861 Views)

Thanks Joseph

now i have created a subvi with 3 input and 3 outputs, 2 i/o are connected to the terminals in the subvi program, but i am unable to copy the subvi icon to the other program.

I not bit clear with this,pls give some suggestions

 

Thanks

0 Kudos
Message 3 of 28
(2,859 Views)
How did you add it in?
 
Generally I add it in by doing a select a VI. At that point it brings up a menu to allow you to navigate to the location where the subvi is located. At that point you just select it and it should just be added to the program.
 
Make sure you save the subvi as a file or into a library file before you add it into the program.
0 Kudos
Message 4 of 28
(2,854 Views)
Thanks Joseph
 
I made a mistake,its showing the terminal now. But actually i dont  need those terminals in my main program at all becoz the values are fixed. Just i need that subvi to execute in main program.
 
I read from the NI help that we can do that by Call Reference, give me ur suggestions to this issue.
 
Thanks
0 Kudos
Message 5 of 28
(2,849 Views)
As I mention, just select the vi from the file and just slap it in the program. It will then execute sometime in the program.
0 Kudos
Message 6 of 28
(2,845 Views)
If you want to call a subVI with it's default values, just call it. You really don't need to call it dynamically.
0 Kudos
Message 7 of 28
(2,841 Views)

Thanks joseph and Dennis

Its fine.

My task in my main program i have a button,so when i press that it will start executing the subvi and needs to open the subvi front panel.

Similarly in a same program i need to call some 5 different Vis, each time i press the button corresponding to the vis it should start executing and needs to open the corresponding subvi front panel.

Pls let me know if this not clear

Thanks

 

0 Kudos
Message 8 of 28
(2,836 Views)

Pls ignore the previous message

Thanks joseph and Dennis

Its fine.

My task is,in my main program i have a button,so when i press that it will start executing the subvi and needs to open the subvi front panel.

Similarly in a same program i need to call some 5 different  subVis, each time i press the button corresponding to the vis it should start executing and needs to open the corresponding subvi front panel.

Pls let me know if this not clear

Thanks

0 Kudos
Message 9 of 28
(2,835 Views)
From what I understand, you will be placing it in a loop. If it is based on pushing in a button, you will need to place it in an event structure or a case structure. otherwise placing it in the loop, it will execute every time you do a loop.
0 Kudos
Message 10 of 28
(2,831 Views)