LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to binary array

Solved!
Go to solution

Hello

 

I am trying to convert a string of characters into binary. The first part works (binary byte array), but I am having some trouble separating the byte array into single bit that I can change the value (only 0 or 1). Does anybody have an idea how to do this? It will be awesome if someone has an idea.

 

Each character is represented by its corresponding binary (second part).

 

Thank you so much!

 

Smiley Wink

0 Kudos
Message 1 of 12
(5,414 Views)

 

Hi,

could you post the vi, I don't see what you want to do...

regards,

V-F
0 Kudos
Message 2 of 12
(5,386 Views)
Solution
Accepted by topic author winniewanda

Hi winnie,

 

try this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 12
(5,382 Views)

Untitled.png

 

Christian

 

 

[EDIT] Ups, I should refresh my browser from time to time. Gerd was faster!

0 Kudos
Message 4 of 12
(5,375 Views)

Thank you so much. You guys are awesome

 

Smiley Wink

0 Kudos
Message 5 of 12
(5,339 Views)

Can you please attach this VI here?

0 Kudos
Message 6 of 12
(1,858 Views)

Hi Namra,

 


@NamraS wrote:

Can you please attach this VI here?


11 years ago I attached a snippet, so what are you looking for?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(1,850 Views)

Kindly show me how to convert a byte stream into a bit stream in labview.

0 Kudos
Message 8 of 12
(1,848 Views)

@NamraS wrote:

Kindly show me how to convert a byte stream into a bit stream in labview.


The code is already there. The link Gerd showed in his post explains what a snippet is and how you can use it. And it’s pretty much anyhow just the To Boolean Array function, you can search for that in your palettes.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 12
(1,826 Views)

Hi Namra,

 


@NamraS wrote:

Kindly show me how to convert a byte stream into a bit stream in labview.


It is shown in those 11 year old messages!

 

One addition:

In those 11 years LabVIEW learned some new tricks.

Now you can create a 1D array at the loop output tunnel, instead of that 2D array created in the snippet…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(1,809 Views)