LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to Binary

Hello, im new in labview and i have a problem.

 

I have an Input String and i need a binary exit.

For example: if i write at the input HELLO WORD the result is: 01001000010001010100110001001100010011110010000001010111010011110101001001000100

 

And viceversa, if i have in the input 01001000010001010100110001001100010011110010000001010111010011110101001001000100 the result must be: HELLO WORD

 

 

Please let me know if any more info is needed, thank you for the help!

0 Kudos
Message 1 of 5
(3,037 Views)

Have you tried searching the forums?

 

This question has been asked hundreds of times before.  A search with browsing through the first page or two of results should give you a clue as to how to do it.

0 Kudos
Message 2 of 5
(3,028 Views)

It looks like a basic homework assignment. 🙂

 

Try to take a look on the function palette and check how the "type cast" and "number to binary array" functions work.

Best regards,

CsabaF
0 Kudos
Message 3 of 5
(2,987 Views)

CsabaF wrote:

Try to take a look on the function palette and check how the "type cast" and "number to binary array" functions work.


The String To Byte Array and then a FOR loop with Format String would be a lot easier.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,959 Views)

crossrulz wrote:

 


The String To Byte Array and then a FOR loop with Format String would be a lot easier.



 Ahh, great idea! I have just tried it during my coffee break and that method simplifies the conversion quite much  - I should spend a bit more time playing around with the string formatting vis, those are very efficient in some cases.

Best regards,

CsabaF
0 Kudos
Message 5 of 5
(2,950 Views)