Question

I am fairly new to LabVIEW so please bear with me. I am working on a piece of code where I am reading data (in the form of an array) from a USB device, splitting this array to meet a required size, storing part of this array in a circular buffer and passing the rest of the data in a shift register. The problem I am encountering is that the shift register will save the data from all other iterations, however I simply want the data from the most recent iteration, but I am not sure how to do this in labVIEW. Perhaps the shift register is not my answer here, but I was wondering if anyone might have some suggestions.

Please let me know if this is clear enough.

I should probably mention that I am using LabVIEW 2011.

enter image description here

In the picture above, I am reading data coming from my hardware. This data is read as an array and I split the array to meet a specific size. I then store part of this array in a 2D array, which serves as a circular buffer and the other part of the array is set to a shift register, where with the next iteration this data will combine with the next set of data read back from my hardware.

The problem I am seeing right now, is that the size of my shift register is constantly growing.

Was it helpful?

Solution

I took, Adrian Keister advice and found my problem. CharlesB was correct the shift register does only show the data from the previous iteration. The reason why the contents of my shift register was consistently growing was because I did not account for the next set of data that would be read during each iteration. Well back to the drawing board

OTHER TIPS

I don't know if I understand your problem correctly, but you should probably try using conditional appending of the array. In LabVIEW 2012 this operation is even simplier because of conditional indexing in for loops. I provided an example here and hope that it helps. Similar condition can be created for your index modulo operation.

http://i.stack.imgur.com/AALLo.jpg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top