LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String of binary to text

Solved!
Go to solution

It's just a string... the entire system I'm talking about is a receiver for a signal. So it takes the signal's Y values, determines whether they're a binary 1 or 0 and appends a 1 or 0 to a binary string to give the resulting output. From there, I just want to take that string of binary numbers with no spaces and write that as ASCII text.

0 Kudos
Message 11 of 15
(1,129 Views)

What's that "x 30" and the 4.x typecast? I'm not sure where to get them. 

0 Kudos
Message 12 of 15
(1,127 Views)
Solution
Accepted by topic author programlad19

Here is another solution:

Capture.PNG

0 Kudos
Message 13 of 15
(1,121 Views)

I think Darin's solution doesn't properly handle the line feed at the end of the string "0110100001100101011011000110110001101111001000000001010".

0 Kudos
Message 14 of 15
(1,115 Views)

@prettypwnie wrote:

I think Darin's solution doesn't properly handle the line feed at the end of the string "0110100001100101011011000110110001101111001000000001010".


There is a typo, the correct string to have a newline at the end is

01101000011001010110110001101100011011110010000000001010

 

There is a subtlety that adds a null to odd length strings, I would fix it like this:

 

BinaryString2.png

 

The x30 is the ascii value (hex 30, decimal 48) for '0', simply an integer constant.

You get the 4.x on Type Cast by using the right-click menu, it treats boolean arrays the old-fashioned way, ie. as bits.

0 Kudos
Message 15 of 15
(1,098 Views)