01-12-2015 02:33 PM - edited 01-12-2015 02:39 PM
Hi,
LabVIEW 2013 SP1.
I have a big array of I32.
Each 8 consequence elements (256 bits) are a separate group.
The first 224 bits in every 256 bits are interleaved data of I and Q each with the size of 7 bits. (2*7*16=224)
(16 I's and 16 Q's data in the first 224 bits)
and the other 32 bit are a cluster of some other information.
What do you think would be the best way to unbundle the information ?
Of course that I will have to then convert the 7 bit data to some fractional number....
But for now, the question is about the best way to create two 2D boolean arrays.
For every 8 elements of I32 (or 7) there will be two 2D arrays of the size 16 rows and 7 columns
Thanks,
Amitai.
01-12-2015 02:44 PM
Perhaps turn the 1's and 0's into a Boolean array. Then, remove the first 32 bits using Delete From Array. Now you have the separate cluster array. From there, take the remaining array and...using a For Loop and Delete From Array, delete every 7 bits from the array and use build array to stack the array in a 2D format....after changing the boolean back to an I32 of course. And wahlah. Least I think that's what you're wanting. There's probably a better way of doing it.
01-12-2015 02:47 PM
Course....the problem you're going to face is that you can't store anything in 256 in LabVIEW. You'll need to have 4 different 64 bit variables that co-exist with each other and are manipulated as necessary.
01-12-2015 02:56 PM - edited 01-12-2015 02:57 PM
Pictures > words. And...I changed some of what I said. And...I'm not sure I got exactly what it was you were asking.
01-12-2015 04:01 PM
Here is kind of what I had in mind.
I haven't used much the bit manipulation VI's so I want to know if there a better way.
The VI is attached. LabVIEW 2013 SP1.
Correction - the 32 bit datatype is probably DWORD which is U32. (and not I32)
01-12-2015 04:05 PM
I can't open this VI. I am running 2011.
01-12-2015 04:36 PM - edited 01-12-2015 04:39 PM
@aSquared wrote:
For every 8 elements of I32 (or 7) there will be two 2D arrays of the size 16 rows and 7 columns
I believe you actually meant an array of 16 rows and *2* columns. If so, this should do it:
Fun problem, by the way! I couldn't open your VI either before I posted this, I'm still on LV2012, so I have no idea if this is exactly what you did.
01-12-2015 10:02 PM
OK, now that I'm on a computer with a newer (2013) version of LabVIEW, I took a look at your VI. Are the individual bits of the I & Q values interleaved, or are the values themselves interleaved but their bits are contiguous? I assumed the latter, but your VI seems to do the former. It would be a little weird to interleave one bit from I, one bit from Q, the next bit from I, the next bit from Q, etc. Does your VI produce the results you want?
01-13-2015 11:31 AM
I believe the values are interleaved and not the bits because it's a boolean array passing through his for loop. So he's separating every other. His VI very similar to what I was doing. Although, I don't know if that U32 Array is correct way to represent your initial data. It doesn't really matter much as long as you interpret it correctly. But the way you have your delete from arrays would scare me. That's not necessarily a sure bet. This is all contingent on the fact that you have indexed from the correct spot in your U32 Array. You may want to rewind a bit and make sure you are acquiring the data in the correct chunks with the correct LSB and MSB.
01-13-2015 12:07 PM - edited 01-13-2015 12:08 PM
Ok, forget what I said above. I got a look at your code and I re-read your case problem. I think I have a better understanding. The delete portions in the middle seem a little iffy to me as well as the for loop. Also, might as well delete the cluster data at the beginning since you know where it's at. So here's what I'd suggest. Very similar to what you've got going on.