From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

another way to call a VI in another VI without transforming it to a subVI

Solved!
Go to solution

Hi,

 

i have a VI which I tried to convert into a subVI in order to call it in another VI but it tells that a connector pane can not have more than 28 connections, ok but is there any other way to call a VI without transforming it to subVI? Especially that I tried to reduce the connections and I couldn't.

 

Best Regards.

0 Kudos
Message 1 of 10
(3,036 Views)

No there isn't, and a function that requires more than 28 connections clearly is a monster that requires some careful redesign. There are also clusters to combine logically related values into one wire, which may help. But don't let that tempt you to throw everything into a cluster just to get below the 28 connections. A cluster containing totally unrelated elements is almost worse than a spagetti diagram were you can't see the logic because of all the wires.

 

Creating SubVIs is not generally about selecting some code and select Edit->Create SubVI from Selection. Some careful design is definitely recommended.

Rolf Kalbermatter
My Blog
Message 2 of 10
(3,032 Views)

ok i heard that if I put the VIs in a same project, I can call any of them using a property node. How is that?

Thank you for your help.

0 Kudos
Message 3 of 10
(3,011 Views)

As mentioned, with 28 connectors you probably will have other issues, but the solution is to group them as a Cluster. Then it's only 1 connector containing all information. Make the cluster and make it a type-def, else it'll probably come back to bite you.

/Y

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 10
(3,000 Views)

Yes I've already done that after your first reply. Now, I'm asking you about the next step. I would like to open a VI from another more global VI. How can I do that?

 

Best regards.

0 Kudos
Message 5 of 10
(2,992 Views)

Vi server, Call by Reference or Asynchronous Call is probably what you're after.

Check Help -> Find examples and look at those 3 examples.

Having the VI in the project is irrelevant in this case, either you use a static vi-ref or a vi-path, you will need to have it in the project and include it to be able to compile an executable if that's the plan.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 10
(2,986 Views)
Solution
Accepted by topic author Yasmine90

Just drag your other VI from the project onto the block diagram of the VI you want to call it.  Then wire up the inputs and outputs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 10
(2,970 Views)

@crossrulz wrote:

Just drag your other VI from the project onto the block diagram of the VI you want to call it.  Then wire up the inputs and outputs.


Which transforms it to a sub-vi ... maybe the thread title was malformed. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 10
(2,944 Views)

Yamaeda wrote:  Which transforms it to a sub-vi ... maybe the thread title was malformed. 🙂

There was no transforming happening.  It is still a VI.  It is just now being called by another VI.  So to the main VI, it is now what we have always called a "subVI".  But it is still just a VI.

 

Yes, I'd say the thread title was a little malformed or the OP didn't quite understand something.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 9 of 10
(2,926 Views)

All VI's are VI's are SubVI's, it's just a matter of placement. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 10
(2,894 Views)