12-08-2008 03:53 AM
I have long hexadecimal strings that I wish to convert to their corresponding ascii-characters. I know there are a series of functions for doing things like this - hex to number, number to string etc.
At the moment, however, I am stuck at entering the hexadecimal string. I connect it to "hexadecimal string to number". What I get out is the decimal value of the two last digits of the hexadecimal number. No other wires are connected to the function. This means data is lost. How do I get around this? Is this particular function at all suitable for what I am trying to do?
12-08-2008 04:10 AM
I just did a quick test with a constant string connected to the function and a indicator (the minimal function). Atleast with 6 characters it worked fine, so to me it sounds like a string-problem. Do you have spaces or anything in the string so you need to clean it first?
/Y
12-08-2008 04:20 AM
Tzench wrote:I have long hexadecimal strings that I wish to convert to their corresponding ascii-characters.
Is this particular function at all suitable for what I am trying to do?
Please post a sample of what input you gave and what output is coming and what exact output you want.
This will help us for better understanding and make things more clear.
Mathan
12-08-2008 04:26 AM - edited 12-08-2008 04:27 AM
Hi Tzench,
"hexadecimal string" isn't very accurate and conversion questions have been discussed many times before...
See example on conversion of two different "hexadecimal" strings. There are other conversion methods, but those are most easiest to understand
12-08-2008 07:01 AM
08-26-2009 07:15 AM - edited 08-26-2009 07:16 AM
06-12-2012 05:19 PM
I've found this thread very helpful
I had a concateneted hexadecimal string in normal display (didn't found a way to concatenate hex strings into a hex string display correctly, only to a normal display)
I needed to calculate a LRC Checksum:
Example: 010310000002
LRC=2complement(01+03+10+00+00+02)=EA
Tried a lot of methods but only could get there with this:
I'm sharing because it could help someone else.
If someone know a more elegant way to do it please share.
08-01-2012 07:31 PM
Dear all, I've got a problem to interpret following HEX string 'A001 1000 0400 0301 04'. Actually I know, that 'A' is a flag of the strat bite, the bites 'A001 1000' are a description of a value '0400 0301 04', witch means DEC 4.0314. I've tried all of the solution above, accept standard NI technique without success.
I'd appreciate your help or suggestions!
08-01-2012 10:56 PM - edited 08-01-2012 10:56 PM
It would have been better if you started your own thread rather than jumping onto someone else's from 3 1/2 years ago.
I can sort of see how you get the 0314 part out of that string. But where does December come from? And what what exactly does December 4.0314 mean?
08-01-2012 11:50 PM
Thank you for replay,
December was in my soul, before I found the following solution :
I'm not sure, if my parser is optimal.
Raves Fan: "t would have been better if you started your own thread rather than jumping onto someone else's from 3 1/2 years ago."
Yes I will. After I'll get my vi in useful and presentable form. Are you agree?