AH500 Programming Manual If the data in S ~ S +5 is -12345.678, the calculation is as follows. (D1+1,D1) S b15 b0 b7 b8 +1 S +2 S +3 S +4 S +5 S If there is 16#20 or 16#30 between the sign character and the first value which is not 0 in the string in S , 16#20 or 16#30 is ignored when the string is converted into the binary number. 12 Number of characters - 1234.56 2 Number of decimal places Ignored -123456 Binary number 11 Number of characters 0.00012345 8 Number of decimal places If 16#2E, which represents the decimal point, is ignored, the string in S should be within the range between -2147483648 and 2147483647.
For example, if the string is “1234567.8”, users have to check whether “12345678” is within the range. 4. If the sign code in S is 16#20, 16#2B, and 16#30 the conversion result is a positive value. If the sign code in S is 16#2D, the conversion result is a negative value. 5. In the string in S , except for the sign code, the code representing the decimal point, and the code which can be ignored, i.e. 16#20 or 16#30, the other codes have to be within the range between 16#30 and 16#39. Binary number Sign Ignored 12345 Example 1: D20 b15 b0 b7 b8 D21 2 6 D10 ( ) Number of characters D11 ( ) Number of decimal places D22 D23 -1234 D0 6-466 10 (D1+3,D1+2) 3 (D2+1,D2) -12345678 .
1 0 3 16#31(1) 16#2D(-) 16#33(3) 16#32(2) 16#35(5) 16#34(4) 16#36(6) 16#2E(.) 16#38(8) 16#37(7) 16#00 -1234 5678 16#31(1) 16#2D(-) 16#2E(.) 16#32(2) 16#34(4) 16#33(3) 16#00