From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data exchange between VIs with large number of controls

 

There are many post already on the issue of data exchange between subvi's and main vi but none that I found address my concern when large number (more than 20) of control are in a subvi. The closest I have found is this post: 

https://decibel.ni.com/content/docs/DOC-17355. What are recommended ways of data exchange when large number of controls are involved? For my application I need to use many controls.

0 Kudos
Message 1 of 11
(3,023 Views)
You can simply bundle the controls if your only concern is passing data via the connector pane.
0 Kudos
Message 2 of 11
(3,018 Views)

Hi aderogba

                                      Like other friend mentioned, either make bundle or array of similar iterms & pass it, while retrieving use appropriate index to read  the values

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 11
(2,978 Views)

My favorite option is using Functional Global (LV2G) or an Action Engine. Build all the controls into a single cluster and use that in your main vi as well as sub vi.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 11
(2,972 Views)

P@Anand wrote:

My favorite option is using Functional Global (LV2G) or an Action Engine. Build all the controls into a single cluster and use that in your main vi as well as sub vi.


Whiel FG or action engines are useful they can be overused. Th eproblem with throwing everything into a single functional global is that all parts of the system will have access to all of the data. While this sounds good it can lead to problems since there is no control or protection of access from specific parts of the system.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 11
(2,956 Views)

 

I like the  idea of cluster but instead of using cluster is there a method of contructing action engine/functional global with more than one control?

0 Kudos
Message 6 of 11
(2,897 Views)

@aderogba wrote:

 

I like the  idea of cluster but instead of using cluster is there a method of contructing action engine/functional global with more than one control?


 

AEs are data oriented, not control oriented. Please clarify what you have in mind.

0 Kudos
Message 7 of 11
(2,884 Views)

I am still not completely clear on exactly what you are trying to do.

 

If you want references to all (or many) of the front panel controls, pass a reference to the front panel of the top level VI to the subVI. In the subVI you can get an array of references to all the controls on the front panel of the main VI.  Provided that each control has a unique name, you can determine which reference points to which control by using the Label: Text property.

 

This can be a powerful technique although property nodes can be slow and may force execution in the UI thread.  Often there are better ways to move data around. Can you tell us more about the amount and type of data to be moved?

 

Lynn

0 Kudos
Message 8 of 11
(2,875 Views)

 

What  I am looking for is to have a functional global or some other constructs that can manage more than one control. Right now I have some subvi's that needs to share data/control values. What I am doing to meet my need is to save the control values in one subvi to file and read the values in other subvi and vise-versa. I am thinking there should be a better way to manage this type of situation.

 

 

 

 

0 Kudos
Message 9 of 11
(2,836 Views)

Its little confusing, you have given to save the control value and the data to be saved to a file. Upto my understanding both are different, data you will get when you run the code but the control value is different which can be loaded/saved at the beggining (Init)/End. Using Functional global is a good method but while doing that you don't need to save it to a file and read it. For the data you need not have a control a terminal/node will provide, so what you need to do here?.. Please clarify

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 11
(2,822 Views)