LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex to binary

Solved!
Go to solution

I've searched and found examples of exactly what it is I want to do, but for whatever reason, I'm not getting the correct values I want. 

 

All I need to do is take a hex value...1F4EF5, and translate it into simple BCD so that I can take it apart at the bit level.  I'm currently following a few examples that simply take the hex string, convert it to an integer then to binary and I'm getting wrong results for the binary.  Any help would be appreciated.

0 Kudos
Message 1 of 6
(4,847 Views)
Solution
Accepted by topic author In-Use

Are you going for something like this?


GCentral
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 6
(4,837 Views)

Hi crossrulz,

 

Mostly yes, except the output I would like to be a string that way I can search it.

 

-Ben

0 Kudos
Message 3 of 6
(4,765 Views)
Solution
Accepted by topic author In-Use

Hi InUse,

 

why do you need a string to "search" it?

 

My approach:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(4,748 Views)

Hi Gerd,

 

String is needed or preferred rather because that is the format from the original vi that I'm modifying.  It's not necessarily required.  That said, I was able to use your example and now have working code...finaly!  Thank you to you two for the help.

 

-Ben

0 Kudos
Message 5 of 6
(4,737 Views)

You need to be very careful with the lenght.

 

For example if the first two digits of your input string are "00", you would get a short result with the given code. Maybe that's OK?

0 Kudos
Message 6 of 6
(4,715 Views)