06-03-2013 03:34 AM
Solved! Go to Solution.
06-03-2013 03:36 AM
And also I think functional global is performance better than global when dealing with large set of data. Am I right?
06-03-2013 04:21 AM
Global variable has to be non-reentrant, you can probably make a global variable with an array of 'Data-type' that you were planning to have in Global 1 & 2 separately. Now each Clone has its own space (identified by the array index)...!!
But still at sub-VI level it should know, whether its caller is Clone-1 or Clone-2..., now apart from using 'Call Chain' you might want to pass the name of clone to each sub-VI, so that instead of using "Call Chain", the sub-VI already have the Clone ID available with them...!!
06-03-2013 04:28 AM
Well, it's ok if this is a project about hundred VIs. But there are thousands VIs so pass the clone name to all subVIs may not be an option.
Visit global by index, sure. But I mean is there any way to avoid calling "call chain"?
06-03-2013 04:57 AM
For a sub-VI(s) to know, who is its caller, there is only two methods possible:
1. use 'Call Chain'.
2. Pass the name of Caller.
I cant think of any third method...!!
Now even if there are thousands of sub-VIs, do they all need the name/identity of caller..?? If thats the requirement... probably you should re-design the architecture (yeah I know it sounds painful)...!!
06-03-2013 06:10 AM
Assuming you have your dataset/controls as a cluster (which you should), use that cluster as input and output of the VI. In the main VI, use an Array of Clusters. Feed each VI their data, collect result.
/Y
06-03-2013 09:29 AM
Thanks.
I prefer call chain then..