Showing results for 
Search instead for 
Did you mean: 

How to convert Binary String to Binary Array

Go to solution

How can i convert my binary input to binary array

just like the picture?




0 Kudos
Message 1 of 3
Accepted by Rigormortiiz20

Hi John,


@Rigormortiiz20 wrote:

How can i convert my binary input to binary array

just like the picture?

Start with converting a scalar input value into a 1D boolean array. Converting an array of input elements is the second and very easy step...


Please define the term "binary" in your text: your image does not explain the input datatype nor the array datatype!

And please keep in mind: we cannot edit/debug/run images using LabVIEW! Attach real code aka VIs...

Best regards,

using LV2016/2019/2020 on Win8.1/10+cRIO
Message 2 of 3
Accepted by Rigormortiiz20

Showing a picture without any explanations as to the data type (or, better, without attaching the code so we could see the type of Input and Output) makes it very difficult to suggest an answer.


Input:  The Subject seems to suggest this is a binary String, which makes the input an Array of Strings.  If this is correct, then (as you should have learned) a reasonable First Step is to take the "Wire" representing the Input data into a For Loop (with its default Indexing Tunnel) to give you a single String to process inside the loop.


String:  The expression "Binary String" seems to suggest that each character in the String will be (considered as a character) "0" or "1".  Your Problem Statement suggests you need to process each Character in the String and produced an Array of "Binary" data.  Look at the String Palette and see if there is anything that suggests converting a String to an Array (of anything).


Binary Data:  Without seeing your code, I have no idea how you are representing the "Binary Data" you show on the 2D Array "Output".  I see a 0 or a 1 -- is that a String or Integer (signed or unsigned?  8, 16, or 64 bit?), or something else?


Anyway, answering those questions (for yourself) might suggest how you can solve your own problem.


Bob Schor

Message 3 of 3