08-27-2009 03:46 AM
Hi,
I would like to be able to pass data from my top level VI, to within a running loop of a subVI.
I am able to do this in the other direction. That is to say, I can pass data from within a running loop of my subVI up to my top level VI, as in the attached files.
Would this technique work in the opposite direction (passing data down from top level to subVI)? If so, how?
Many thanks,
Dan
08-27-2009 04:58 AM
Hey,
Passing data by reference via the property value is not the best method.
You can use the Connector Pane with In/Out Terminals, Global Variables, Functional Global Variables, Queues per Reference, User Events, .....
Depending on the data you want to transfer also the method which fits best can be different.
So what do you want to pass from the Main to the Sub VI or vice versa? Just a value of a Control?
Christian
08-27-2009 07:27 AM
DanB1983 wrote:Hi,
I would like to be able to pass data from my top level VI, to within a running loop of a subVI.
I am able to do this in the other direction. That is to say, I can pass data from within a running loop of my subVI up to my top level VI, as in the attached files.
Would this technique work in the opposite direction (passing data down from top level to subVI)? If so, how?
Many thanks,
Dan
Plese review my Action Engine Nugget.
Action Engines will allow sharing data between multiple threads and bring with them built-in protections against race conditions. They are probably the easiest way to share data that does not introduce potential race conditions.
Just trying to help,
Ben