08-06-2014 01:03 AM
i get a 24 bit 2's complement hex number in string format from serial port. i want use this hex number in continue in my LabVIEW code. but it doesn't work correctly !!
in example if i receive ffffff it is equal to -1 and if i receive 000001 it is equal to +1 .
anybody has solution for my problem ?
Thanks.
Solved! Go to Solution.
08-06-2014 01:17 AM
See here.
08-06-2014 01:53 AM
08-06-2014 02:02 AM
Thank you friends.
but finally i want a number that can be positive or negative. in fact i need number in DBL format with it's sign.
08-06-2014 02:06 AM - edited 08-06-2014 02:07 AM
08-06-2014 09:52 AM
That's a pretty clever sign extension, but a little difficult for me to wrap my brain around. An alternative to let LV do it for you would be to use a 24-bit fixed-point type for the conversion:
08-06-2014 09:56 AM
08-07-2014 12:21 AM
JLewis a écrit :
That's a pretty clever sign extension, but a little difficult for me to wrap my brain around. An alternative to let LV do it for you would be to use a 24-bit fixed-point type for the conversion:
Very interesting ! This is the first time I see this solution.
08-28-2014 01:44 AM
Hi All
I am trying to converter 4 bit hex string to number. I know the right results. But I do not know how converte. Please see the attached vi
Please help me.
Thanks
08-28-2014 01:49 AM