7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
531
7
Conversion from BIN 16-bit data to hexadecimal ASCII,
conversion from BIN 32-bit data to hexadecimal ASCII
BINHA(P), DBINHA(P)
■BINHA
• Converts the individual digit numbers of hexadecimal notation of the BIN 16-bit data designated by (S) into ASCII codes,
and stores the results into the area starting from the device designated by (D).
For example, if the value 02A6H is designated by (S), the operation result would be stored following (D) in the following
manner:
• The BIN data designated by (S) can be in the range from 0H to FFFFH.
• The operation results stored at (D) are processed as 4-digit hexadecimal values. For this reason, zeros which are
significant digits on the left side of the value are processed as "0". (No zero suppression is conducted.)
• The data to be stored at the device designated by (D)+2 differs depending on the ON/OFF status of SM701 (number of
characters to output select signal).
(S): BIN data to be converted to ASCII (BIN 16/32 bits)
(D): Head number of the devices where the conversion result will be stored (character string)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
(D)
• When SM701 is OFF: Stores "0"
• When SM701 is ON: Does not change
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
P
S
D
S D
BINHAP, DBINHAP
BINHA, DBINHA
indicates an instruction symbol of BINHA/DBINHA.
+1
ASCII code for the 4th digitASCII code for the 3rd digit
ASCII code for the 2nd digitASCII code for the 1st digit
b15 b8b7 b0
+2
0
b15 b0
BIN 16-bit data
S
D
D
D
Only when
SM701 is OFF
+1
30
H
(0)32
H
(2)
41
H (A)36
H
(6)
b15 b8 b7 b0
+2
00
H
b15
b0
02A6H
S
D
D
D