LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using array from one vi in another vi

Hi,

 

Im new with NI LabView and i have few Qs:

1. I'm writing a vi and I'm creating a numeric array in it. How can I use the array (It's content) in a different vi that's I'm writing?

2. How do I link between vi's? Im writing few vi's and pressing a boolean button at one of them should close the current vi and open another one. How it's being done?

3. How can i create that a picture will appear after pressing a button? pressing a button create entering to a case frame in which I make a string visible, bolded etc. How do I make it also shown picture at the same time?

 

thanks and regards,

Shay

0 Kudos
Message 1 of 6
(3,417 Views)

Ok, so you're at the very beginning so don't be afraid to ask, there are no silly questions.

 

LabVIEW is based on the dataflow paradigm, to pass data from A.vi to B.vi the natural LabVIEW way is to place A.vi and B.vi in a new VI, let's call it C.vi.

So C.vi has two subVIs (A.vi and B.vi).

 

Hmmm... you know what... instead of writing I'm going to shout a video.

It shows how to use the VIs you create as subVIs and how to use the connector pane to pass data from main VI to subVIs and from a subVI to another one. Here is the link : http://www.vimeo.com/17805576

 

If this is too easy for you, please don't feel insulted and if you have questions please ask.

 

Maybe it's not the best idea to display VI's front panel one after the other (it's possible if that what you really want), this easiest is probably to build a main VI that will use many subVIs to perform different actions. and if you need space a good option is to use tabs.

 

Hope this helps

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 6
(3,403 Views)

Have you taken any of the tutorials, or read any of the documentation? It's best to go through the tutorials first so you get a basic understanding of what's going on. To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 3 of 6
(3,400 Views)

Hi Titou

 

Thanks for your help.

I'm not sure thats what I ment. I'm femiliar with the SubVI but I think my issue require a different solution.

To make long story short, I need to create a program with few user screens in it.

The main screen is a VI I created and by pressing a button in it the user should be "moved" into a new screen with other functions in it ect. 

After doing the process at the second screen the user should be moved back to the main screen and by pressing a different button on the main screen the user should be "moved" (again) to a different screen and in that screen it should plot of the data from the second screen.

how do Ido that?

 

Thanks again

Shay

0 Kudos
Message 4 of 6
(3,370 Views)

There are many ways to do that of varying complexity/power.  The easiest way is to simply use a tab control with multiple tabs (pages).  You can make the tabs themselves invisible and then use a property node in your program to select which tab page to display.  Look at the 'Tab Control Properties.vi' example for more info on using the tab control this way.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 5 of 6
(3,359 Views)

If the main screen does not need to do anything while these "popups" are displayed then you can simply create these subVIs such they display their front panel when called. You can simply store the return value(s) from the subVI in the main VI to pass along to the next VI. You can do this using a simple shift register. Open the Example Finder and do a search for "events" and open the "New Event Handler" example. This shows an example of calling one VI to generate the data and then passing it into another subVI.

0 Kudos
Message 6 of 6
(3,344 Views)