LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary to array???

I would like to ask:
how to convert a binary number, such as 01001 into an array of
[0][1][0][0][1]
(1D array with 5 elements)
can i do that, and how to do that?

what i am doing now is:
after i get an output(i change it in binary) from the parallel
port(InPort.vi) ,
and i would like to use this output, as the input of a boolean
indicator.
for example i get bit 0 to bit 4 output from InPort.vi (take example
as above:01001)

if i am just focusing on bit 2, that is 0 in my example,
if bit 2 : 0 ===> i want the boolean indicator to show me false
and if bit 2 : 1 ===> i want true.

therefore, i am thinking making the binary output into an array, and i
can just use Array Subset to extract the bit 2..but i dont know how to
convert the format

I am not s
ure whether i am in the correct direction to deal with that.
Please kindly offer me an answer or any other suggestion...
please help me~~~~thanks a lot!!!
0 Kudos
Message 1 of 2
(2,565 Views)
Hi

You can use the "number to boolean array" function which you find in the "boolean" subpalette.

Luca P.
Application Engineer
National Instruments
Regards,
Luca
Message 2 of 2
(2,565 Views)