I know we can't use pointers in LabVIEW, but I was wondering if there's any way we can do wrap-around [or "rollover," or "rotation"] of Array [or Waveform] values without having to make copies of the Array [or Waveform]?
For instance, suppose I'm reading one second's worth of data into a five second buffer. After the first five seconds, I've got
1st (1/5)th: 1st second's worth of data
2nd (1/5)th: 2nd second's worth of data
3rd (1/5)th: 3rd second's worth of data
4th (1/5)th: 4th second's worth of data
5th (1/5)th: 5th second's worth of data
Now I read the sixth second's worth of data, and overwrite the [original] first second, so that I have
1st (1/5)th: 6th second's worth of data
2nd (1/5)th: 2nd second's worth of data
3rd (1/5)th: 3rd second's worth of data
4th (1/5)th: 4th second's worth of data
5th (1/5)th: 5th second's worth of data
and in C, or C++, I'd just move the pointer up to the second (1/5)th of data, and start from there.
The LabVIEW Complex FFT is another place where this would be really useful. The Help File for the Complex FFT is in
Help | VI and Function Reference | Analyze VIs | Signal Processing VIs | Frequency Domain VIs | Complex FFT.
If you read the Help File, you see that LabVIEW returns an FFT with values in the range
[0, 2n - 1)
rather than the standard
[-n, n - 1)
i.e. LabVIEW takes the negative frequencies and tacks them on at the end, after the positive frequencies.
I'd like to be able to view my FFTs with the negative frequencies where they're supposed to be [i.e to the left of zero], and this would be SO easy if I could just move the underlying data pointer of the Waveform forward to the halfway point.
But, of course, in LabVIEW, I don't have pointers, so I was wondering: Are there any built-in VIs for Array [or Waveform] manipulation that will perform this sort of wrap-around [or "rollover," or "rotation"] of the data? If so, I couldn't find them. Ideally, such a VI would have two inputs: {old Array, new starting point}, and one output: {new Array}. Similarly with Waveforms, only you'd need to manipulate t0 as well.
Or do I have to copy the entire data set to a new Array [or Waveform] each time I reach the end of the buffer?
Thanks!