528
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
7.11 Character String Processing Instructions
Conversion from BIN 16-bit data to decimal ASCII, conversion
from BIN 32-bit data to decimal ASCII
BINDA(P), DBINDA(P)
■BINDA
• Converts the individual digit numbers of decimal 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 -12345 has been designated at (S), the following will be stored from (D) onward:
• The BIN data designated at (S) can be in the range from -32768 to 32767.
• The operation results stored at (D) are as follows:
(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)
• The sign "20H" will be stored if the BIN data is positive, and the sign "2DH" will be stored if it is negative.
• The sign "20H" will be stored for the leading zeros of effective digits. (Zero suppression is conducted.)
• The storage of data at devices specified by (D)+3 differs depending on the ON/OFF status of SM701 (output number of characters conversion signal).
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
BINDAP, DBINDAP
BINDA, DBINDA
indicates an instruction symbol of BINDA/DBINDA.
+1
Sign
ASCII code for ten-thousands place
ASCII code for thousands place
ASCII code for hundreds place
b15 b8 b7 b0
+2
b15 b0
BIN 16-bit data
0
ASCII code for tens placeASCII code for units place
+3
S
D
D
D
D
Only when
SM701 is OFF
+1
2DH ( )31H (1)
32
H (2)33H (3)
b15 b8 b7 b0
+2
b15 b0
34H (4)
35
H (5)
00
H
+3
1234
5
D
S
D
D
D
0 0 3 2 5
Number of significant digits
20
H is set