LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a VI with no terminal connections on the Front Panel and connect it inside another VI

Solved!
Go to solution

I have an issue that is probably simple that i cant seem to get working. I have create two VIs that act as one working program. The first part of the programs does measurements, while the second displays the results. They both have their own Front Panel. The only connection between the two parts are 2 different arrays that are only handled on the block diagram and are not seen on the Front Panel IMG _2. I am able to drop the Second Vi into the block diagram of the first but cant do anything with it since there are no terminals specified. This is because there are no objects for me to connect to them on the Front Panel. When i copy the entire second VI into the first, highlight all the code, and select Create Sub-Vi the result is not a single VI icon, but an icon with some indicators IMG_2b

 

My goal is to have the second Vi launch when the first completes. Each front panels needs to be independent. Any help would be appreciated

Download All
0 Kudos
Message 1 of 9
(5,050 Views)

Your description and heavily truncated images are insufficient to describe the problem. You you want to define the order of the subVIs, you can use a flat sequence. Typically, you should at least have error terminals. This allows you to define execution order by the data dependency of the error wire.

 

Feel free to attach simplified versions of your VIs or at least provide a more detailed description What do the subVIs do? How do they terminate?

0 Kudos
Message 2 of 9
(5,001 Views)

Create a 3rd Main.vi and drop both the others in this one. The main vi needs a flat sequence, or better as Altenbach mentioned, error terminals so you can decide order through the error wire.

/Y

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

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

Sorry for the poor explanation. My issue is not that i can't control execution order. My problem is that there are only two array wires that i want connecting the two VI and when i create a sub VI of the second there are not terminals for me to connect it to. Both VIs need there own Front Panel.

 

I have attach a simple version of what i am trying to do. The tables and everything in the for-loop are the main VI. and everything else should be it's own sub-VI.

0 Kudos
Message 4 of 9
(4,924 Views)

@RJMason wrote:

My problem is that there are only two array wires that i want connecting the two VI and when i create a sub VI of the second there are not terminals for me to connect it to.


So why can't you connect the arrays to the connector panes and pass the data around?



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 5 of 9
(4,921 Views)

I was not able to connect the data to the connector panes because the arrays do not live on the Front Panel and no array should be visible there. I was able to get it working by doing just that though. i just moved them to the back and hid them behind a graph. I was just hoping there was a proper way to make it happen without having to create those array controls on the Front Panel at all.

0 Kudos
Message 6 of 9
(4,913 Views)
Solution
Accepted by topic author RJMason

Hi RJ,

 

two common options:

- move your controls/indicators out of the visible area of your front panel. Hide the scrollbars of the VI at run time!

- hide the controls/indicators after connecting them in the connector pane (it's a right-click option of each control/indicator!)

 

I was just hoping there was a proper way to make it happen without having to create those array controls on the Front Panel at all.

You NEED to have controls/indicators on the FP when you want to connect them in the connector pane!

 

i just moved them to the back and hid them behind a graph.

Stacking controls/indicators (aka "overlapping" them) can influence the FP update speed significantly and is not recommended!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(4,910 Views)

You're making it harder than it has to be. 🙂 The normal solution is to add a front panel array connected to the terminals and either hide it (r-click, advanced, hide terminal) or simply place it outside of the visible frame (the better choice).

What you're asking for would in a text based language be to transfer data between functions and not use parameters (since that's what the terminals represent).

The answer is similar in both, global variables, events, notifier or queues.

Of those i'd recommend queues, so your options are Terminals or Queues. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 9
(4,907 Views)

Ahh, so the question i should have been asking was how to hide controls. Should have looked though the options more, but thank you for that information. I was missing that conceptual knowledge. Thank you again

0 Kudos
Message 9 of 9
(4,898 Views)