Chapter 6 Applied Instructions Symbol: S : Source value Word/Double word D : Device in which the conversion result is stored Word Explanation: 1. The hexadecimal binary number in S is converted into the ASCII code, and the conversion result is stored in D . 2. The instruction supports SM690, which controls the ending character. 3. The value in S used in the 16-bit instruction should be within the range between 16#0000 and 16#FFFF, and should be a four-digit binary number. The operand D occupies three word devices. The data is converted as follows. b15 b0 b15 b0 b7 b8 S D D +1 +2 16-bit binary number D If SM690 is OFF, 16#0000 is stored in D +2. If SM690 is ON, the value in D +2 is unchanged.
For example, if the value in S is 16#02A6 and SM690 is OFF, the conversion result is as follows. b15 b0 b7 b8 b15 b0 S 16#02A 6 4. The value in S used in the 32-bit instruction should be within the range between 16#00000000 and 16#FFFFFFFF, and should be an eight-digit binary number. The operand D occupies five word devices. The data is converted as follows. b15 b0 b7 b8 D S +1 S D +1 +3 03AC 625E D D +2 D +4 If SM690 is OFF, 16#0000 is stored in D +4. If SM690 is ON, the value in D +4 is unchanged.
6-443 API Instruction code Operand Function 2101 D BINHA P S, D Converting the binary hexadecimal number into the hexadecimal ASCII code Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps) AH500 AH500 AH500 Third AS CII code Fourth ASCII code First ASCII code Second ASCII code Ending character (16#0000 or unchanged) 16#32(2) 16#30(0) 16#36(6) 16#41(A) 16#0000 16#33(3) 16#30(0) 16#43(C) 16#41(A) 16#32(2) 16#36(6) 16#45(E) 16#35(5) 16#0000