01-23-2013 04:42 AM
I want to get a hexa decimal string to be splitted into components. With each component not exceeding limit of converted decimal number 255. Is there any VI to do this directly (To split the hexadecimal number to its components). help me please in this regard
01-23-2013 05:07 AM
Hello,
What are you trying to get??
Is this you want...
Regards,
Bijay
CLD
01-23-2013 05:26 AM
Bijay,
when the string has odd number of characters, the logic might not work correct.
we should be grouping HEX characters from left most bit... so, i modified your code as attached.
01-23-2013 10:45 PM
No i need if 500 is my decimal number it is mor than the byte range so , the hexadecimal number corresponding is 1F3. In this 1 as a byte send to the motor and F3 in decimal 244 will go as another byte to the motor. My motor will take any value as three parts each part of a byte. if we have to give one then first iszero then zero then 1. So commonly can I make a VI that will split any hexadecimal as like C350 as C3 and 50 into two hexadecimal parts. Please kindly send me a solution
01-24-2013 12:24 AM
Hi
In that case, wire the output of String Subset directly to the output. Remove the Hexadecimal string to number function. you will get an array of Hexadecimal strings, of one byte each.
01-24-2013 12:27 AM
without using this for loop can we do it.Is no ohter method is available easier than this. Please reply
01-24-2013 12:44 AM
hi
it would be better done that way.
else, if you do not want FOR loop, you will have to repeat the 'String subset' function manually till you can get the entire HEX string broken up.
but, why do you not want a For loop? what has it done to upset you so?
01-24-2013 05:04 AM
No other way to split the hexa decimal number. No direct VI is available for that. Pleaase reply
01-24-2013 05:49 AM - edited 01-24-2013 05:50 AM
If your number doesnt go too large you could convert the string to a u32 and use split number.
01-24-2013 05:52 AM
Yes
As IanW mentioned, you should definitely know the sixe of the HEX string to code that. if the hex string length can change, it is better to use FOR loop