Special offers from our partners!
Find Replacement BBQ Parts for 20,308 Models. Repair your BBQ today.
7-193
DABIN(P),DDABIN(P)
1
2
3
4
6
6
7
8
7.11 Character string processing instructions
7.11.4
Conversion from decimal ASCII to BIN 16-bit and 32-bit data (DABIN(P),DDABIN(P))
DDABIN
(1) Converts decimal ASCII data stored into the area starting from the device number
designated by into BIN 32-bit data, and stores it in the device number designated by .
For example, if the ASCII code of 1234543210
H is designated for the area starting from
, the operation result would be stored at +1 and in the following manner:
(2) The ASCII data designated by to +5 can be in the range of from 2147483648 to
2147483647.
Further, data stored at the upper bytes of +5 will be ignored.
(3) The sign "20
H" will be stored if the BIN data is positive, and the sign "2DH" will be stored if it
is negative.
(If other than "20
H " and "2DH" is set, it will be processed as positive data.)
(4) ASCII code can be set for each position within the range from "30
H" to "39H".
(5) If the ASCII code set for individual positions is "20
H" or "00H," it will be processed as "30H".
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The ASCII code designated by to +5 for the individual numbers is something other
than "30
H" to "39H", "20H", or "00H". (Error code: 4100)
• The ASCII data designated by to +5 is outside the ranges shown below:
(Error code: 4100)
When DABIN instruction is used ........ 32768 to 32767
When DDABIN instruction is used...... 2147483648 to 2147483647
• The device specified by exceeds the range of the corresponding device.
(For the Universal model QCPU only.) (Error code: 4101)
S
D
+1
Sign data
ASCII code for billions place
ASCII code for hundred-millions place
ASCII code for ten-millions place
b15 b8
b7
b0
+2
ASCII code for millions place
ASCII code for hundred-thousands place
ASCII code for ten-thousands place
ASCII code for thousands place
+3
ASCII code for hundreds placeASCII code for tens place
ASCII code for units place
(Ignored)
+4
+5
Upper 16 bits
Lower 16 bits
BIN 32 bits
+1
b31 b16b15 b0
S
DS
S
S
S
S
D
S
D D
+1
2D
H
( )
31
H
(1)
32
H
(2)33
H
(3)
b15 b8b7 b0
+2
34
H
(4)35
H
(5)
34
H
(4)33
H
(3)
+3
32
H
(2)31
H
(1)
30
H
(0)
+4
+5
12 3 4 3210
+1
5 4
D
S
S
S
S
S
S
D
S S
S
S S
S S
S