LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding User Input from Array

I have an array (3x3) that is made up of clusters. Each cluster has numeric, string controls and indicators.

 

What I want to do is determine:

 

1. When the Operator makes a change to any of the array elements (easy enough using an event structure)

2. Determine what element int the cluster has changed.

 

So if I have the 3x3 array, made up of clusters (a control string, a ring, and a numeric):

 

When the operator changes the ring value, I need to which one changed?

 

Was it element 0,0 or element 1,3

 

 

Thanks

0 Kudos
Message 1 of 7
(2,728 Views)

@CarmineS wrote:

When the operator changes the ring value, I need to which one changed?


I would compare the previous array value to the changed value (equal with compare elements), reshape the resulting boolean array into a 1D array and use the Search 1D Array primitive.  From there, convert your index into the 2D index via the Quotient & Remainder.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,726 Views)

It's not just the ring value.

 

Let me rephrase the question.

 

 

There is an array of 9 clusters being displayed on the GUI. Some operator makes a change to an element in a particular cluster of the array.

 

So: Out of the 9 clusters, I need to know which of the 9 ckusters got changed AND which element "in the cluster" changed.

0 Kudos
Message 3 of 7
(2,716 Views)

I told you how to find out which cluster changed.  You can then index out the cluster (old and new) and perform the same trick.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,698 Views)

Store your old values into a shift register (using an FGV) and compare to the new.  When a change occurs, update the FGV.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 7
(2,693 Views)

@MoReese wrote:

Store your old values into a shift register (using an FGV) and compare to the new.  When a change occurs, update the FGV.


Or the event structure gives you the old value when using the value change event.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(2,684 Views)

Yes, the OP evidently knows about this.  I was just giving another option.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 7 of 7
(2,678 Views)