SOLO BETA User Manual
Convert Fixed-point Sfxt(32-17) data into real world floating point data
type:
As mentioned before, the data that comes as a feedback or sent to SOLO as a command can have
fixed-point format, which is a kind of floating point format for digital systems.in case the command
contains a DATA part with fixed-point format, you can use the following methods to convert it
back to floating point data type:
– If the data read from SOLO is less than or equal to 0x7FFE0000 (Hex) or 2147352576
(decimal), This means the data is positive, so follow the following steps
1) Convert the hex data read from SOLO into Decimal format
2) The float number = data read from SOLO (in Decimal format) / 131072
– If the data read from SOLO is greater than 0x7FFE0000 (Hex) or 2147352576 (decimal), This
means the data is negative, so the conversion will be as :
1) Subtract the data from 0xFFFFFFFF and then add a 0x1 to it (add 1 to it)
2) Convert the result of step “1” into Decimal format
3) The float number = (data in Decimal format taken from step “2” /131072 ) * -1
Example1 _ positive Numbers:
Data read from SOLO is “0x00030000”
So it’s a Positive Numbers Conversion since the data read from SOLO is less than or equal to
0x7FFE0000 so the conversion will be:
1) Decimal (0x00030000) = 196608
2) 196608 / (131072) = 1.5
Example2 _ negative Numbers:
Data read from SOLO is “0xFFFCCDD2”
So it’s a Negative Numbers Conversion since the data read from SOLO is greater than
0x7FFE0000, so the conversion will be:
1) (0xFFFFFFFF – 0xFFFCCDD2 ) + 0x1 = 0x0003322E
2) Decimal ( 0x0003322E ) = 209454
3) (209454 / (131072) )* -1 = -1.598
www.solomotorcontrollers.com
January 2021 - Revision V_1.0.5 Copyright © 2020, All right Reversed. SOLO motor controllers.
51