07-29-2017 03:25 PM
Hi,
i am making a small test vi to test the way to write data to a buffer. I am writing a string in a while loop with the time and send the data saved from loop to a local variable. But i found the data is saved in reverse order than how I want it to be. I have attached the image and the vi i made. As seen in the image, the time 11:00:34 should be at the end of the data but not at the top. Is there anyway this can be reversed.
Thanks
07-29-2017 03:32 PM
I don't have LabVIEW with me but you can change the order by changing your concatenation order. The output of your shift register should go to the top of the concatenation. Also you should initialize your shift register with an empty string to avoid unexpected results.
mcduff
07-29-2017 03:42 PM
McDuff is correct (I peeked at your code) -- in your Build Array, you put the new data first, the old data second, which means "The Last Shall be First". There may well be a good reason that you'd want to do this (for example, you are making a "stack" instead of a "queue"). One way to "fix" this, of course, is by putting the old data, then the new data, into Build Array. But if you want to leave it and fix it "after the fact", simply run your array through the Reverse 1D Array function.
Bob Schor
07-29-2017 04:15 PM
Thanks McDuff. I tried it and it works perfectly.
07-29-2017 04:15 PM
Thanks Bob.
I will give it a shot.