LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array problem

Hello,
I have initialised an array of a certain size (different pending on user input) to construct a Z matrix to be sent to a 3D surface graph. The array is filling with my z values in the right order(using replace array subset function), the problem is that upon recieving a new value the previous value automatically goes to zero. I finish with an array the right size but with only one value in it. Has anyone come across this problem before? I have attached the relevant vi,
Thanks
Dave
0 Kudos
Message 1 of 3
(2,106 Views)
Please attach your code. Could it be that you forgot to add shift registers carrying your array?
You must ensure that the new value is replaced in the modified array and not in the original array (This would happen if you use a plain tunnel on the left).

See attached example showing the correct and wrong way.

Message Edited by altenbach on 05-16-2005 10:49 AM

0 Kudos
Message 2 of 3
(2,103 Views)
The vi is not there. However, I suspect that you are using a tunnel instead of a shift register to pass your data into your loop. The tunnel will read the initial value passed into the loop upon each iteration whereas the shift register is designed to pass data from one iteration of the loop to the next.

If this isn't the problem then try attaching the code again.

P.S. It looks like Altenbach got this one while I was typing.

Message Edited by John Rich on 05-16-2005 12:46 PM

0 Kudos
Message 3 of 3
(2,101 Views)