LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run in the same time with watching the result?

I have a question
how can I get 2 or more VI's in the same program run simultaneously, each has several SubVI, and if I press a button then I get the result of a VI and without stopping at the same time on another button and I get the result from other VI?
0 Kudos
Message 1 of 3
(2,293 Views)

Natsheh,

thank you for your interest in learning LabVIEW. There are two possible ways of approaching your task:

a) using global or shared variables which store the data and can be accessed from the subVIs as well as from the main VI, or

b) using VI Server methods to query the actual values of indicators from the subVIs in your main application window.


Using global variables is the easiest implementation, and a good starting point. When your LabVIEW skills advance, you will want to also look at VI Server technologies, as they provide a more flexible way to access subVI data.

To get you started, let me please recommend the following introduction to LabVIEW:

Getting Started with NI LabVIEW Student Training
http://zone.ni.com/devzone/cda/tut/p/id/7466

Module 6 of this online training deals with global variables, and should give you a first overview.

If you are already familiar with LabVIEW Projects, you may as well use Shared Variables. They are introduced here:

Using the LabVIEW Shared Variable
http://zone.ni.com/devzone/cda/tut/p/id/4679


Also, I would like to point you to our "real-world" training courses which are held thoughout the world. The LabVIEW courses Basics I & II together not only cover these aspects (SubVIs, Variables, VI Server calls, ...), but also give you a good start in "thinking LabVIEW" 🙂

Best regards,
SFK

0 Kudos
Message 2 of 3
(2,259 Views)

Action Engines are a common and very powerful code construct used in LV programs to address many challenges among which is the "how to share data between execution threads?". So I suggest you review this Nugget on Action Engines for an introduction.

 

Ben 

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