LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shift register problem with replace array subset

Solved!
Go to solution

Hello everyone, 

 

I am trying to trying to make an intensity graph that shows the voltage on each electrode in a 64-electrode array (giving an 8x8 grid) and I am running into some problems (probably because I am pretty much a labview newbie). 

To make this graph, I will have a 1D array with 64 elements, that I need to put in the correct place on the graph, so that the graph reflect the actual layout of the array.
So, I am trying to write each of the elements of the 1D array to a specific location in a 2D array. I am using the replace array subset function and a shift register for that, in a loop that needs an iteration for each element/electrode. However, for some reason, the loop only executes once. 

I am using a much smaller dummy array (9 elements 1D to a 3x3 array) to get this thing working in the attached vi, but I guess the principle should be the same. 

I am sure I am missing something rather stupid, but I can't figure out what Smiley Frustrated

Susan

 

ETA: with the way I define x- and y-axes now, I guess a simple reshape array could work. But, sadly, the real input data are too messy for that. 

Download All
0 Kudos
Message 1 of 4
(2,823 Views)
Solution
Accepted by topic author SusanL

You have an 8 element 1-D array.  Then you build that into a 2-D array which has 8 columns 1 row.  Then you autoindex that at the For Loop which autoindexes by rows.  Since you only have 1 row, it will only iterate 1 time.

 

Your Index Array inside with the i wired up to the index is the equivalent of autoindexing.  Eliminate those Index Arrays, eliminate the Build array going from 1-D to 2-D.  Let the loop autoindex on the 1-D array.

 

Message 2 of 4
(2,815 Views)

Thanks so much! Smiley Very Happy It actually makes sense now 

For future things I will refrain from such indexing overkill. 
 

0 Kudos
Message 3 of 4
(2,800 Views)

Hi!

 

Small question ... how to save in the array with shift registers summation of different values ...

 

Thanks!

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