02-10-2009 08:19 AM
02-11-2009 07:28 AM
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
02-11-2009 07:44 AM
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