LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing individual array element properties

Solved!
Go to solution

In the attached VI, I have a 1D array of slider controls ("Phase Coefficients") where each array element represents the coefficient in a polynomial of arbitrary order. The problem I'm having is that the slider range I set for the lowest order coefficient (array element 0) quickly becomes impractical for higher order coefficients (elements >5). Small changes in the higher order coefficients dramtically change the overall polynomial.  I want each element/slider to have its own range, but I know this isn't strictly possible as each element in an array shares the same properties. I've implemented a work around (Use boolean to activate) in which the range of all sliders is adjusted depending on which element is being viewed, but my implementation prevents editing of the range while running the VI. Is there any way to adapt my method (or use another method all together) to allow for different, editable ranges for each element slider?

 

Thanks!

 

0 Kudos
Message 1 of 4
(2,585 Views)
Solution
Accepted by topic author acklee

Every element of an array must have the same properties.  They can only differ in value.

 

You can have an array of clusters, and each cluster can have the slider control.  There you will be able to bundle up a slider with different properties into the cluster before building the clusters into an array.

Message 2 of 4
(2,581 Views)

Hi RavensFan, 

Thanks for the suggestion! I tried your idea, but I still seem to be having the same problem with each slider sharing properties despite now being in a cluster inside the array. I may be misunderstanding you. Would you mind showing me an example please?

 

*Edit: Nevermind, got it to work. Thanks again!

0 Kudos
Message 3 of 4
(2,570 Views)

Also remember that you can have a logarithmic scale mapping for sliders. This gives you a wide dynamic range and you still have precise control over the small values.

0 Kudos
Message 4 of 4
(2,548 Views)