From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert U32 array to binary array

I am using Labview 7.1 . Now I have an array storing a lot of U32 numbers. I wanna convert the U32 number into 32 bits binary numbers and send each bit to a new array. And then I can write the new array to a text file.
 
For example I have an array with 2 elements,1 and 1. I need convert each 1 into 100000000000000000000000000000000 and save this binary in a new array . The new array will be 64 elements long.
 
Thanks.
0 Kudos
Message 1 of 7
(4,094 Views)
Here is an example of one way to do this.

Lynn
0 Kudos
Message 2 of 7
(4,083 Views)

Hi Johnsold:

I think you just misunderstand what i want.

I need the 100000000000000000000000000000000,each of the binary number is an element of the new array. not all these binay in one element.

 

can you do that ?

 

0 Kudos
Message 3 of 7
(4,067 Views)

Hi Lightmidd,

      do you mean like this?

Message Edited by Dynamik on 12-06-2005 01:38 AM

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 4 of 7
(4,061 Views)

I think the attached will do what you need (LabVIEW 7.0).

Message Edited by altenbach on 12-06-2005 12:00 AM

Download All
0 Kudos
Message 5 of 7
(4,053 Views)
Hello lightmidd...,

why not use the "Convert number to boolean array" from conversion palette? If you need numbers instead of booleans use the "boolean to 0/1" afterwards.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(4,051 Views)
doh!Smiley Very Happy
When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 7 of 7
(4,045 Views)