02-04-2010 05:16 AM
Hello
I have a problem with hex to normal conversion:
I have the constant string that is a date 03/02/2010 12:30:00 ( Normal display), if I use the Hex display it will be 3033 2F30 322F 3230 3130 2031 323A 3330 3A30 30
So I if I write this Hex display of the date into a another string diplayed as normal, how can i convert this value to the initial date?
Thanks
Solved! Go to Solution.
02-04-2010 05:24 AM
Hexadecimal String to Number vi should help.
02-04-2010 05:26 AM
enzo78 wrote:So I if I write this Hex display of the date into a another string diplayed as normal, how can i convert this value to the initial date?
Why do you want to this back conversion? Why don't you connect both of the strings using wires? Post what you have did so far. We will help you out.
Mathan
02-04-2010 05:36 AM
enzo78 wrote:Hello
I have the constant string that is a date 03/02/2010 12:30:00 ( Normal display), if I use the Hex display it will be 3033 2F30 322F 3230 3130 2031 323A 3330 3A30 30
So I if I write this Hex display of the date into a another string diplayed as normal, how can i convert this value to the initial date?
Thanks
The point is that converting the value in another format and displaying it in another format is not the same. You are displaying the value in HEX, but it is not in HEX as I understand. So you do not need to convert it, just set that another string indicator to display in normal format.
And if you have a string in HEX, then you can use the vi I have mentioned above.
02-04-2010 05:52 AM
Hi All
I have attached the example
02-04-2010 08:50 AM - edited 02-04-2010 09:00 AM
This is the beginning I have made.
There are two drawbakcs:
1. No spaces in the input HEX code available.
2. The result is given with a space between every character.
This is how it looks like:
Maybe this will give you some ideas while moving on.
02-04-2010 09:26 AM
Did the snippet creation create the for-loop with a constant of 1?
Now for the trivial solution:
02-04-2010 09:35 AM - edited 02-04-2010 09:42 AM
My solution with no drawbakcs.
Anyway, it is very possible that there was a more efficient way to solve this. While I am only a novice, this is the best what I have managed to come with 🙂
---
No, I have made those changes to simplify the execution for testing the program. Originally, while loop was given.
02-05-2010 06:15 AM
02-15-2010 04:14 AM
Hy all.
I'm new on this forum, and I'm coming from Slovenia, so sory in advance for ma "bad language".
I'm kind of "a fresh starter" in LabView, so I turned to you guys, if U could help me with this problem, that I have.
So...
I'm building VI, to whom i get Hex string from byte array. Now i have to convert this HEX string into a DBL number.
I tryed like this:
- convert byte array to string
- then HEX string into a number
But I always get "0" out.
For example, if I put in the HEX string "1388", I would have to get the number 5000 out. But i get "0" all the time.
Thanks in advance...