LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically present user with different input parameters based upon choice of input group?

Solved!
Go to solution

I have an array of elements that represent inputs to an operation.  The user is allowed to choose a random order for the inputs to be assembled in the array.  Each element, however, requires different associated input parameters that are used by the operation to define each choice.  I realize that, for an array of clusters, the individual cluster array element must each have the same format, i.e., they must each have the same type and number of cluster inputs or outputs.

 

Ideally, I would like to have an array of clusters, where each cluster has a different set of inputs.  Does anyone have any ideas of a programming solution that would approach or simulate such a structure?

 

Thanks,

Mike H.

0 Kudos
Message 1 of 6
(3,011 Views)

Hi

 

it is not possible to have an array of clusters where each cluster element has different elements. i would suggest you have a big cluster which has individual clusters inside it, for each input selected in the array. align these clusters neatly and make the bigger cluster a Type Def.

 

let the array be of only inputs and not the parameters for each input..

 

so, when the user selects one element in the array, for say input 5, enable the cluster which corresponds to input 5. let the user enter the paramters and say OK. then, you save these values to memory. say a data wire passing through the event structure.

 

then if the next element is input 3, enable cluster for input 3... and so on.... you will need to pass the bigger cluster through your code..

 

i shall try to make a code for this so that it would be esy for you to understand.

 

another option is.. to use Tabs.. each tab has a parameter cluster for each input.. when the array element is selected, show the tab page required..

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 2 of 6
(2,985 Views)
Solution
Accepted by mkh

hi

 

i tried soemthing out and attached the VI (LV 2010)

 

develop something similar to what is in the attached VI and then bundle the clusters for which user enters the parameters.. i prefer the tab page more than the 'all parameters' cluster.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 3 of 6
(2,976 Views)

You could also have an array of variants. That would allow you to put different kinds of data in each element.

 

Or, you could do it with classes where each subclass is a specific kind of message.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 6
(2,973 Views)

Thank you so much for the suggestion and example.  I'll work with this and see how it fits in with my requirements.  It definitely looks like it's in the right direction for what I need.

 

Mike H.

0 Kudos
Message 5 of 6
(2,952 Views)

Mike,

 

Thank you for your suggestions, too.  These look like the types of solutions we should work towards, after we get the "version 1.0" up and running.  I will experiment with these, too.

 

Mike H.

0 Kudos
Message 6 of 6
(2,950 Views)