From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

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,416 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,388 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,384 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,377 Views)

Thank you so much. You guys are awesome

 

Smiley Wink

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

Can you please attach this VI here?

0 Kudos
Message 6 of 12
(1,860 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,852 Views)

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

0 Kudos
Message 8 of 12
(1,850 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,828 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,811 Views)