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: 

Distinguishing Main VI and subVI

Solved!
Go to solution

Hi 

I have a very basic question; how do you tell the main VI from subVIs? I have a project file that has numerous classes, folders and other VI and controls. The overwhelming high number makes it difficult for me as a beginner to understand what is what and how are they related. Any help is appreciated.

Thanks,

/Hastie

0 Kudos
Message 1 of 4
(2,550 Views)
Solution
Accepted by Hastak

Hi Hastie,

 

simple: a subVI is called from a mainVI…

 

The overwhelming high number makes it difficult for me as a beginner to understand what is what and how are they related.

- It would help to give those VIs better names! I often name the main VI of a project using a scheme like "project_Main.vi"…

- It would help to sort the subVIs into (virtual) folders in your project tree.

- You can use the VI hierarchy view to see the relation between VIs.

- You can right-click a VI in the project tree and "Find callers" of that VI…

- …

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,548 Views)

Thanks for your reply Gerd, the "Find Callers" option really helped. When I look at the Vi Hierarchy of the "suspected" mainVI, there are many subVIs that that not included in the project folder. They mostly seem to be coming from the drivers used, is that normal? Shouldn't they also be in the project folder? If not how does the program know where to look for them?

Sorry for perhaps too obvious questions!

Best,

/Hasti

0 Kudos
Message 3 of 4
(2,534 Views)
Solution
Accepted by Hastak

Hi Hastie,

 

They mostly seem to be coming from the drivers used, is that normal?

Yes, that's normal.

All VIs in user.lib, instr.lib and vi.lib usually don't belong into the project.

 

Shouldn't they also be in the project folder?

Did you notice the "Dependencies" sub-tree of the project?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,524 Views)