10-13-2014 03:32 AM
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.
Solved! Go to Solution.
10-13-2014 03:40 AM - edited 10-13-2014 03:42 AM
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.
10-13-2014 04:48 AM
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.
10-13-2014 05:11 AM
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
10-13-2014 05:52 AM
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.
10-13-2014 06:01 AM
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
10-13-2014 07:05 AM
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.
10-13-2014 10:09 AM
@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
10-13-2014 01:01 PM
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.
10-14-2014 02:21 AM
All VI's are VI's are SubVI's, it's just a matter of placement. 🙂
/Y