01-31-2012 10:09 AM
HI, i have a question about moving data in a 2D array by row i have not been able to do it so if anyone has an answer please let me know
a picture of what im doing is attached like i said
i want to move the "1 and run" by row not by column, if i change the index to row it will work but the issue is that the "run" stays under the "1" and i dont want that, if i change the index to column labview puts the data just like the picture attached but when i changed the index labview moves the data by column when want it by row
Solved! Go to Solution.
01-31-2012 11:03 AM
Hi, I think changing your code like this will give you the behaviour that you are looking for.
That being said, your original code is a bit confusing. Why do you have a for loop? If you remove the for loop the code will do exactly the same thing.
Regards,
01-31-2012 12:59 PM - edited 01-31-2012 01:00 PM
@Tokyghy wrote:
i want to move the "1 and run" by row not by column, if i change the index to row it will work but the issue is that the "run" stays under the "1" and i dont want that, if i change the index to column labview puts the data just like the picture attached but when i changed the index labview moves the data by column when want it by row
This description is way too complicated and I cannot really tell what you want or don't want. Why don't you attach a picture showing us exactly the result you expect?
I any case, you seem to have a pre-formed empty array, so "insert into array" is probably the wrong tool, because it grows the array with each insert operation. Most likely, you want "replace array subset", replacing empty elements with new elements, keeping the array at a constant size.
Here are a couple of code fragments that might give you some ideas. Most likely you need to make changes to get the desired result (which I cannot guess from your description!) 😉
01-31-2012 04:09 PM - edited 01-31-2012 04:10 PM
jeff, thanks bro, this is what i need
01-31-2012 04:15 PM
@Tokyghy wrote:
jeff, thanks bro, this is what i need
Don't forget to remove the FOR loop. I just pumps hot air. 😄
01-31-2012 05:08 PM
I have another question, how do you keep the values in the array? for example
let's say i already have two values in the first row and i want to add more values in the array but without moving the first row, i dont know if i explain myself, but i need to do something like this
01-31-2012 06:07 PM
Look at my example with the shift register. Keep the shift register in the outermost loop of your code.
01-31-2012 11:44 PM
hey thanks for the info, i'll try it
02-01-2012 01:31 PM
how do you insert data into the second column without modifying the data from a previous row ?
i want to put different numbers in the first column with different status in the second column
like this:
02-01-2012 01:55 PM
You would make it much easier for all of us if you could attach your code (vi) instead of pictures.
We already gave you all the needed information, but the specific implementation depends on how it is integrated in the rest of the code.