LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linking to an item in an array

Is there any way in LabVIEW to link a variable to an item in an array?  In other words, if I have two arrays, and I change item 1 in the first array, I want it to change item 7 in the second array automatically.  If I change item 2 in the first array, I want it to change item 10 in the second array.  I am doing this for an array of 300 items so I do not want to write a VI to do it, I would rather have them reference the same location in memory.
 
Thanks,
John
0 Kudos
Message 1 of 4
(2,259 Views)

Hi,

I'm quite sure you can't do what you want.

Is the array being changed by the user? If so, and event structure with the array change event in would do the job.

If it's being changed programmaticaly, then in the code when you change one of them, you should change the other too.

Hope this helps,

Paulo

0 Kudos
Message 2 of 4
(2,249 Views)

The simple answer is no. How would you define the map between the two arrays? Why not write a vi to do this?  You have two arrays of the same size, one the data one the map coordinates and in the vi use the coordinates to index the replace or insert into an array of the same size.

 

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,246 Views)
Thanks, I will try the mapping method.
 
John
0 Kudos
Message 4 of 4
(2,231 Views)