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: 

My block diagram is crowded with 30 references. Easy way to put them into a sub vi?

Solved!
Go to solution

I have a lot of indicators and controls on my front panel and a number of references that I'm initializing into a bundle so my block diagram is very crowded.  I thought I'd done a good job keeping much of the work inside sub-vi's but am stuck on how to get the controls and references and indicators into sub-vi's?  

0 Kudos
Message 1 of 6
(2,127 Views)
Can you show us som example code? (I don't understand the meaning initializing references into clusters. A reference is never initialized. Are you bundling them into clusters perhaps?)
0 Kudos
Message 2 of 6
(2,121 Views)

Use the bundle of references as input to the sub-vi's. If you have bundled them it should be rather clean as you only should have 1 bundle-wire running around.

I'm guessing you dont have a state machine architecture? If so you typically have an initialize step in which you can create your bundle and the other steps will be alot cleaner.

(Assuming i didn't misunderstand wildly)

 

edit: Also assuming you by "reference" dont mean the wires going from the controls and indicators in which case you're mistaken, that's the actual data.

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 6
(2,109 Views)

Hi,

 

I am not sure what exactly is your point. But just to make a subVI of some controls, indicators and references, go to the block diagram of your VI, using mouse click & drag, select the part of code which includes the controls, indicators and wires you want to insert into the subVI, then go to 'Edit' in the menu bar and click on Create SubVI. A sub VI will be created and all the code you selected will be inserted into this SubVI. You can save this SubVI to a preffered location.

 

Regards,


Nitz..

(Kudos are Always WelcomeSmiley Wink)

0 Kudos
Message 4 of 6
(2,086 Views)
Solution
Accepted by topic author ahhah

If you're asking about hiding the actual code where you bundle the references, then no, there is no such feature, and people don't seem to like anything which even suggests anything like this (see here, where we specifically discussed this use case and here).

 

Anyway, as said, you can also just place it in an area of the code which is out of the way. This utility allows you to create such code with a single click, but it will require that you install the RCF first (see the links there).

 


___________________
Try to take over the world!
0 Kudos
Message 5 of 6
(2,084 Views)

And dove-tailing Yair's reply...

 

I wrote about the GUI Controller I use in many of my apps in this thread.

 

I hope that helps,

 

Be

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,062 Views)