LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use another control to change the index of a array

Solved!
Go to solution

@GRCK5000 wrote:

. See attached code. Is it similar to what you are talking about?


Please do not attach garbage code such as this with a greedy toplevel loop that brings even the fastest computer to its knees, containing completely pointless array operations changing the value of the array. The OP wanted to change the index, not the array values! Hiding the array index and replacing it with a control that has nothing to do with the array index is just plain misleading.

0 Kudos
Message 11 of 19
(648 Views)

Thank you Aputman this was exactly what I was looking for !!! 

0 Kudos
Message 12 of 19
(631 Views)

:

 

The way I want to use it is to make a big cluster on the Front panel. A cluster however can only read OR write (control). So I end up with two clusters one for the read and one for the write. The write cluster is on top of the read cluster and I make it transparent. This works fine, the only point where it does not work is when there is an array with an index. As this is in the read "layer" which is blocked by the write layer.

 

If there are better ways I really would like to know, for now I will try to get the node example working provided in this topic.

 

thanx guys for the help !!!

 

 

0 Kudos
Message 13 of 19
(629 Views)

@~Its_Me~ wrote:

:

 

The way I want to use it is to make a big cluster on the Front panel. A cluster however can only read OR write (control). So I end up with two clusters one for the read and one for the write. The write cluster is on top of the read cluster and I make it transparent. This works fine, the only point where it does not work is when there is an array with an index. As this is in the read "layer" which is blocked by the write layer.

 

If there are better ways I really would like to know, for now I will try to get the node example working provided in this topic.


I would stay away from overlapping controls, because they significantly tax the UI thread.

 

All you need is exactly ONE cluster! Elements that should not be changed can be disabled (right-click...advanced...enabled state...) so they act as indicators, you can even make the grey background and hide the increment so they look more like indicators if you like. You can even hide the index and show the scrollbar. No code needed!

 

I recently posted a simple example here

 

altenbach_0-1688141922384.png

 

Note that the LED and "count" are disabled and act as indicators. Only the "input" can be operated at runtime. (At edit time you can change all, but that's irrelevant).

 

0 Kudos
Message 14 of 19
(613 Views)

(It typically helps to say what you want to do, not how you want to do it.)

 

As an example, here is one of my UI to do geometry optimization in 3D. There are at least two 1D arrays of big clusters Labeled as A and B below). Some cluster elements can be changed (e.g. the starting coordinates) and some cannot (e.g. the best fit coordinates).

 

Both arrays can be of any size and can be scrolled to show any part. Only the white elements can be changed by the user, the rest is updated by the program based on the other inputs.

 

altenbach_1-1688227200389.png

 

 

Message 15 of 19
(608 Views)

Hello 

 

Thank you for the advice ! I will look into it when I have fixed some issues in the block diagram, it looks promising! 

0 Kudos
Message 16 of 19
(588 Views)

@Mr. Altenbach Can you attach the code ? I would like to look at the block diagram. I’m pretty sure there are interesting stuff to learn there.

0 Kudos
Message 17 of 19
(578 Views)

@GRCK5000 wrote:

@Mr. Altenbach Can you attach the code ? I would like to look at the block diagram. I’m pretty sure there are interesting stuff to learn there.


Definitely not! This is a huge project with tons of subVI and does not belong into a community forum. Eventually (maybe in a few years!) I will make some of my code public on Github.

0 Kudos
Message 18 of 19
(566 Views)

It makes sense. It would be nice to make them publick Github.

0 Kudos
Message 19 of 19
(527 Views)