LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array/Shift register losing values

Solved!
Go to solution

Hi,

 

I have attached the VI.

 

The vi has a table with values in them. It simply looks for a number when that number matchs it moves over a column and add whatever is in that cell in an array. It continues to do this until it sees "END" at which point it stops.

 

The problem I have is that everything seems fine for the first two "values" after which any additional value it aquires it loses everything and only retains the last known value.

 

 

0 Kudos
Message 1 of 8
(3,495 Views)

Drat, I have only LabVIEW 7.1.  Could you post a picture of the VI so I can look at it?  Sorry about that.

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 8
(3,493 Views)
Your code is not properly building the array.  You're just taking two values and building a single array instead of keeping the array and appending the new values to it.  That being said.  If this VI demonstrates exactly what you are trying to do, there is a much simpler way to do this, I think.
0 Kudos
Message 3 of 8
(3,486 Views)
I am not sure how to convert it for you. Could you list a link or explain 😃
0 Kudos
Message 4 of 8
(3,471 Views)

I thought I was appending the value. By increasing the index value I thought that was the way to increase the address of the element.

 

**update**

 

I only added this table to simulate my problem. Which it does exactly as it does in my main code. In the main program I have other variables which are being loaded which require an instrument. But the current vi does everything well to give you the exact problem I am having.

Message Edited by MrSafe on 09-04-2009 04:07 PM
0 Kudos
Message 5 of 8
(3,469 Views)
I figured it out. But I only see an option for labview 8.0 and 8.2
0 Kudos
Message 6 of 8
(3,467 Views)
Solution
Accepted by topic author MrSafe

Your current code takes the one element from your table and makes an array out of it.  You then insert the last Test Name.  So Everything before the last name is gone at that point.

 

Here is the minimum modified code which keeps the ARRAY in the shift register and simply appends the new test name to the array.

Message 7 of 8
(3,460 Views)
I see. Well dam thats hell of a lot eaiser then what I was doing. Thank Sir! 😃
0 Kudos
Message 8 of 8
(3,456 Views)