LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert Bool array to U64

Solved!
Go to solution

Hey All,

 

Need a Help!.

 

I want to convert a Boolen Array to Unsigned 64bit Number ?

 

I couldn't find any inbuilt functions in conversion palatte.

 

Number to Boolean Array Conversion supports U8,U16,...U64.

 

But Boolean Array to Number supports only U32.

 

Is there any other way to do this conversion.

 

Thanks

Gramy

 

0 Kudos
Message 1 of 4
(4,215 Views)
Solution
Accepted by topic author GRamy

On the Boolean Array to Number node, right click and select properties.  From there you can specify the output data type.



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
Message 2 of 4
(4,208 Views)

Hi,

 

you could always split your boolean array and use two Boolean Array to Number primitives. You'd only have to convert them to U64 and then multiply the MSB part with 2^32. Add the two parts and you're done.

 

Regards

Florian

 

Edit: Didn't know you could do that - thank you crossrulz

0 Kudos
Message 3 of 4
(4,205 Views)

@Florian.Ludwig wrote:

you could always split your boolean array and use two Boolean Array to Number primitives. You'd only have to convert them to U64 and then multiply the MSB part with 2^32. Add the two parts and you're done.


If you are going to go that route, use the Join Numbers to combine the two U32s together.



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 4
(4,194 Views)