LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi in vi

I have searched in other posts but i wasnt able to put a vi in a vi that has control or indicator

 

I need to put a vi that has indicator (like array) in another vi

 

Any help??

0 Kudos
Message 1 of 13
(4,137 Views)

Hi unknown,

 

several options:

-move subVI into mainVI using drag&drop

-right-click BD of mainVI, "Select a VI...", select the subVI

 

Or:

-RTFM

-check the free online courses on NI's website

-rephrase your question to be more clear...

Message Edited by GerdW on 12-09-2009 11:43 AM
Best regards,
GerdW


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

As far as I understand your question you want to create a Sub VI and pass data to it and read data back.

 

The easiest way would be to make a selection of the code you want to have in the Sub VI, go to Edit>Create Sub VI and LabVIEW does everything for you.

 

If you allready have this SubVI, you will need to add the Frontpanel Elements for passing the data to the Connector Pane. This can be done by right-clicking the icon and select "show Connector pane" then click on the connector and then the frontpanel element you want to connect.

Back in your main VI you can connect the data you want to pass to the VI or get from the VI with this connectors.

 

 

Christian

Message 3 of 13
(4,130 Views)

Unknown19? do you want to show the Front Panel of one VI in the Front panel of another?

Or use one VI as a SubVI to the other.

Sorry, question is not clear to me.

0 Kudos
Message 4 of 13
(4,122 Views)

thank you christian u are right i did it for numeric and boolean elements but for array it didnt update the second vi

should i add an array to the front panel and put a subvi for it or is there another way

0 Kudos
Message 5 of 13
(4,111 Views)

It's the same for every datatype you want to pass to the SubVI, so create a frontpanel element and create a connector.

In other words like you did it with your numeric control, do it with an array control.

 

Untitled.jpg

Message 6 of 13
(4,103 Views)

how did u get the dbl elements (array in and array out)

0 Kudos
Message 7 of 13
(4,099 Views)

Christian made some nice marks in the left part of the screenshot, showing this. The inputs and outputs have to be defined in the connector pane.

 

Norbert

 

[Edit] If you do not know how to create the array on the frontpanel at all, you miss the very basics of LabVIEW. I suggest you to look into some webcasts like the ones here. 

Message Edited by Norbert B on 12-09-2009 05:38 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 13
(4,086 Views)

Keeping it very simple now, you can get an array control/indicator, by placing an Array from the Array palette at the frontpanel and then choosing another control, e.g. a DBL Numeric control from the palette and drop it into the Array on the frontpanel.

 

 

0 Kudos
Message 9 of 13
(4,079 Views)
I dont have an element named dbl
0 Kudos
Message 10 of 13
(4,073 Views)