372
7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
Converting 32-bit binary data to decimal ASCII
DBINDA(P)(_U)
These instructions convert 32-bit binary data specified by (s) into decimal ASCII codes, and store the converted data in the
device specified by (d) and later.
■Descriptions, ranges, and data types
■Applicable devices
*1 T, ST, C cannot be used.
• These instructions convert 32-bit binary data specified by (s) into decimal ASCII codes, and store the converted data in the
device specified by (d) and later.
When -12345678 is specified in (s) (when signed data is specified)
• The following shows the operation result to be stored in (d).
Ladder diagram Structured text
ENO:=DBINDA(EN,s,d);
ENO:=DBINDAP(EN,s,d);
ENO:=DBINDA_U(EN,s,d);
ENO:=DBINDAP_U(EN,s,d);
Operand Description Range Data type Data type (label)
(s) DBINDA(P) Binary data to be converted into ASCII codes -2147483648 to +2147483647 32-bit signed binary ANY32
DBINDA(P)_U 0 to 4294967295 32-bit unsigned binary ANY32
(d) Head device number storing conversion result Character string Character string
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s)
(d)
*1
• As sign data, "20H" is stored if the 16-bit binary data is positive, and "2DH" is stored if the data is negative.
• "20H" is stored for "0" on the left side of the valid digits (zero suppression). For "0012034560", 20H is stored for "00", and the number of digits is 8
based on "12034560".
• In the upper 8 bits of the device specified by (d)+5, 0 is stored when SM701 (output character number selector signal) is off, and 20H is stored when
SM701 is on.
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)+5
b15 b0
b7b8
(s)+1 (s)
ASCII code for billions place
ASCII code for ten-millions place
ASCII code for hundred-thousands place
ASCII code for sign
ASCII code for hundred-millions place
ASCII code for millions place
ASCII code for thousands place
ASCII code for tens place
0 or 20H
ASCII code for ten-thousands place
ASCII code for hundreds place
ASCII code for ones place
32-bit binary data
high-order 16 bits Low-order 16 bits
When SM701 is off: 0, when SM701 is on: 20H
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)+5
b15 b0
b7b8
(s)+1 (s)
1234 5678
-
2DH (-)
31H (1)
32H (2)33H (3)
35H (5) 34H (4)
37H (7) 36H (6)
38H (8)
20H (space)
00H or 20H
20H (space)