AH500 Programming Manual b7 b8 b15 b0 S b15 b0 b31 b16 (D+1, D) S+1 S+2 32-bit binary number S+3 S+4 5. If S used in the 32-bit instruction is a string and the number of characters contained in the string is less than 11, the characters which the string lacks are regarded as 0. The first character is a sign character. If the first character is “ ” (a space), the sign is a positive sign. If the first character is “-”, the sign is a negative sign. Take the string “-0123456789” for example. S+5 b15 b0 b7 b 8 (D +1,D 0) S+3 S b31 b16 -123456789 S+1 S+2 b15 b0 32 -bit bin 6. If the value in S is 16#20 or 16#00, the value is processed as 16#30. 7.
If the sign character is 16#20, 16#30 or 16#2B, the conversion result is a positive value. If the sign character is 16#2D, the conversion result is a negative value. 8. If S used in the 16-bit instruction is a string, the number of characters contained in the string should be within the range between 1 and 6. If S used in the 32-bit instruction is a string, the number of characters contained in the string should be within the range between 1 and 11. S+4 S+5 Example 1: Suppose the values in D20, D21, and D22 are 16#202D, 16#3220, and 16#3736. When the PLC runs, the value in D0 is -267. b15 b0 b7 b8 D20 D21 D22 Example 2:
Suppose the values in D20, D21, D22, D23, D24 and D25 are 16#2020, 16#2020, and 16#3933, 16#3836, 16#3733, and 16#3330. When the PLC runs, the value in D0 is 3968370. 6-450 ASCII code in the billions place Sign ASCII code in the ten millions place ASCII code in the hundred millions place ASCII code in the hundred thousands place ASCII code in the millions place ASCII code in the thousands place ASCII code in the ten thousands place ASCII code in the tens place ASCII code in the hundreds place Ignored ASCII code in the units place "0" "-" "2" "1" "4" "3" "6" "5" "8" "7" “ (Ignored)” "9" 16#20( ) 16#2D(-) D0 -267 (Regarded as -00267) 16#32(2) 16#20(0) 16#37(7) 16#36(6)