08-15-2006 11:09 AM
@j_es wrote:
Process 2 doesnt work for all hex values a-f and 4 doesnt do it. Didnt check 3.
So go with #1! 😉 The reason 2 and 3 do not work exactly the same for higher numbers is the fact that the intermediaray decimally formatted string has more than four digits. Remember that you never provided full specifications and I could not even assume that your overly complex algorithm was correct for all inputs so I made some guesses.
Still somehow this entire algorithm seems quite silly. (Yes, it does! :o). Who in his right mind would design it this way? Are you sure that yours (and #1) really work according to the specifications? What kind of device generates the input string? Is the programming manual and format specifications available for download somewhere?
06-18-2014 05:07 PM
Hello "altenbach ",
I used the vi you developed and observed that all the methods are showing the same decimal value as 1800 for hexadecimal value 0007 0008 but the actual decimal value should be 458760.
Can someone explain what is the problem with these methods in the vi.
Thanks.
06-18-2014 05:19 PM
The problem is that you continue to give vague, undefined requirements. 😉
06-18-2014 05:22 PM
How to correct the above vi working and can I get details of how to extract and convert 1)each hexa value to decimal and to 4bit binary and 2)each hexa value to decimal and to 8bit binary.
06-18-2014 07:20 PM
This is a 6 year old thread with a relatively special problem description. What makes you think it applies to your problem?
Be much more clear what you have (string, how many bytes, formatted, binary, display style) and what you want. (Datatype, etc).
Use well defined words ("hexa" has no meaning).
Easiest would be if you could attach a VI with appropriate default values.
06-19-2014 08:23 AM - edited 06-19-2014 08:24 AM
@stefan57 wrote:
Hello "@altenbach ",
I used the vi you developed and observed that all the methods are showing the same decimal value as 1800 for hexadecimal value 0007 0008 but the actual decimal value should be 458760.
Can someone explain what is the problem with these methods in the vi.
You don't need "these methods", because your problem is trivial!
A simple unflatten or typecast to I32 (or U32) will do exactly what you need.
(sorry, was posting by phone earler and could not test)