08-23-2011 09:50 PM
Hello Reader.
The demodulation's output is a bit sequence and I'd like to save it to file. When I connect the demodulation's output to the data port of "write to binary file" block, a bit is converted to a byte automatically and write to file (so file's size too large.)
Could you help me to write the bit sequence to binary file, please?
Thanks so much.
TanPhong.
Solved! Go to Solution.
08-23-2011 09:59 PM
What is the datatype of your "bit sequence"? A boolean array maybe?
If this is the case, typecast it to a string using the 4.x mode of typecast before writing the string to a file. Reverse the operations for reading. (you might also need to account for padding)
08-23-2011 10:34 PM
Thanks for your attention.
I've followed your advice but the data in file is similar with the old data (one bit to one byte)
08-24-2011 12:11 AM
Did you right-click the typecast primitive and select 4.x mode (it will show big red lettering)?
There should be one bit per boolean element. If it does not, show us your code.
08-24-2011 01:23 AM
I used Modulation example and add some functions to save outbit data after demodulation to file.
08-24-2011 01:41 AM - edited 08-24-2011 01:42 AM
OK, your data is a I8 array, where 4.x mode has no special meaning. What kind of data is in the I8 array? Is it just numbers 0 and 1? In this case, insert a "not equal 0" to convert it into a boolean array before type casting.
(Sorry, I don't have any of your toolkits)
08-24-2011 02:11 AM
Thank you very much.