LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically align 80 numeric-indicators?

Hello,

i have a panel with 80 integer-indicators.

Then i have as input-parameter a string-array[1..80] where each indice has a comma-separated list of numeric-values 1..80

 

The content of each indice is the position of an indicator on the panel.

So it is possible that each inidice has only one value or one indice has all values.

One value can only appear once.

Not all values must be used. If unused it it not shown,

 

Now i want to dynamically align the inidicators as they appear in the array

For example

[1] = 1,2,3,4,5,6,7,8,9,10

[2] = 15,12,13,14,11

[3] = 53,20,34

[4] = 61,62,63,64,75,76,77,78,79,80

[5]..[80]

 

Depending on the content it should now align the content of [1] in line1, and content of [2] in line two and so on.

The unused values are hidden or outside of visible window.

 

How can this dynamically be done?

 

Thx for help

 

0 Kudos
Message 1 of 10
(3,004 Views)

alligning should be done of indicators (placement in UI) or the text (inside the indicators)?

 

it will be helpfull if you provide a screenshot or .vi that shows both present and expected way of allignment (placing it manually)

 

thanks

phani

phani srikanth
0 Kudos
Message 2 of 10
(2,999 Views)

I want to align the placement on the UI.

Attached a screenshot that shows 80 indicators and the string-array.

 

Download All
0 Kudos
Message 3 of 10
(2,986 Views)

You will need to use property nodes for each of your indicators to set the Position Property.

 

I would create an array of references so that you have a means of programmatically looping through each indicator reference in the array to set the position of that particular indicator.

 

I would also use arrays to come up with a list of X positions to define where each column begins, and a list of Y positions to define where each row begins.

 

Then cycle through your numbers, determine which row and column they woud be in, and write the respective values out of the Xposition and Ypostion arrays to the indicator's position property.

 

Alternatively, I would just use a table control and write the values into the respective row and column of the array that makes up the table.

Message 4 of 10
(2,965 Views)

I would seriously consider Raven's Fan' second approach. (Use a table)

 

When I hear things like "I have 80 indicators...." I question how scaleable the solution might be.  On ther other hand it is certainly possible to move indicators possitions as explained.  but, you might not really want to.Smiley Wink  


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(2,955 Views)

Can you give me a hint what a "table control" is? If its easier than the array-solution...

0 Kudos
Message 6 of 10
(2,887 Views)

Look at your Front Panel Palettes under List, Table, & Tree.

0 Kudos
Message 7 of 10
(2,860 Views)

Ah, ok. I also thought about a 2D-array instead of indicators but the problem in the arry or table is that i dont have the labels as on indicators.

I need to see the value-number of the indicator. In the array or table i only have the value.

 

0 Kudos
Message 8 of 10
(2,846 Views)

I don't understand how useful it is to have 80 numerics that are all labelled Numeric #.  But it is your app.

 

If you need to have separate indicators with labels, then go with the first method I described to how to programmatically set the position of the indicators.

0 Kudos
Message 9 of 10
(2,828 Views)

This is only an example with label-name "Numeric 1..80". Later there will be different names.

0 Kudos
Message 10 of 10
(2,794 Views)