06-18-2012 02:50 PM
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
06-18-2012 03:04 PM
@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.
06-18-2012 03:35 PM
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.
06-19-2012 07:21 AM
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.
06-19-2012 07:32 AM
Store your old values into a shift register (using an FGV) and compare to the new. When a change occurs, update the FGV.
06-19-2012 07:42 AM
@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.
06-19-2012 08:02 AM
Yes, the OP evidently knows about this. I was just giving another option.