LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference ArrayRefnum Value Output on different scenario's

Hello All,,

 

I encountered this scenario based on one of the Forum POST.

The Reference to the Value-Property Node in the first and Second Loop Should be same but Output Array Reference from first for Loop shows Same reference for each element in an array, so the output is always Last element.

 

Output reference should be Array of unique elements, but it is not. Any reasons?

 

ArrayRef.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 3
(716 Views)

My guess is that the numeric value of the array element reference is the same on every iteration of the first loop.

It's always the same reference, but it may point to different elements at different times.

0 Kudos
Message 2 of 3
(681 Views)

Paul's right, the refnum returned by that function is to "THE" element of the array. There isn't a unique refnum for each element of the array. All properties of the array element apply to all fields, except for Value which is the value of the currently indexed array element. (There could be others but generally speaking the elements do not get their own properties or anything.)

0 Kudos
Message 3 of 3
(664 Views)