LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary string to numeric array

Hello I need to convert a binary string to numeric array.

Binary string is in 8 bit format 11101110 need to change to array  1

                                                                                                       1

                                                                                                       1

                                                                                                       0

                                                                                                       1

                                                                                                       1

                                                                                                       1

                                                                                                       0

Could any one please help?

0 Kudos
Message 1 of 5
(2,955 Views)

Hello All,

 

I need to convert a binary string to numeric array like

00010111 to 0

                    0

                    0

                    1

                    0 

                    1

                    1

                     1  

 

Could anyone help me? 

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

Hi agar,

 

something like this?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(2,978 Views)
0 Kudos
Message 4 of 5
(2,944 Views)

A few quick comments on your code:

 

whatsthat.png

 

  • Why the FOR loop? calculating the result once is sufficient, no need to do the same thing N times as fast as the computer allows in a loop.
  • There is no need for any value properties.
  • If you base N on a string indicator that is empty at program start, the loop will iterate zero times and the inner code will not execute at all.
  • Do NOT maximize the front panel and diagram to the screen. It is difficult to debug if you can only look at one at any time.
  • If you attach an example, make sure that the controls contain typical default data so we can just run it. if all inputs are blank, we need to guess how the input string looks like (length, formatting, etc.)
  • Your sequence of formatting operations is just plain silly.
  • Formatting a U64 as 8 zero-padded bytes seems weird.
  • Give terminals useful names. "incremented binary string" is confusing because nothing was incremented here.
  • There is no "multi-line" string anywhere, so what's the purpose of the "pick" function?

I really recommend to start over with a few basic tutorials!

0 Kudos
Message 5 of 5
(2,933 Views)