LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hamming code, array of bytes to array of bits

Hi. I've just started programming, and I just have a little problem. I'm going to collect pedometer/accelerometer data from an FTP server and present it in LabVIEW. I've collected the binary file from the server, but the data is coded with Hamming, the data is 2 bytes, with 10 data bits and 5 hamming bits , I need to split the byte up to bits so the hamming decoder in LV can read it as '1' and '0'.  I'm then going to present the x, y, and z axis data, this data are laying so that the sime time sets are following eacother, first the 2 byte for x-axis data, then 2bytes for y-axis data etc..(this I havn't looked at yet, but I don't see any problems with that.


Download All
0 Kudos
Message 1 of 3
(2,906 Views)

Hi budd!

 

I’m not exactly sure what you’re asking here, but it seems like the problem is to convert data bits into a bit stream of ones and zeros, which is the data type the Hamming decoder requires. This means that every bit you read from file has to be saved in its own data byte. In other words, you need 8 bytes to represent each byte. The attached VIs demonstrates this conversion both ways. The bitStream2byte VI turns an array of ones and zeros (with the data type i8) into bits, eight by eight, and writes it to file. The byte2bitStream VI does the opposite. It reads data from file and turns them into a bit stream. To run this program, write ones and zeros into the input data fields in the dataFiddeling.VI (make sure the number of data bits are a multiple of 8), choose a filename, and control that the output data is the same as the input data. You might have to reverse the order of each byte in your program. I know it is arduous, but I think it will do the trick. I hope this helps.

 

Best regards

Øyvind Ø

Download All
0 Kudos
Message 2 of 3
(2,862 Views)
thanks for the reply.. I decided to make my own hamming vi


0 Kudos
Message 3 of 3
(2,825 Views)